Move CTFontTransformGlyphs out from WKSI
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Nov 2014 18:59:53 +0000 (18:59 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Nov 2014 18:59:53 +0000 (18:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138599

Reviewed by Simon Fraser.

Source/WebCore:

No new tests because there is no behavior change.

* WebCore.exp.in:
* WebCore.order:
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::applyTransforms):
* platform/graphics/SimpleFontData.h:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreTextSPI.h:

Source/WebKit/mac:

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

Source/WebKit2:

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175960 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.order
Source/WebCore/platform/graphics/SimpleFontData.cpp
Source/WebCore/platform/graphics/SimpleFontData.h
Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/spi/cocoa/CoreTextSPI.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit/mac/WebKit.order
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
Source/WebKit2/mac/WebKit2.order

index a9168f6..989fc64 100644 (file)
@@ -1,3 +1,22 @@
+2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Move CTFontTransformGlyphs out from WKSI
+        https://bugs.webkit.org/show_bug.cgi?id=138599
+
+        Reviewed by Simon Fraser.
+
+        No new tests because there is no behavior change.
+
+        * WebCore.exp.in:
+        * WebCore.order:
+        * platform/graphics/SimpleFontData.cpp:
+        (WebCore::SimpleFontData::applyTransforms):
+        * platform/graphics/SimpleFontData.h:
+        * platform/ios/WebCoreSystemInterfaceIOS.mm:
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+        * platform/spi/cocoa/CoreTextSPI.h:
+
 2014-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create()
index eb0d730..4c595fa 100644 (file)
@@ -2881,7 +2881,6 @@ __ZN7WebCore23wrapSerializedCryptoKeyERKN3WTF6VectorIhLm0ENS0_15CrashOnOverflowE
 __ZN7WebCore25unwrapSerializedCryptoKeyERKN3WTF6VectorIhLm0ENS0_15CrashOnOverflowEEES5_RS3_
 __ZN7WebCore28getDefaultWebCryptoMasterKeyERN3WTF6VectorIhLm0ENS0_15CrashOnOverflowEEE
 __ZTVN7WebCore16DiskCacheMonitorE
-_wkCTFontTransformGlyphs
 #endif
 
 #if ENABLE(3D_RENDERING)
index c224b9f..7af6df2 100644 (file)
@@ -30591,7 +30591,6 @@ _wkSetCONNECTProxyAuthorizationForStream
 _wkCopyCONNECTProxyResponse
 _wkGetVerticalGlyphsForCharacters
 _wkCreateCTLineWithUniCharProvider
-_wkCTFontTransformGlyphs
 _wkCreateCTTypesetterWithUniCharProviderAndOptions
 _wkIOSurfaceContextCreate
 _wkIOSurfaceContextCreateImage
index 873e91c..9e09b45 100644 (file)
@@ -30,6 +30,9 @@
 #include "config.h"
 #include "SimpleFontData.h"
 
+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
+#include "CoreTextSPI.h"
+#endif
 #include "Font.h"
 #include "FontCache.h"
 #include "OpenTypeMathData.h"
@@ -309,4 +312,20 @@ PassRefPtr<SimpleFontData> SimpleFontData::createScaledFontData(const FontDescri
     return platformCreateScaledFontData(fontDescription, scaleFactor);
 }
 
+bool SimpleFontData::applyTransforms(GlyphBufferGlyph* glyphs, GlyphBufferAdvance* advances, size_t glyphCount, TypesettingFeatures typesettingFeatures) const
+{
+    // We need to handle transforms on SVG fonts internally, since they are rendered internally.
+    ASSERT(!isSVGFont());
+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
+    CTFontTransformOptions options = (typesettingFeatures & Kerning ? kCTFontTransformApplyPositioning : 0) | (typesettingFeatures & Ligatures ? kCTFontTransformApplyShaping : 0);
+    return CTFontTransformGlyphs(m_platformData.ctFont(), glyphs, reinterpret_cast<CGSize*>(advances), glyphCount, options);
+#else
+    UNUSED_PARAM(glyphs);
+    UNUSED_PARAM(advances);
+    UNUSED_PARAM(glyphCount);
+    UNUSED_PARAM(typesettingFeatures);
+    return false;
+#endif
+}
+
 } // namespace WebCore
index e123451..2745276 100644 (file)
@@ -216,21 +216,7 @@ public:
     bool canRenderCombiningCharacterSequence(const UChar*, size_t) const;
 #endif
 
-    bool applyTransforms(GlyphBufferGlyph* glyphs, GlyphBufferAdvance* advances, size_t glyphCount, TypesettingFeatures typesettingFeatures) const
-    {
-        // We need to handle transforms on SVG fonts internally, since they are rendered internally.
-        ASSERT(!isSVGFont());
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
-        wkCTFontTransformOptions options = (typesettingFeatures & Kerning ? wkCTFontTransformApplyPositioning : 0) | (typesettingFeatures & Ligatures ? wkCTFontTransformApplyShaping : 0);
-        return wkCTFontTransformGlyphs(m_platformData.ctFont(), glyphs, reinterpret_cast<CGSize*>(advances), glyphCount, options);
-#else
-        UNUSED_PARAM(glyphs);
-        UNUSED_PARAM(advances);
-        UNUSED_PARAM(glyphCount);
-        UNUSED_PARAM(typesettingFeatures);
-        return false;
-#endif
-    }
+    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t glyphCount, TypesettingFeatures) const;
 
 #if PLATFORM(WIN)
     bool isSystemFont() const { return m_isSystemFont; }
index 9dbbc25..8c33ce8 100644 (file)
@@ -73,7 +73,6 @@ WEBCORE_EXPORT void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMuta
 
 WEBCORE_EXPORT bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGlyph[], size_t);
 WEBCORE_EXPORT CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
-WEBCORE_EXPORT bool (*wkCTFontTransformGlyphs)(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, wkCTFontTransformOptions options);
 
 WEBCORE_EXPORT CGSize (*wkCTRunGetInitialAdvance)(CTRunRef);
 
index 1bf83c4..9491f4f 100644 (file)
@@ -236,17 +236,6 @@ extern void* wkGetHyphenationLocationBeforeIndex;
 
 extern CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
-enum {
-    wkCTFontTransformApplyShaping = (1 << 0),
-    wkCTFontTransformApplyPositioning = (1 << 1)
-};
-
-typedef int wkCTFontTransformOptions;
-
-extern bool (*wkCTFontTransformGlyphs)(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, wkCTFontTransformOptions options);
-#endif
-
 extern CTTypesetterRef (*wkCreateCTTypesetterWithUniCharProviderAndOptions)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
 
 extern CGSize (*wkCTRunGetInitialAdvance)(CTRunRef);
index 8ffb086..b118b36 100644 (file)
@@ -109,9 +109,6 @@ bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGlyph[],
 void* wkGetHyphenationLocationBeforeIndex;
 
 CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
-bool (*wkCTFontTransformGlyphs)(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, wkCTFontTransformOptions options);
-#endif
 
 CGSize (*wkCTRunGetInitialAdvance)(CTRunRef);
 
index a7c6567..fd5553b 100644 (file)
 #include <CoreText/CoreText.h>
 
 #if USE(APPLE_INTERNAL_SDK)
+#include <CoreText/CTFontPriv.h>
 #include <CoreText/CTLinePriv.h>
 #endif
 
+extern "C" {
+
 typedef const UniChar* (*CTUniCharProviderCallback)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void* refCon);
 typedef void (*CTUniCharDisposeCallback)(const UniChar* chars, void* refCon);
 
-extern "C" {
+#if !USE(APPLE_INTERNAL_SDK)
+typedef CF_OPTIONS(uint32_t, CTFontTransformOptions)
+{
+    kCTFontTransformApplyShaping = (1 << 0),
+    kCTFontTransformApplyPositioning = (1 << 1)
+};
+#endif
 
 CGSize CTRunGetInitialAdvance(CTRunRef run);
 CTLineRef CTLineCreateWithUniCharProvider(CTUniCharProviderCallback provide, CTUniCharDisposeCallback dispose, void* refCon);
 CTTypesetterRef CTTypesetterCreateWithUniCharProviderAndOptions(CTUniCharProviderCallback provide, CTUniCharDisposeCallback dispose, void* refCon, CFDictionaryRef options);
+bool CTFontTransformGlyphs(CTFontRef, CGGlyph glyphs[], CGSize advances[], CFIndex count, CTFontTransformOptions);
 
 }
 
index 1852825..36490f3 100644 (file)
@@ -1,3 +1,14 @@
+2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Move CTFontTransformGlyphs out from WKSI
+        https://bugs.webkit.org/show_bug.cgi?id=138599
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        * WebKit.order:
+
 2014-11-11  Dan Bernstein  <mitz@apple.com>
 
         More iOS build fix.
index 8b2509d..491bb51 100644 (file)
@@ -54,9 +54,6 @@ void InitWebCoreSystemInterface(void)
 #if !PLATFORM(IOS)
     INIT(CGContextDrawsWithCorrectShadowOffsets);
 #endif
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
-    INIT(CTFontTransformGlyphs);
-#endif
     INIT(CopyCONNECTProxyResponse);
     INIT(CopyNSURLResponseStatusLine);
     INIT(CopyNSURLResponseCertificateChain);
index 1fac509..be2a16a 100644 (file)
@@ -604,7 +604,6 @@ __ZN20WebFrameLoaderClient29dispatchDidFinishDocumentLoadEv
 __ZN20WebFrameLoaderClient29dispatchDidHandleOnloadEventsEv
 _WKSetUpFontCache
 _WKGetGlyphTransformedAdvances
-_WKCTFontTransformGlyphs
 __ZN20WebFrameLoaderClient17dispatchDidLayoutEj
 __ZN20WebFrameLoaderClient21dispatchDidFinishLoadEv
 -[WebView(WebPrivate) _didFinishLoadForFrame:]
index 0ccd740..b981d62 100644 (file)
@@ -1,3 +1,14 @@
+2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Move CTFontTransformGlyphs out from WKSI
+        https://bugs.webkit.org/show_bug.cgi?id=138599
+
+        Reviewed by Simon Fraser.
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        * mac/WebKit2.order:
+
 2014-11-10  Simon Fraser  <simon.fraser@apple.com>
 
         Fix possible crash when closing the web inspector
index da3dc95..1dd821f 100644 (file)
@@ -46,9 +46,6 @@ void InitWebCoreSystemInterface(void)
 #if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
         INIT(CGContextDrawsWithCorrectShadowOffsets);
 #endif
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
-        INIT(CTFontTransformGlyphs);
-#endif
         INIT(CopyCONNECTProxyResponse);
         INIT(CopyNSURLResponseStatusLine);
         INIT(CopyNSURLResponseCertificateChain);
index 6fbc354..c5b9561 100644 (file)
@@ -828,7 +828,6 @@ __ZN6WebKit6WebURLD0Ev
 _WKIconDatabaseTryGetCGImageForURL
 __ZN6WebKit15WebIconDatabase15imageForPageURLERKN3WTF6StringERKN7WebCore7IntSizeE
 _WKGetGlyphTransformedAdvances
-_WKCTFontTransformGlyphs
 _WKURLCreateWithCFURL
 _WKUInt64Create
 _WKContextPostMessageToInjectedBundle