Title: [129429] trunk/Source
- Revision
- 129429
- Author
- [email protected]
- Date
- 2012-09-24 16:57:24 -0700 (Mon, 24 Sep 2012)
Log Message
[Chromium][Mac] Remove loadFont from PlatformSupport
https://bugs.webkit.org/show_bug.cgi?id=97360
Reviewed by Adam Barth.
Part of a refactoring series. See tracking bug 82948.
Source/WebCore:
* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/graphics/chromium/CrossProcessFontLoading.mm:
Source/WebKit/chromium:
* src/PlatformSupport.cpp:
(WebCore):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129428 => 129429)
--- trunk/Source/WebCore/ChangeLog 2012-09-24 23:53:11 UTC (rev 129428)
+++ trunk/Source/WebCore/ChangeLog 2012-09-24 23:57:24 UTC (rev 129429)
@@ -1,3 +1,16 @@
+2012-09-24 Mark Pilgrim <[email protected]>
+
+ [Chromium][Mac] Remove loadFont from PlatformSupport
+ https://bugs.webkit.org/show_bug.cgi?id=97360
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * platform/chromium/PlatformSupport.h:
+ (PlatformSupport):
+ * platform/graphics/chromium/CrossProcessFontLoading.mm:
+
2012-09-24 Tony Chang <[email protected]>
Replace 2 uses of updateLogicalHeight with computeLogicalHeight
Modified: trunk/Source/WebCore/platform/chromium/PlatformSupport.h (129428 => 129429)
--- trunk/Source/WebCore/platform/chromium/PlatformSupport.h 2012-09-24 23:53:11 UTC (rev 129428)
+++ trunk/Source/WebCore/platform/chromium/PlatformSupport.h 2012-09-24 23:57:24 UTC (rev 129429)
@@ -49,15 +49,6 @@
typedef struct _NPP NPP_t;
typedef NPP_t* NPP;
-#if OS(DARWIN)
-typedef struct CGFont* CGFontRef;
-#ifdef __OBJC__
-@class NSFont;
-#else
-class NSFont;
-#endif
-#endif // OS(DARWIN)
-
#if OS(WINDOWS)
typedef struct HFONT__* HFONT;
#endif
@@ -99,9 +90,6 @@
#if OS(WINDOWS)
static bool ensureFontLoaded(HFONT);
#endif
-#if OS(DARWIN)
- static bool loadFont(NSFont* srcFont, CGFontRef*, uint32_t* fontID);
-#endif
// IndexedDB ----------------------------------------------------------
static PassRefPtr<IDBFactoryBackendInterface> idbFactory();
Modified: trunk/Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm (129428 => 129429)
--- trunk/Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm 2012-09-24 23:53:11 UTC (rev 129428)
+++ trunk/Source/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm 2012-09-24 23:57:24 UTC (rev 129429)
@@ -30,8 +30,10 @@
#import "CrossProcessFontLoading.h"
#import "../graphics/FontPlatformData.h"
-#import "PlatformSupport.h"
+#include "LinkHash.h"
#import <AppKit/NSFont.h>
+#import <public/Platform.h>
+#import <public/mac/WebSandboxSupport.h>
#import <wtf/HashMap.h>
namespace WebCore {
@@ -121,15 +123,23 @@
CGFontRef tmpCGFont;
uint32_t fontID;
// Send cross-process request to load font.
- if (!PlatformSupport::loadFont(nsFont, &tmpCGFont, &fontID))
+ WebKit::WebSandboxSupport* sandboxSupport = WebKit::Platform::current()->sandboxSupport();
+ if (!sandboxSupport) {
+ // This function should only be called in response to an error loading a
+ // font due to being blocked by the sandbox.
+ // This by definition shouldn't happen if there is no sandbox support.
+ ASSERT_NOT_REACHED();
return 0;
+ }
+ if (!sandboxSupport->loadFont(nsFont, &tmpCGFont, &fontID))
+ return 0;
RetainPtr<CGFontRef> cgFont(tmpCGFont);
// Now that we have the fontID from the browser process, we can consult
// the ID cache.
font = fontCacheByFontID().get(fontID);
if (font)
- // FIXME: PlatformSupport::loadFont() should consult the id cache
+ // FIXME: WebSandboxSupport::loadFont() should consult the id cache
// before activating the font.
return font;
Modified: trunk/Source/WebKit/chromium/ChangeLog (129428 => 129429)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-09-24 23:53:11 UTC (rev 129428)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-09-24 23:57:24 UTC (rev 129429)
@@ -1,3 +1,15 @@
+2012-09-24 Mark Pilgrim <[email protected]>
+
+ [Chromium][Mac] Remove loadFont from PlatformSupport
+ https://bugs.webkit.org/show_bug.cgi?id=97360
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore):
+
2012-09-24 Tony Chang <[email protected]>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (129428 => 129429)
--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-09-24 23:53:11 UTC (rev 129428)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-09-24 23:57:24 UTC (rev 129429)
@@ -217,24 +217,6 @@
}
#endif
-#if OS(DARWIN)
-bool PlatformSupport::loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID)
-{
- WebSandboxSupport* ss = WebKit::Platform::current()->sandboxSupport();
- if (ss)
- return ss->loadFont(srcFont, out, fontID);
-
- // This function should only be called in response to an error loading a
- // font due to being blocked by the sandbox.
- // This by definition shouldn't happen if there is no sandbox support.
- ASSERT_NOT_REACHED();
- *out = 0;
- *fontID = 0;
- return false;
-}
-#elif OS(UNIX)
-#endif
-
// Indexed Database -----------------------------------------------------------
PassRefPtr<IDBFactoryBackendInterface> PlatformSupport::idbFactory()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes