⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 175960 in webkit


Ignore:
Timestamp:
Nov 11, 2014, 10:59:53 AM (12 years ago)
Author:
mmaxfield@apple.com
Message:

Move CTFontTransformGlyphs out from WKSI
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:
Location:
trunk/Source
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r175953 r175960  
     12014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Move CTFontTransformGlyphs out from WKSI
     4        https://bugs.webkit.org/show_bug.cgi?id=138599
     5
     6        Reviewed by Simon Fraser.
     7
     8        No new tests because there is no behavior change.
     9
     10        * WebCore.exp.in:
     11        * WebCore.order:
     12        * platform/graphics/SimpleFontData.cpp:
     13        (WebCore::SimpleFontData::applyTransforms):
     14        * platform/graphics/SimpleFontData.h:
     15        * platform/ios/WebCoreSystemInterfaceIOS.mm:
     16        * platform/mac/WebCoreSystemInterface.h:
     17        * platform/mac/WebCoreSystemInterface.mm:
     18        * platform/spi/cocoa/CoreTextSPI.h:
     19
    1202014-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    221
  • trunk/Source/WebCore/WebCore.exp.in

    r175842 r175960  
    28822882__ZN7WebCore28getDefaultWebCryptoMasterKeyERN3WTF6VectorIhLm0ENS0_15CrashOnOverflowEEE
    28832883__ZTVN7WebCore16DiskCacheMonitorE
    2884 _wkCTFontTransformGlyphs
    28852884#endif
    28862885
  • trunk/Source/WebCore/WebCore.order

    r174995 r175960  
    3059230592_wkGetVerticalGlyphsForCharacters
    3059330593_wkCreateCTLineWithUniCharProvider
    30594 _wkCTFontTransformGlyphs
    3059530594_wkCreateCTTypesetterWithUniCharProviderAndOptions
    3059630595_wkIOSurfaceContextCreate
  • trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp

    r174858 r175960  
    3131#include "SimpleFontData.h"
    3232
     33#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
     34#include "CoreTextSPI.h"
     35#endif
    3336#include "Font.h"
    3437#include "FontCache.h"
     
    310313}
    311314
     315bool SimpleFontData::applyTransforms(GlyphBufferGlyph* glyphs, GlyphBufferAdvance* advances, size_t glyphCount, TypesettingFeatures typesettingFeatures) const
     316{
     317    // We need to handle transforms on SVG fonts internally, since they are rendered internally.
     318    ASSERT(!isSVGFont());
     319#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
     320    CTFontTransformOptions options = (typesettingFeatures & Kerning ? kCTFontTransformApplyPositioning : 0) | (typesettingFeatures & Ligatures ? kCTFontTransformApplyShaping : 0);
     321    return CTFontTransformGlyphs(m_platformData.ctFont(), glyphs, reinterpret_cast<CGSize*>(advances), glyphCount, options);
     322#else
     323    UNUSED_PARAM(glyphs);
     324    UNUSED_PARAM(advances);
     325    UNUSED_PARAM(glyphCount);
     326    UNUSED_PARAM(typesettingFeatures);
     327    return false;
     328#endif
     329}
     330
    312331} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/SimpleFontData.h

    r174858 r175960  
    217217#endif
    218218
    219     bool applyTransforms(GlyphBufferGlyph* glyphs, GlyphBufferAdvance* advances, size_t glyphCount, TypesettingFeatures typesettingFeatures) const
    220     {
    221         // We need to handle transforms on SVG fonts internally, since they are rendered internally.
    222         ASSERT(!isSVGFont());
    223 #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
    224         wkCTFontTransformOptions options = (typesettingFeatures & Kerning ? wkCTFontTransformApplyPositioning : 0) | (typesettingFeatures & Ligatures ? wkCTFontTransformApplyShaping : 0);
    225         return wkCTFontTransformGlyphs(m_platformData.ctFont(), glyphs, reinterpret_cast<CGSize*>(advances), glyphCount, options);
    226 #else
    227         UNUSED_PARAM(glyphs);
    228         UNUSED_PARAM(advances);
    229         UNUSED_PARAM(glyphCount);
    230         UNUSED_PARAM(typesettingFeatures);
    231         return false;
    232 #endif
    233     }
     219    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t glyphCount, TypesettingFeatures) const;
    234220
    235221#if PLATFORM(WIN)
  • trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm

    r175750 r175960  
    7474WEBCORE_EXPORT bool (*wkGetVerticalGlyphsForCharacters)(CTFontRef, const UniChar[], CGGlyph[], size_t);
    7575WEBCORE_EXPORT CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
    76 WEBCORE_EXPORT bool (*wkCTFontTransformGlyphs)(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, wkCTFontTransformOptions options);
    7776
    7877WEBCORE_EXPORT CGSize (*wkCTRunGetInitialAdvance)(CTRunRef);
  • trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h

    r175814 r175960  
    237237extern CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
    238238
    239 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    240 enum {
    241     wkCTFontTransformApplyShaping = (1 << 0),
    242     wkCTFontTransformApplyPositioning = (1 << 1)
    243 };
    244 
    245 typedef int wkCTFontTransformOptions;
    246 
    247 extern bool (*wkCTFontTransformGlyphs)(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, wkCTFontTransformOptions options);
    248 #endif
    249 
    250239extern CTTypesetterRef (*wkCreateCTTypesetterWithUniCharProviderAndOptions)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
    251240
  • trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm

    r175814 r175960  
    110110
    111111CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
    112 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    113 bool (*wkCTFontTransformGlyphs)(CTFontRef font, CGGlyph glyphs[], CGSize advances[], CFIndex count, wkCTFontTransformOptions options);
    114 #endif
    115112
    116113CGSize (*wkCTRunGetInitialAdvance)(CTRunRef);
  • trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h

    r175379 r175960  
    3030
    3131#if USE(APPLE_INTERNAL_SDK)
     32#include <CoreText/CTFontPriv.h>
    3233#include <CoreText/CTLinePriv.h>
    3334#endif
     35
     36extern "C" {
    3437
    3538typedef const UniChar* (*CTUniCharProviderCallback)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void* refCon);
    3639typedef void (*CTUniCharDisposeCallback)(const UniChar* chars, void* refCon);
    3740
    38 extern "C" {
     41#if !USE(APPLE_INTERNAL_SDK)
     42typedef CF_OPTIONS(uint32_t, CTFontTransformOptions)
     43{
     44    kCTFontTransformApplyShaping = (1 << 0),
     45    kCTFontTransformApplyPositioning = (1 << 1)
     46};
     47#endif
    3948
    4049CGSize CTRunGetInitialAdvance(CTRunRef run);
    4150CTLineRef CTLineCreateWithUniCharProvider(CTUniCharProviderCallback provide, CTUniCharDisposeCallback dispose, void* refCon);
    4251CTTypesetterRef CTTypesetterCreateWithUniCharProviderAndOptions(CTUniCharProviderCallback provide, CTUniCharDisposeCallback dispose, void* refCon, CFDictionaryRef options);
     52bool CTFontTransformGlyphs(CTFontRef, CGGlyph glyphs[], CGSize advances[], CFIndex count, CTFontTransformOptions);
    4353
    4454}
  • trunk/Source/WebKit/mac/ChangeLog

    r175956 r175960  
     12014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Move CTFontTransformGlyphs out from WKSI
     4        https://bugs.webkit.org/show_bug.cgi?id=138599
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebCoreSupport/WebSystemInterface.mm:
     9        (InitWebCoreSystemInterface):
     10        * WebKit.order:
     11
    1122014-11-11  Dan Bernstein  <mitz@apple.com>
    213
  • trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm

    r175814 r175960  
    5555    INIT(CGContextDrawsWithCorrectShadowOffsets);
    5656#endif
    57 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    58     INIT(CTFontTransformGlyphs);
    59 #endif
    6057    INIT(CopyCONNECTProxyResponse);
    6158    INIT(CopyNSURLResponseStatusLine);
  • trunk/Source/WebKit/mac/WebKit.order

    r174052 r175960  
    605605_WKSetUpFontCache
    606606_WKGetGlyphTransformedAdvances
    607 _WKCTFontTransformGlyphs
    608607__ZN20WebFrameLoaderClient17dispatchDidLayoutEj
    609608__ZN20WebFrameLoaderClient21dispatchDidFinishLoadEv
  • trunk/Source/WebKit2/ChangeLog

    r175851 r175960  
     12014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Move CTFontTransformGlyphs out from WKSI
     4        https://bugs.webkit.org/show_bug.cgi?id=138599
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
     9        (InitWebCoreSystemInterface):
     10        * mac/WebKit2.order:
     11
    1122014-11-10  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm

    r175814 r175960  
    4747        INIT(CGContextDrawsWithCorrectShadowOffsets);
    4848#endif
    49 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    50         INIT(CTFontTransformGlyphs);
    51 #endif
    5249        INIT(CopyCONNECTProxyResponse);
    5350        INIT(CopyNSURLResponseStatusLine);
  • trunk/Source/WebKit2/mac/WebKit2.order

    r174052 r175960  
    829829__ZN6WebKit15WebIconDatabase15imageForPageURLERKN3WTF6StringERKN7WebCore7IntSizeE
    830830_WKGetGlyphTransformedAdvances
    831 _WKCTFontTransformGlyphs
    832831_WKURLCreateWithCFURL
    833832_WKUInt64Create
Note: See TracChangeset for help on using the changeset viewer.