WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-87518-20120525141921.patch (text/plain), 26.51 KB, created by
Mark Pilgrim (Google)
on 2012-05-25 11:19:51 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Mark Pilgrim (Google)
Created:
2012-05-25 11:19:51 PDT
Size:
26.51 KB
patch
obsolete
>Index: Source/Platform/ChangeLog >=================================================================== >--- Source/Platform/ChangeLog (revision 118542) >+++ Source/Platform/ChangeLog (working copy) >@@ -1,3 +1,33 @@ >+2012-05-25 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chomium] Move sandboxSupport to Platform.h >+ https://bugs.webkit.org/show_bug.cgi?id=87518 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Part of a refactoring series. See tracking bug 82948. >+ >+ * Platform.gypi: >+ * chromium/public/Platform.h: >+ (WebKit): >+ (Platform): >+ (WebKit::Platform::sandboxSupport): >+ * chromium/public/android/WebSandboxSupport.h: Added. >+ (WebKit): >+ (WebSandboxSupport): >+ * chromium/public/linux/WebFontFamily.h: Added. >+ (WebKit): >+ (WebFontFamily): >+ * chromium/public/linux/WebSandboxSupport.h: Added. >+ (WebKit): >+ (WebSandboxSupport): >+ * chromium/public/mac/WebSandboxSupport.h: Added. >+ (WebKit): >+ (WebSandboxSupport): >+ * chromium/public/win/WebSandboxSupport.h: Added. >+ (WebKit): >+ (WebSandboxSupport): >+ > 2012-05-17 Andrey Kosyakov <caseq@chromium.org> > > [chromium] add instrumentation for compositing >Index: Source/Platform/Platform.gypi >=================================================================== >--- Source/Platform/Platform.gypi (revision 118542) >+++ Source/Platform/Platform.gypi (working copy) >@@ -112,9 +112,13 @@ > 'chromium/public/WebVideoFrame.h', > 'chromium/public/WebVideoFrameProvider.h', > 'chromium/public/WebWorkerRunLoop.h', >+ 'chromium/public/android/WebSandboxSupport.h', > 'chromium/public/android/WebThemeEngine.h', >+ 'chromium/public/linux/WebSandboxSupport.h', > 'chromium/public/linux/WebThemeEngine.h', >+ 'chromium/public/mac/WebSandboxSupport.h', > 'chromium/public/mac/WebThemeEngine.h', >+ 'chromium/public/win/WebSandboxSupport.h', > 'chromium/public/win/WebThemeEngine.h', > 'chromium/src/Platform.cpp', > 'chromium/src/WebCString.cpp', >Index: Source/Platform/chromium/public/Platform.h >=================================================================== >--- Source/Platform/chromium/public/Platform.h (revision 118542) >+++ Source/Platform/chromium/public/Platform.h (working copy) >@@ -56,6 +56,7 @@ class WebPeerConnectionHandler; > class WebPeerConnectionHandlerClient; > class WebURL; > class WebURLLoader; >+class WebSandboxSupport; > class WebSocketStreamHandle; > class WebThemeEngine; > class WebThread; >@@ -80,6 +81,9 @@ public: > // Must return non-null. > virtual WebMimeRegistry* mimeRegistry() { return 0; } > >+ // May return null if sandbox support is not necessary >+ virtual WebSandboxSupport* sandboxSupport() { return 0; } >+ > // May return null on some platforms. > virtual WebThemeEngine* themeEngine() { return 0; } > >Index: Source/Platform/chromium/public/android/WebSandboxSupport.h >=================================================================== >--- Source/Platform/chromium/public/android/WebSandboxSupport.h (revision 0) >+++ Source/Platform/chromium/public/android/WebSandboxSupport.h (revision 0) >@@ -0,0 +1,43 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef WebSandboxSupport_h >+#define WebSandboxSupport_h >+ >+namespace WebKit { >+ >+// Empty class, as we need it to compile. >+class WebSandboxSupport { >+public: >+}; >+ >+} // namespace WebKit >+ >+#endif >Index: Source/Platform/chromium/public/linux/WebFontFamily.h >=================================================================== >--- Source/Platform/chromium/public/linux/WebFontFamily.h (revision 0) >+++ Source/Platform/chromium/public/linux/WebFontFamily.h (revision 0) >@@ -0,0 +1,47 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef WebFontFamily_h >+#define WebFontFamily_h >+ >+#include "../WebCString.h" >+#include "../WebCommon.h" >+ >+namespace WebKit { >+ >+struct WebFontFamily { >+ WebCString name; >+ bool isBold; >+ bool isItalic; >+}; >+ >+} // namespace WebKit >+ >+#endif // WebFontFamily_h >Index: Source/Platform/chromium/public/linux/WebSandboxSupport.h >=================================================================== >--- Source/Platform/chromium/public/linux/WebSandboxSupport.h (revision 0) >+++ Source/Platform/chromium/public/linux/WebSandboxSupport.h (revision 0) >@@ -0,0 +1,65 @@ >+/* >+ * Copyright (C) 2009 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef WebSandboxSupport_h >+#define WebSandboxSupport_h >+ >+#include "../WebCommon.h" >+#include "../WebString.h" >+#include "WebFontFamily.h" >+ >+namespace WebKit { >+ >+struct WebFontRenderStyle; >+ >+// Put methods here that are required due to sandbox restrictions. >+class WebSandboxSupport { >+public: >+ // Fonts --------------------------------------------------------------- >+ >+ // Get a font family which contains glyphs for the given Unicode >+ // code-points. >+ // characters: a UTF-16 encoded string >+ // numCharacters: the number of 16-bit words in |characters| >+ // preferredLocale: preferred locale identifier for the |characters| >+ // (e.g. "en", "ja", "zh-CN") >+ // >+ // Returns a string with the font family on an empty string if the >+ // request cannot be satisfied. >+ // Returns a WebFontFamily instance with the font name. The instance has empty font name if the request cannot be satisfied. >+ // FIXME: Make this to be a pure virtual function after transition. >+ virtual void getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters, const char* preferredLocale, WebFontFamily*) = 0; >+ >+ virtual void getRenderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle*) = 0; >+}; >+ >+} // namespace WebKit >+ >+#endif >Index: Source/Platform/chromium/public/mac/WebSandboxSupport.h >=================================================================== >--- Source/Platform/chromium/public/mac/WebSandboxSupport.h (revision 0) >+++ Source/Platform/chromium/public/mac/WebSandboxSupport.h (revision 0) >@@ -0,0 +1,61 @@ >+/* >+ * Copyright (C) 2010 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef WebSandboxSupport_h >+#define WebSandboxSupport_h >+ >+typedef struct CGFont* CGFontRef; >+ >+#ifdef __OBJC__ >+@class NSFont; >+#else >+class NSFont; >+#endif >+ >+namespace WebKit { >+ >+// Put methods here that are required due to sandbox restrictions. >+class WebSandboxSupport { >+public: >+ // Given an input font - |srcFont| [which can't be loaded due to sandbox >+ // restrictions]. Return a font belonging to an equivalent font file >+ // that can be used to access the font and a unique identifier corresponding >+ // to the on-disk font file. >+ // >+ // If this function succeeds, the caller assumes ownership of the |out| >+ // parameter and must call CGFontRelease() to unload it when done. >+ // >+ // Returns: true on success, false on error. >+ virtual bool loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID) = 0; >+}; >+ >+} // namespace WebKit >+ >+#endif >Index: Source/Platform/chromium/public/win/WebSandboxSupport.h >=================================================================== >--- Source/Platform/chromium/public/win/WebSandboxSupport.h (revision 0) >+++ Source/Platform/chromium/public/win/WebSandboxSupport.h (revision 0) >@@ -0,0 +1,52 @@ >+/* >+ * Copyright (C) 2009 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef WebSandboxSupport_h >+#define WebSandboxSupport_h >+ >+typedef struct HFONT__* HFONT; >+ >+namespace WebKit { >+ >+// Put methods here that are required due to sandbox restrictions. >+class WebSandboxSupport { >+public: >+ // Sometimes a Win32 API call will fail because a font is not loaded, >+ // and due to sandbox restrictions, the current process may be unable >+ // to access the filesystem to load the font. So, this call serves as >+ // a failover to ask the embedder to try some other way to load the >+ // font (usually by delegating to an empowered process to have it load >+ // the font). Returns true if the font was successfully loaded. >+ virtual bool ensureFontLoaded(HFONT) = 0; >+}; >+ >+} // namespace WebKit >+ >+#endif >Index: Source/WebKit/chromium/ChangeLog >=================================================================== >--- Source/WebKit/chromium/ChangeLog (revision 118542) >+++ Source/WebKit/chromium/ChangeLog (working copy) >@@ -1,3 +1,27 @@ >+2012-05-25 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chomium] Move sandboxSupport to Platform.h >+ https://bugs.webkit.org/show_bug.cgi?id=87518 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Part of a refactoring series. See tracking bug 82948. >+ >+ * WebKit.gyp: >+ * public/platform/WebKitPlatformSupport.h: >+ (WebKit): >+ (WebKitPlatformSupport): >+ * public/platform/android/WebSandboxSupport.h: >+ * public/platform/linux/WebFontFamily.h: >+ * public/platform/linux/WebSandboxSupport.h: >+ * public/platform/mac/WebSandboxSupport.h: >+ * public/platform/win/WebSandboxSupport.h: >+ * src/PlatformSupport.cpp: >+ (WebCore::PlatformSupport::ensureFontLoaded): >+ (WebCore::PlatformSupport::loadFont): >+ (WebCore::PlatformSupport::getFontFamilyForCharacters): >+ (WebCore::PlatformSupport::getRenderStyleForStrike): >+ > 2012-05-25 Kinuko Yasuda <kinuko@chromium.org> > > Unreviewed; rolling chromium deps. >Index: Source/WebKit/chromium/WebKit.gyp >=================================================================== >--- Source/WebKit/chromium/WebKit.gyp (revision 118542) >+++ Source/WebKit/chromium/WebKit.gyp (working copy) >@@ -339,9 +339,6 @@ > 'public/platform/WebURLRequest.h', > 'public/platform/WebURLResponse.h', > 'public/platform/WebVector.h', >- 'public/platform/android/WebSandboxSupport.h', >- 'public/platform/mac/WebSandboxSupport.h', >- 'public/platform/win/WebSandboxSupport.h', > 'public/win/WebInputEventFactory.h', > 'public/win/WebSandboxSupport.h', > 'public/win/WebScreenInfoFactory.h', >Index: Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h >=================================================================== >--- Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (revision 118542) >+++ Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (working copy) >@@ -53,16 +53,12 @@ class WebIDBKey; // FIXME: Does this bel > class WebIDBKeyPath; // FIXME: Does this belong in platform? > class WebMessagePortChannel; // FIXME: Does this belong in platform? > class WebPluginListBuilder; // FIXME: Does this belong in platform? >-class WebSandboxSupport; > class WebSharedWorkerRepository; // FIXME: Does this belong in platform? > class WebStorageNamespace; // FIXME: Does this belong in platform? > > // FIXME: Eventually all these API will need to move to WebKit::Platform. > class WebKitPlatformSupport : public Platform { > public: >- // May return null if sandbox support is not necessary >- virtual WebSandboxSupport* sandboxSupport() { return 0; } >- > // DOM Storage -------------------------------------------------- > > // Return a LocalStorage namespace that corresponds to the following path. >Index: Source/WebKit/chromium/public/platform/android/WebSandboxSupport.h >=================================================================== >--- Source/WebKit/chromium/public/platform/android/WebSandboxSupport.h (revision 118542) >+++ Source/WebKit/chromium/public/platform/android/WebSandboxSupport.h (working copy) >@@ -28,16 +28,4 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef WebSandboxSupport_h >-#define WebSandboxSupport_h >- >-namespace WebKit { >- >-// Empty class, as we need it to compile. >-class WebSandboxSupport { >-public: >-}; >- >-} // namespace WebKit >- >-#endif >+#include "../../../../../Platform/chromium/public/android/WebSandboxSupport.h" >Index: Source/WebKit/chromium/public/platform/linux/WebFontFamily.h >=================================================================== >--- Source/WebKit/chromium/public/platform/linux/WebFontFamily.h (revision 118542) >+++ Source/WebKit/chromium/public/platform/linux/WebFontFamily.h (working copy) >@@ -28,20 +28,4 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef WebFontFamily_h >-#define WebFontFamily_h >- >-#include "../WebCString.h" >-#include "../WebCommon.h" >- >-namespace WebKit { >- >-struct WebFontFamily { >- WebCString name; >- bool isBold; >- bool isItalic; >-}; >- >-} // namespace WebKit >- >-#endif // WebFontFamily_h >+#include "../../../../../Platform/chromium/public/linux/WebFontFamily.h" >Index: Source/WebKit/chromium/public/platform/linux/WebSandboxSupport.h >=================================================================== >--- Source/WebKit/chromium/public/platform/linux/WebSandboxSupport.h (revision 118542) >+++ Source/WebKit/chromium/public/platform/linux/WebSandboxSupport.h (working copy) >@@ -28,38 +28,4 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef WebSandboxSupport_h >-#define WebSandboxSupport_h >- >-#include "../WebCommon.h" >-#include "../WebString.h" >-#include "WebFontFamily.h" >- >-namespace WebKit { >- >-struct WebFontRenderStyle; >- >-// Put methods here that are required due to sandbox restrictions. >-class WebSandboxSupport { >-public: >- // Fonts --------------------------------------------------------------- >- >- // Get a font family which contains glyphs for the given Unicode >- // code-points. >- // characters: a UTF-16 encoded string >- // numCharacters: the number of 16-bit words in |characters| >- // preferredLocale: preferred locale identifier for the |characters| >- // (e.g. "en", "ja", "zh-CN") >- // >- // Returns a string with the font family on an empty string if the >- // request cannot be satisfied. >- // Returns a WebFontFamily instance with the font name. The instance has empty font name if the request cannot be satisfied. >- // FIXME: Make this to be a pure virtual function after transition. >- virtual void getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters, const char* preferredLocale, WebFontFamily*) = 0; >- >- virtual void getRenderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* style) = 0; >-}; >- >-} // namespace WebKit >- >-#endif >+#include "../../../../../Platform/chromium/public/linux/WebSandboxSupport.h" >Index: Source/WebKit/chromium/public/platform/mac/WebSandboxSupport.h >=================================================================== >--- Source/WebKit/chromium/public/platform/mac/WebSandboxSupport.h (revision 118542) >+++ Source/WebKit/chromium/public/platform/mac/WebSandboxSupport.h (working copy) >@@ -28,34 +28,4 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef WebSandboxSupport_h >-#define WebSandboxSupport_h >- >-typedef struct CGFont* CGFontRef; >- >-#ifdef __OBJC__ >-@class NSFont; >-#else >-class NSFont; >-#endif >- >-namespace WebKit { >- >-// Put methods here that are required due to sandbox restrictions. >-class WebSandboxSupport { >-public: >- // Given an input font - |srcFont| [which can't be loaded due to sandbox >- // restrictions]. Return a font belonging to an equivalent font file >- // that can be used to access the font and a unique identifier corresponding >- // to the on-disk font file. >- // >- // If this function succeeds, the caller assumes ownership of the |out| >- // parameter and must call CGFontRelease() to unload it when done. >- // >- // Returns: true on success, false on error. >- virtual bool loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID) = 0; >-}; >- >-} // namespace WebKit >- >-#endif >+#include "../../../../../Platform/chromium/public/mac/WebSandboxSupport.h" >Index: Source/WebKit/chromium/public/platform/win/WebSandboxSupport.h >=================================================================== >--- Source/WebKit/chromium/public/platform/win/WebSandboxSupport.h (revision 118542) >+++ Source/WebKit/chromium/public/platform/win/WebSandboxSupport.h (working copy) >@@ -28,25 +28,4 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef WebSandboxSupport_h >-#define WebSandboxSupport_h >- >-typedef struct HFONT__* HFONT; >- >-namespace WebKit { >- >-// Put methods here that are required due to sandbox restrictions. >-class WebSandboxSupport { >-public: >- // Sometimes a Win32 API call will fail because a font is not loaded, >- // and due to sandbox restrictions, the current process may be unable >- // to access the filesystem to load the font. So, this call serves as >- // a failover to ask the embedder to try some other way to load the >- // font (usually by delegating to an empowered process to have it load >- // the font). Returns true if the font was successfully loaded. >- virtual bool ensureFontLoaded(HFONT) = 0; >-}; >- >-} // namespace WebKit >- >-#endif >+#include "../../../../../Platform/chromium/public/win/WebSandboxSupport.h" >Index: Source/WebKit/chromium/src/PlatformSupport.cpp >=================================================================== >--- Source/WebKit/chromium/src/PlatformSupport.cpp (revision 118542) >+++ Source/WebKit/chromium/src/PlatformSupport.cpp (working copy) >@@ -414,7 +414,7 @@ PassOwnPtr<AsyncFileSystem> PlatformSupp > #if OS(WINDOWS) > bool PlatformSupport::ensureFontLoaded(HFONT font) > { >- WebSandboxSupport* ss = webKitPlatformSupport()->sandboxSupport(); >+ WebSandboxSupport* ss = WebKit::Platform::current()->sandboxSupport(); > > // if there is no sandbox, then we can assume the font > // was able to be loaded successfully already >@@ -425,7 +425,7 @@ bool PlatformSupport::ensureFontLoaded(H > #if OS(DARWIN) > bool PlatformSupport::loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID) > { >- WebSandboxSupport* ss = webKitPlatformSupport()->sandboxSupport(); >+ WebSandboxSupport* ss = WebKit::Platform::current()->sandboxSupport(); > if (ss) > return ss->loadFont(srcFont, out, fontID); > >@@ -448,8 +448,8 @@ void PlatformSupport::getFontFamilyForCh > family->isItalic = false; > #else > WebFontFamily webFamily; >- if (webKitPlatformSupport()->sandboxSupport()) >- webKitPlatformSupport()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters, preferredLocale, &webFamily); >+ if (WebKit::Platform::current()->sandboxSupport()) >+ WebKit::Platform::current()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters, preferredLocale, &webFamily); > else > WebFontInfo::familyForChars(characters, numCharacters, preferredLocale, &webFamily); > family->name = String::fromUTF8(webFamily.name.data(), webFamily.name.length()); >@@ -463,8 +463,8 @@ void PlatformSupport::getRenderStyleForS > #if !OS(ANDROID) > WebFontRenderStyle style; > >- if (webKitPlatformSupport()->sandboxSupport()) >- webKitPlatformSupport()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); >+ if (WebKit::Platform::current()->sandboxSupport()) >+ WebKit::Platform::current()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); > else > WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 87518
: 144105