Title: [174052] trunk/Source
Revision
174052
Author
[email protected]
Date
2014-09-28 20:42:38 -0700 (Sun, 28 Sep 2014)

Log Message

Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
https://bugs.webkit.org/show_bug.cgi?id=137197

Reviewed by Alexey Proskuryakov.

No new tests because there is no behavior change.

Source/WebCore:

* WebCore.exp.in:
* WebCore.order:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill): Use SPI call instead of WKSI call
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CGFontUnicodeSupport.h: Added for SPI call.

Source/WebKit:

* mac/WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebKit.order:

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (174051 => 174052)


--- trunk/Source/WebCore/ChangeLog	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebCore/ChangeLog	2014-09-29 03:42:38 UTC (rev 174052)
@@ -1,3 +1,21 @@
+2014-09-28  Myles C. Maxfield  <[email protected]>
+
+        Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
+        https://bugs.webkit.org/show_bug.cgi?id=137197
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests because there is no behavior change.
+
+        * WebCore.exp.in:
+        * WebCore.order:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
+        (WebCore::GlyphPage::fill): Use SPI call instead of WKSI call
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+        * platform/spi/cocoa/CGFontUnicodeSupport.h: Added for SPI call.
+
 2014-09-28  Christophe Dumez  <[email protected]>
 
         Automatically generate template specializations for most Elements

Modified: trunk/Source/WebCore/WebCore.exp.in (174051 => 174052)


--- trunk/Source/WebCore/WebCore.exp.in	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-09-29 03:42:38 UTC (rev 174052)
@@ -2384,7 +2384,6 @@
 _wkGetBytesFromAXTextMarker
 _wkGetFontInLanguageForCharacter
 _wkGetFontInLanguageForRange
-_wkGetGlyphsForCharacters
 _wkGetHyphenationLocationBeforeIndex
 _wkGetNSEventKeyChar
 _wkGetNSURLResponseCalculatedExpiration

Modified: trunk/Source/WebCore/WebCore.order (174051 => 174052)


--- trunk/Source/WebCore/WebCore.order	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebCore/WebCore.order	2014-09-29 03:42:38 UTC (rev 174052)
@@ -30627,7 +30627,6 @@
 _wkSetCONNECTProxyForStream
 _wkSetCONNECTProxyAuthorizationForStream
 _wkCopyCONNECTProxyResponse
-_wkGetGlyphsForCharacters
 _wkGetVerticalGlyphsForCharacters
 _wkCreateCTLineWithUniCharProvider
 _wkCTFontTransformGlyphs

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (174051 => 174052)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-09-29 03:42:38 UTC (rev 174052)
@@ -960,6 +960,7 @@
 		1CF6BDFB0E9BB26A0025E1CD /* ObjCEventListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CF6BDF90E9BB26A0025E1CD /* ObjCEventListener.mm */; };
 		1CF6BE140E9BB4670025E1CD /* ObjCNodeFilterCondition.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CF6BE120E9BB4670025E1CD /* ObjCNodeFilterCondition.mm */; };
 		1CF6BE150E9BB4670025E1CD /* ObjCNodeFilterCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CF6BE130E9BB4670025E1CD /* ObjCNodeFilterCondition.h */; };
+		1CF7E26F19D8839800DD8F98 /* CGFontUnicodeSupportSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CF7E26E19D881EF00DD8F98 /* CGFontUnicodeSupportSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1CFAE3230A6D6A3F0032593D /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CFAE3220A6D6A3F0032593D /* libobjc.dylib */; };
 		1F3C3BEA135CAF3C00B8C1AC /* MediaControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C3BE8135CAF3C00B8C1AC /* MediaControls.cpp */; };
 		1F3C3BEB135CAF3C00B8C1AC /* MediaControls.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C3BE9135CAF3C00B8C1AC /* MediaControls.h */; };
@@ -7922,6 +7923,7 @@
 		1CF6BDF90E9BB26A0025E1CD /* ObjCEventListener.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ObjCEventListener.mm; sourceTree = "<group>"; };
 		1CF6BE120E9BB4670025E1CD /* ObjCNodeFilterCondition.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ObjCNodeFilterCondition.mm; sourceTree = "<group>"; };
 		1CF6BE130E9BB4670025E1CD /* ObjCNodeFilterCondition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjCNodeFilterCondition.h; sourceTree = "<group>"; };
+		1CF7E26E19D881EF00DD8F98 /* CGFontUnicodeSupportSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CGFontUnicodeSupportSPI.h; sourceTree = "<group>"; };
 		1CFAE3220A6D6A3F0032593D /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = "<absolute>"; };
 		1F3C3BE8135CAF3C00B8C1AC /* MediaControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaControls.cpp; sourceTree = "<group>"; };
 		1F3C3BE9135CAF3C00B8C1AC /* MediaControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControls.h; sourceTree = "<group>"; };
@@ -16178,6 +16180,7 @@
 			isa = PBXGroup;
 			children = (
 				653EF83819A043AE0052202C /* NSURLFileTypeMappingsSPI.h */,
+				1CF7E26E19D881EF00DD8F98 /* CGFontUnicodeSupportSPI.h */,
 			);
 			path = cocoa;
 			sourceTree = "<group>";
@@ -23671,6 +23674,7 @@
 				FE456F191677D74E005EDDF9 /* DatabaseManager.h in Headers */,
 				97BC6A331505F081001B74AC /* DatabaseManagerClient.h in Headers */,
 				FEAF6654167970320062D0C5 /* DatabaseServer.h in Headers */,
+				1CF7E26F19D8839800DD8F98 /* CGFontUnicodeSupportSPI.h in Headers */,
 				FEDEF84216797108000E444A /* DatabaseStrategy.h in Headers */,
 				97BC6A2B1505F081001B74AC /* DatabaseSync.h in Headers */,
 				97BC6A2E1505F081001B74AC /* DatabaseTask.h in Headers */,

Modified: trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp (174051 => 174052)


--- trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp	2014-09-29 03:42:38 UTC (rev 174052)
@@ -29,6 +29,7 @@
 #include "config.h"
 #include "GlyphPageTreeNode.h"
 
+#include "CGFontUnicodeSupportSPI.h"
 #include "Font.h"
 #include "SimpleFontData.h"
 #include "WebCoreSystemInterface.h"
@@ -69,16 +70,11 @@
 
     Vector<CGGlyph, 512> glyphs(bufferLength);
     if (!shouldUseCoreText(buffer, bufferLength, fontData)) {
-#if !PLATFORM(IOS)
-        wkGetGlyphsForCharacters(fontData->platformData().cgFont(), buffer, glyphs.data(), bufferLength);
-#else
         // We pass in either 256 or 512 UTF-16 characters: 256 for U+FFFF and less, 512 (double character surrogates)
         // for U+10000 and above. It is indeed possible to get back 512 glyphs back from the API, so the glyph buffer
         // we pass in must be 512. If we get back more than 256 glyphs though we'll ignore all the ones after 256,
         // this should not happen as the only time we pass in 512 characters is when they are surrogates.
-        // FIXME: Use wkGetGlyphsForCharacters() instead of CGFontGetGlyphsForUnichars() once we update WebKit System Interface on iOS.
         CGFontGetGlyphsForUnichars(fontData->platformData().cgFont(), buffer, glyphs.data(), bufferLength);
-#endif
         for (unsigned i = 0; i < length; ++i) {
             if (!glyphs[i])
                 setGlyphDataForIndex(offset + i, 0, 0);

Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (174051 => 174052)


--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h	2014-09-29 03:42:38 UTC (rev 174052)
@@ -225,7 +225,6 @@
 extern void (*wkSetCONNECTProxyAuthorizationForStream)(CFReadStreamRef, CFStringRef proxyAuthorizationString);
 extern CFHTTPMessageRef (*wkCopyCONNECTProxyResponse)(CFReadStreamRef, CFURLRef responseURL, CFStringRef proxyHost, CFNumberRef proxyPort);
 
-extern void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
 extern bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGlyph[], size_t);
 
 extern BOOL (*wkUseSharedMediaUI)();

Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (174051 => 174052)


--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm	2014-09-29 03:42:38 UTC (rev 174052)
@@ -104,7 +104,6 @@
 void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRequestRef);
 #endif
 
-void (*wkGetGlyphsForCharacters)(CGFontRef, const UniChar[], CGGlyph[], size_t);
 bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGlyph[], size_t);
 
 void* wkGetHyphenationLocationBeforeIndex;

Added: trunk/Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h (0 => 174052)


--- trunk/Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h	2014-09-29 03:42:38 UTC (rev 174052)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2014 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 CGFontUnicodeSupportSPI_h
+#define CGFontUnicodeSupportSPI_h
+
+#include <CoreGraphics/CoreGraphics.h>
+
+#if USE(APPLE_INTERNAL_SDK)
+#include <CoreGraphics/CGFontUnicodeSupport.h>
+#endif
+
+extern "C" void CGFontGetGlyphsForUnichars(CGFontRef font, const UniChar u[], CGGlyph glyphs[], size_t count);
+
+#endif

Modified: trunk/Source/WebKit/ChangeLog (174051 => 174052)


--- trunk/Source/WebKit/ChangeLog	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebKit/ChangeLog	2014-09-29 03:42:38 UTC (rev 174052)
@@ -1,3 +1,16 @@
+2014-09-28  Myles C. Maxfield  <[email protected]>
+
+        Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
+        https://bugs.webkit.org/show_bug.cgi?id=137197
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests because there is no behavior change.
+
+        * mac/WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        * WebKit.order:
+
 2014-09-25  Brent Fulgham  <[email protected]>
 
         [Win] 64-bit build fix after r173929.

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (174051 => 174052)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm	2014-09-29 03:42:38 UTC (rev 174052)
@@ -123,9 +123,6 @@
     INIT(QTClearMediaDownloadCache);
 #endif
 
-#if !PLATFORM(IOS)
-    INIT(GetGlyphsForCharacters);
-#endif
     INIT(GetVerticalGlyphsForCharacters);
 #if PLATFORM(IOS)
     INIT(ExecutableWasLinkedOnOrAfterIOSVersion);

Modified: trunk/Source/WebKit/mac/WebKit.order (174051 => 174052)


--- trunk/Source/WebKit/mac/WebKit.order	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebKit/mac/WebKit.order	2014-09-29 03:42:38 UTC (rev 174052)
@@ -603,7 +603,6 @@
 __ZN20WebFrameLoaderClient29dispatchDidFinishDocumentLoadEv
 __ZN20WebFrameLoaderClient29dispatchDidHandleOnloadEventsEv
 _WKSetUpFontCache
-_WKGetGlyphsForCharacters
 _WKGetGlyphTransformedAdvances
 _WKCTFontTransformGlyphs
 __ZN20WebFrameLoaderClient17dispatchDidLayoutEj

Modified: trunk/Source/WebKit2/ChangeLog (174051 => 174052)


--- trunk/Source/WebKit2/ChangeLog	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebKit2/ChangeLog	2014-09-29 03:42:38 UTC (rev 174052)
@@ -1,3 +1,16 @@
+2014-09-28  Myles C. Maxfield  <[email protected]>
+
+        Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
+        https://bugs.webkit.org/show_bug.cgi?id=137197
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests because there is no behavior change.
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        * mac/WebKit2.order:
+
 2014-09-28  Gyuyoung Kim  <[email protected]>
 
         Use std::unique_ptr for ContextMenuController

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (174051 => 174052)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm	2014-09-29 03:42:38 UTC (rev 174052)
@@ -63,7 +63,6 @@
         INIT(DrawMediaUIPart);
         INIT(GetFontInLanguageForCharacter);
         INIT(GetFontInLanguageForRange);
-        INIT(GetGlyphsForCharacters);
 #endif
         INIT(GetVerticalGlyphsForCharacters);
         INIT(GetHTTPRequestPriority);

Modified: trunk/Source/WebKit2/mac/WebKit2.order (174051 => 174052)


--- trunk/Source/WebKit2/mac/WebKit2.order	2014-09-29 03:02:01 UTC (rev 174051)
+++ trunk/Source/WebKit2/mac/WebKit2.order	2014-09-29 03:42:38 UTC (rev 174052)
@@ -827,7 +827,6 @@
 __ZN6WebKit6WebURLD0Ev
 _WKIconDatabaseTryGetCGImageForURL
 __ZN6WebKit15WebIconDatabase15imageForPageURLERKN3WTF6StringERKN7WebCore7IntSizeE
-_WKGetGlyphsForCharacters
 _WKGetGlyphTransformedAdvances
 _WKCTFontTransformGlyphs
 _WKURLCreateWithCFURL
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to