Changeset 123181 in webkit
- Timestamp:
- Jul 19, 2012, 11:01:10 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r123175 r123181 1 2012-07-19 Dan Bernstein <mitz@apple.com> 2 3 The ATSUI-based complex text code is unused 4 https://bugs.webkit.org/show_bug.cgi?id=91816 5 6 Reviewed by Sam Weinig. 7 8 Removed definitions of WTF_USE_ATSUI and WTF_USE_CORE_TEXT. 9 10 * wtf/Platform.h: 11 1 12 2012-07-19 Wei James <james.wei@intel.com> 2 13 -
trunk/Source/WTF/wtf/Platform.h
r123161 r123181 467 467 #if OS(DARWIN) 468 468 #define WTF_USE_SKIA 1 469 #define WTF_USE_ATSUI 0470 #define WTF_USE_CORE_TEXT 1471 469 #define WTF_USE_ICCJPEG 1 472 470 #define WTF_USE_QCMSLIB 1 … … 645 643 #if OS(DARWIN) 646 644 #define WTF_USE_CF 1 647 #define WTF_USE_CORE_TEXT 1648 645 #define ENABLE_WEB_ARCHIVE 1 649 646 #endif … … 998 995 #endif 999 996 1000 #if PLATFORM(MAC)1001 /* Complex text framework */1002 #define WTF_USE_ATSUI 01003 #define WTF_USE_CORE_TEXT 11004 #endif1005 1006 997 /* Accelerated compositing */ 1007 998 #if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) -
trunk/Source/WebCore/ChangeLog
r123180 r123181 1 2012-07-19 Dan Bernstein <mitz@apple.com> 2 3 The ATSUI-based complex text code is unused 4 https://bugs.webkit.org/show_bug.cgi?id=91816 5 6 Reviewed by Sam Weinig. 7 8 * WebCore.gypi: Removed references to the files deleted in this change. 9 * WebCore.xcodeproj/project.pbxproj: Ditto. 10 * platform/graphics/FontCache.h: 11 (FontCache): Replaced USE(CORE_TEXT) with PLATFORM(MAC) || PLATFORM(CHROMIUM) && OS(DARWIN). 12 * platform/graphics/SimpleFontData.h: 13 (SimpleFontData): Removed USE(ATSUI)-only code, replaced USE(CORE_TEXT) with 14 (PLATFORM(CHROMIUM) && OS(DARWIN)). 15 * platform/graphics/mac/ComplexTextController.cpp: Removed USE(ATSUI)-only code. Moved 16 collectComplexTextRunsForCharacters() and the ComplexTextRun constructor out of this file. 17 * platform/graphics/mac/ComplexTextController.h: Removed USE(ATSUI)-only code and removed 18 #if USE(CORE_TEXT) because anyone including this header is using Core Text. 19 * platform/graphics/mac/ComplexTextControllerATSUI.cpp: Removed. 20 * platform/graphics/mac/ComplexTextControllerCoreText.mm: 21 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moved from 22 ComplexTextController.cpp into this file and merged with createTextRunFromFontDataCoreText(). 23 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Moved from 24 ComplexTextController.cpp into this file and merged with 25 collectComplexTextRunsForCharactersCoreText(). 26 * platform/graphics/mac/SimpleFontDataATSUI.mm: Removed. 27 * platform/graphics/mac/SimpleFontDataMac.mm: 28 (WebCore::SimpleFontData::platformInit): Remove USE(ATSUI)-only code. 29 (WebCore::SimpleFontData::platformDestroy): Ditto. 30 * platform/text/mac/ShapeArabic.c: Removed. 31 * platform/text/mac/ShapeArabic.h: Removed. 32 1 33 2012-07-19 Kent Tamura <tkent@chromium.org> 2 34 -
trunk/Source/WebCore/WebCore.gypi
r123154 r123181 3789 3789 'platform/graphics/mac/ComplexTextController.cpp', 3790 3790 'platform/graphics/mac/ComplexTextController.h', 3791 'platform/graphics/mac/ComplexTextControllerATSUI.cpp',3792 3791 'platform/graphics/mac/ComplexTextControllerCoreText.mm', 3793 3792 'platform/graphics/mac/FloatPointMac.mm', … … 3809 3808 'platform/graphics/mac/MediaPlayerPrivateQTKit.h', 3810 3809 'platform/graphics/mac/MediaPlayerPrivateQTKit.mm', 3811 'platform/graphics/mac/SimpleFontDataATSUI.mm',3812 3810 'platform/graphics/mac/SimpleFontDataCoreText.cpp', 3813 3811 'platform/graphics/mac/SimpleFontDataMac.mm', … … 4446 4444 'platform/text/mac/LocalizedDateMac.cpp', 4447 4445 'platform/text/mac/LocalizedNumberMac.mm', 4448 'platform/text/mac/ShapeArabic.c',4449 'platform/text/mac/ShapeArabic.h',4450 4446 'platform/text/mac/StringImplMac.mm', 4451 4447 'platform/text/mac/StringMac.mm', -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r122824 r123181 352 352 15D17D22147231EB005EBCA6 /* InspectorFileSystemAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 15D17D1F147231EB005EBCA6 /* InspectorFileSystemAgent.h */; }; 353 353 163E88F7118A39D200ED9231 /* SimpleFontDataCoreText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 163E88F5118A39D200ED9231 /* SimpleFontDataCoreText.cpp */; }; 354 163E8B13118B3ADD00ED9231 /* SimpleFontDataATSUI.mm in Sources */ = {isa = PBXBuildFile; fileRef = 163E8B12118B3ADD00ED9231 /* SimpleFontDataATSUI.mm */; };355 354 185BCF280F3279CE000EA262 /* ThreadTimers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 185BCF260F3279CE000EA262 /* ThreadTimers.cpp */; }; 356 355 185BCF290F3279CE000EA262 /* ThreadTimers.h in Headers */ = {isa = PBXBuildFile; fileRef = 185BCF270F3279CE000EA262 /* ThreadTimers.h */; }; … … 993 992 37C236101097EE7700EF9F72 /* ComplexTextController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */; }; 994 993 37C236111097EE7700EF9F72 /* ComplexTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */; }; 995 37C238211098C84200EF9F72 /* ComplexTextControllerATSUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C2381F1098C84200EF9F72 /* ComplexTextControllerATSUI.cpp */; };996 994 37C238221098C84200EF9F72 /* ComplexTextControllerCoreText.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.mm */; }; 997 995 37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 4864 4862 B2AFFC800D00A5C10030074D /* FontMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC780D00A5C10030074D /* FontMac.mm */; }; 4865 4863 B2AFFC830D00A5C10030074D /* GlyphPageTreeNodeMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC7B0D00A5C10030074D /* GlyphPageTreeNodeMac.cpp */; }; 4866 B2AFFC930D00A5DF0030074D /* ShapeArabic.c in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC880D00A5DF0030074D /* ShapeArabic.c */; };4867 B2AFFC940D00A5DF0030074D /* ShapeArabic.h in Headers */ = {isa = PBXBuildFile; fileRef = B2AFFC890D00A5DF0030074D /* ShapeArabic.h */; };4868 4864 B2AFFC950D00A5DF0030074D /* StringImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC8A0D00A5DF0030074D /* StringImplMac.mm */; }; 4869 4865 B2AFFC960D00A5DF0030074D /* StringMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC8B0D00A5DF0030074D /* StringMac.mm */; }; … … 7336 7332 15D17D1F147231EB005EBCA6 /* InspectorFileSystemAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFileSystemAgent.h; sourceTree = "<group>"; }; 7337 7333 163E88F5118A39D200ED9231 /* SimpleFontDataCoreText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleFontDataCoreText.cpp; sourceTree = "<group>"; }; 7338 163E8B12118B3ADD00ED9231 /* SimpleFontDataATSUI.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleFontDataATSUI.mm; sourceTree = "<group>"; };7339 7334 185BCF260F3279CE000EA262 /* ThreadTimers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadTimers.cpp; sourceTree = "<group>"; }; 7340 7335 185BCF270F3279CE000EA262 /* ThreadTimers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadTimers.h; sourceTree = "<group>"; }; … … 8035 8030 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextController.cpp; sourceTree = "<group>"; }; 8036 8031 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComplexTextController.h; sourceTree = "<group>"; }; 8037 37C2381F1098C84200EF9F72 /* ComplexTextControllerATSUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextControllerATSUI.cpp; sourceTree = "<group>"; };8038 8032 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ComplexTextControllerCoreText.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 8039 8033 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypesettingFeatures.h; sourceTree = "<group>"; }; … … 12062 12056 B2AFFC860D00A5DF0030074D /* mac-encodings.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "mac-encodings.txt"; sourceTree = "<group>"; }; 12063 12057 B2AFFC870D00A5DF0030074D /* make-charset-table.pl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.perl; path = "make-charset-table.pl"; sourceTree = "<group>"; }; 12064 B2AFFC880D00A5DF0030074D /* ShapeArabic.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ShapeArabic.c; sourceTree = "<group>"; };12065 B2AFFC890D00A5DF0030074D /* ShapeArabic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ShapeArabic.h; sourceTree = "<group>"; };12066 12058 B2AFFC8A0D00A5DF0030074D /* StringImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = StringImplMac.mm; sourceTree = "<group>"; }; 12067 12059 B2AFFC8B0D00A5DF0030074D /* StringMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = StringMac.mm; sourceTree = "<group>"; }; … … 19575 19567 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */, 19576 19568 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */, 19577 37C2381F1098C84200EF9F72 /* ComplexTextControllerATSUI.cpp */,19578 19569 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.mm */, 19579 19570 49AF2D6B14435D210016A784 /* DisplayRefreshMonitorMac.cpp */, … … 19597 19588 E4B41E110CBF90EF00AF2ECE /* MediaPlayerPrivateQTKit.mm */, 19598 19589 0735EE690F40C5E4004A2604 /* MediaPlayerProxy.h */, 19599 163E8B12118B3ADD00ED9231 /* SimpleFontDataATSUI.mm */,19600 19590 163E88F5118A39D200ED9231 /* SimpleFontDataCoreText.cpp */, 19601 19591 B2AFFC770D00A5C10030074D /* SimpleFontDataMac.mm */, … … 19848 19838 B2AFFC860D00A5DF0030074D /* mac-encodings.txt */, 19849 19839 B2AFFC870D00A5DF0030074D /* make-charset-table.pl */, 19850 B2AFFC880D00A5DF0030074D /* ShapeArabic.c */,19851 B2AFFC890D00A5DF0030074D /* ShapeArabic.h */,19852 19840 B2AFFC8A0D00A5DF0030074D /* StringImplMac.mm */, 19853 19841 B2AFFC8B0D00A5DF0030074D /* StringMac.mm */, … … 24610 24598 A6D169641346B4C1000EB770 /* ShadowRoot.h in Headers */, 24611 24599 A80E6CE80A1989CA007FB8C5 /* ShadowValue.h in Headers */, 24612 B2AFFC940D00A5DF0030074D /* ShapeArabic.h in Headers */,24613 24600 1A4A954E0B4EDCCB002D8C3C /* SharedBuffer.h in Headers */, 24614 24601 97B1F02F13B025D200F5103F /* SharedBufferChunkReader.h in Headers */, … … 25762 25749 6550B6A1099DF0270090D781 /* Comment.cpp in Sources */, 25763 25750 37C236101097EE7700EF9F72 /* ComplexTextController.cpp in Sources */, 25764 37C238211098C84200EF9F72 /* ComplexTextControllerATSUI.cpp in Sources */,25765 25751 37C238221098C84200EF9F72 /* ComplexTextControllerCoreText.mm in Sources */, 25766 25752 4A6A0C5B15232F2400B09C6E /* ComposedShadowTreeWalker.cpp in Sources */, … … 27792 27778 A6D169621346B49B000EB770 /* ShadowRoot.cpp in Sources */, 27793 27779 A80E6CF40A1989CA007FB8C5 /* ShadowValue.cpp in Sources */, 27794 B2AFFC930D00A5DF0030074D /* ShapeArabic.c in Sources */,27795 27780 1A4A954D0B4EDCCB002D8C3C /* SharedBuffer.cpp in Sources */, 27796 27781 512DD8E30D91E2B4000F89EE /* SharedBufferCF.cpp in Sources */, … … 27802 27787 41D168ED10226E89009BC827 /* SharedWorkerThread.cpp in Sources */, 27803 27788 B2C3DA640D006CD600EF6F26 /* SimpleFontData.cpp in Sources */, 27804 163E8B13118B3ADD00ED9231 /* SimpleFontDataATSUI.mm in Sources */,27805 27789 163E88F7118A39D200ED9231 /* SimpleFontDataCoreText.cpp in Sources */, 27806 27790 B2AFFC7F0D00A5C10030074D /* SimpleFontDataMac.mm in Sources */, -
trunk/Source/WebCore/platform/graphics/FontCache.h
r115373 r123181 131 131 int m_purgePreventCount; 132 132 133 #if USE(CORE_TEXT) || OS(ANDROID)133 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) || OS(ANDROID) 134 134 friend class ComplexTextController; 135 135 #endif -
trunk/Source/WebCore/platform/graphics/SimpleFontData.h
r116238 r123181 37 37 #include <wtf/text/StringHash.h> 38 38 39 #if USE(ATSUI) 40 typedef struct OpaqueATSUStyle* ATSUStyle; 41 #endif 42 43 #if PLATFORM(MAC) || USE(CORE_TEXT) 39 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) 44 40 #include <wtf/RetainPtr.h> 45 41 #endif … … 177 173 #endif 178 174 179 #if PLATFORM(MAC) || USE(CORE_TEXT)175 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) 180 176 CFDictionaryRef getCFStringAttributes(TypesettingFeatures, FontOrientation) const; 181 #endif182 183 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))184 177 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; 185 #endif186 187 #if USE(ATSUI)188 void checkShapesArabic() const;189 bool shapesArabic() const190 {191 if (!m_checkedShapesArabic)192 checkShapesArabic();193 return m_shapesArabic;194 }195 178 #endif 196 179 … … 291 274 #endif 292 275 293 294 #if USE(ATSUI) 295 public: 296 mutable HashMap<unsigned, ATSUStyle> m_ATSUStyleMap; 297 mutable bool m_ATSUMirrors; 298 mutable bool m_checkedShapesArabic; 299 mutable bool m_shapesArabic; 300 301 private: 302 #endif 303 304 #if PLATFORM(MAC) || USE(CORE_TEXT) 276 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) 305 277 mutable HashMap<unsigned, RetainPtr<CFDictionaryRef> > m_CFStringAttributes; 306 #endif307 308 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))309 278 mutable OwnPtr<HashMap<String, bool> > m_combiningCharacterSequenceSupport; 310 279 #endif -
trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
r122674 r123181 33 33 #include <wtf/StdLibExtras.h> 34 34 #include <wtf/unicode/CharacterNames.h> 35 36 #if (PLATFORM(MAC) || PLATFORM(CHROMIUM)) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 105037 // Undefined when compiling agains the 10.5 SDK.38 #define kCTVersionNumber10_6 0x0003000039 #endif40 35 41 36 using namespace std; … … 317 312 } 318 313 319 #if USE(CORE_TEXT) && USE(ATSUI)320 static inline bool shouldUseATSUIAPI()321 {322 enum TypeRenderingAPIToUse { UnInitialized, UseATSUI, UseCoreText };323 static TypeRenderingAPIToUse apiToUse = UnInitialized;324 325 if (UNLIKELY(apiToUse == UnInitialized)) {326 if (&CTGetCoreTextVersion != 0 && CTGetCoreTextVersion() >= kCTVersionNumber10_6)327 apiToUse = UseCoreText;328 else329 apiToUse = UseATSUI;330 }331 332 return apiToUse == UseATSUI;333 }334 #endif335 336 314 CFIndex ComplexTextController::ComplexTextRun::indexAt(size_t i) const 337 315 { 338 #if USE(CORE_TEXT) && USE(ATSUI)339 return shouldUseATSUIAPI() ? m_atsuiIndices[i] : m_coreTextIndices[i];340 #elif USE(ATSUI)341 return m_atsuiIndices[i];342 #elif USE(CORE_TEXT)343 316 return m_coreTextIndices[i]; 344 #endif345 }346 347 void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, unsigned length, unsigned stringLocation, const SimpleFontData* fontData)348 {349 if (!fontData) {350 // Create a run of missing glyphs from the primary font.351 m_complexTextRuns.append(ComplexTextRun::create(m_font.primaryFont(), cp, stringLocation, length, m_run.ltr()));352 return;353 }354 355 #if USE(CORE_TEXT) && USE(ATSUI)356 if (shouldUseATSUIAPI())357 return collectComplexTextRunsForCharactersATSUI(cp, length, stringLocation, fontData);358 return collectComplexTextRunsForCharactersCoreText(cp, length, stringLocation, fontData);359 #elif USE(ATSUI)360 return collectComplexTextRunsForCharactersATSUI(cp, length, stringLocation, fontData);361 #elif USE(CORE_TEXT)362 return collectComplexTextRunsForCharactersCoreText(cp, length, stringLocation, fontData);363 #endif364 }365 366 ComplexTextController::ComplexTextRun::ComplexTextRun(const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr)367 : m_fontData(fontData)368 , m_characters(characters)369 , m_stringLocation(stringLocation)370 , m_stringLength(stringLength)371 , m_indexEnd(stringLength)372 , m_isMonotonic(true)373 {374 #if USE(CORE_TEXT) && USE(ATSUI)375 shouldUseATSUIAPI() ? createTextRunFromFontDataATSUI(ltr) : createTextRunFromFontDataCoreText(ltr);376 #elif USE(ATSUI)377 createTextRunFromFontDataATSUI(ltr);378 #elif USE(CORE_TEXT)379 createTextRunFromFontDataCoreText(ltr);380 #endif381 317 } 382 318 -
trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.h
r95391 r123181 36 36 typedef unsigned short CGGlyph; 37 37 38 #if USE(CORE_TEXT)39 38 typedef const struct __CTRun * CTRunRef; 40 39 typedef const struct __CTLine * CTLineRef; 41 #endif42 #if USE(ATSUI)43 typedef struct OpaqueATSUTextLayout* ATSUTextLayout;44 typedef struct ATSGlyphVector* ATSULineRef;45 typedef UInt32 ATSULayoutOperationSelector;46 typedef UInt32 ATSULayoutOperationCallbackStatus;47 #endif48 40 49 41 namespace WebCore { … … 55 47 // ComplexTextController is responsible for rendering and measuring glyphs for 56 48 // complex scripts on OS X. 57 // The underlying API can be selected at compile time based on USE(ATSUI) and58 // USE(CORE_TEXT). If both are defined then the Core Text APIs are used for59 // OS Versions >= 10.6, ATSUI is used otherwise.60 49 class ComplexTextController { 61 50 public: … … 85 74 class ComplexTextRun : public RefCounted<ComplexTextRun> { 86 75 public: 87 #if USE(CORE_TEXT)88 76 static PassRefPtr<ComplexTextRun> create(CTRunRef ctRun, const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, CFRange runRange) 89 77 { 90 78 return adoptRef(new ComplexTextRun(ctRun, fontData, characters, stringLocation, stringLength, runRange)); 91 79 } 92 #endif 93 #if USE(ATSUI) 94 static PassRefPtr<ComplexTextRun> create(ATSUTextLayout atsuTextLayout, const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr, bool directionalOverride) 95 { 96 return adoptRef(new ComplexTextRun(atsuTextLayout, fontData, characters, stringLocation, stringLength, ltr, directionalOverride)); 97 } 98 #endif 80 99 81 static PassRefPtr<ComplexTextRun> create(const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr) 100 82 { … … 116 98 117 99 private: 118 #if USE(CORE_TEXT)119 100 ComplexTextRun(CTRunRef, const SimpleFontData*, const UChar* characters, unsigned stringLocation, size_t stringLength, CFRange runRange); 120 void createTextRunFromFontDataCoreText(bool ltr);121 #endif122 #if USE(ATSUI)123 ComplexTextRun(ATSUTextLayout, const SimpleFontData*, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr, bool directionalOverride);124 void createTextRunFromFontDataATSUI(bool ltr);125 #endif126 101 ComplexTextRun(const SimpleFontData*, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr); 127 128 #if USE(ATSUI)129 static OSStatus overrideLayoutOperation(ATSULayoutOperationSelector, ATSULineRef, URefCon, void*, ATSULayoutOperationCallbackStatus*);130 #endif131 102 132 103 unsigned m_glyphCount; … … 135 106 unsigned m_stringLocation; 136 107 size_t m_stringLength; 137 #if USE(CORE_TEXT)138 108 Vector<CFIndex, 64> m_coreTextIndicesVector; 139 109 const CFIndex* m_coreTextIndices; 140 #endif141 #if USE(ATSUI)142 Vector<CFIndex, 64> m_atsuiIndices;143 #endif144 110 CFIndex m_indexEnd; 145 111 Vector<CFIndex, 64> m_glyphEndOffsets; … … 148 114 Vector<CGSize, 64> m_advancesVector; 149 115 const CGSize* m_advances; 150 #if USE(ATSUI)151 bool m_directionalOverride;152 #endif153 116 bool m_isMonotonic; 154 117 }; … … 156 119 void collectComplexTextRuns(); 157 120 158 // collectComplexTextRunsForCharacters() is a stub function that calls through to the ATSUI or Core Text variants based159 // on the API in use.160 121 void collectComplexTextRunsForCharacters(const UChar*, unsigned length, unsigned stringLocation, const SimpleFontData*); 161 void collectComplexTextRunsForCharactersATSUI(const UChar*, unsigned length, unsigned stringLocation, const SimpleFontData*);162 void collectComplexTextRunsForCharactersCoreText(const UChar*, unsigned length, unsigned stringLocation, const SimpleFontData*);163 122 void adjustGlyphsAndAdvances(); 164 123 … … 170 129 Vector<UChar, 256> m_smallCapsBuffer; 171 130 172 #if USE(CORE_TEXT)173 131 // Retain lines rather than their runs for better performance. 174 132 Vector<RetainPtr<CTLineRef> > m_coreTextLines; 175 #endif176 133 Vector<RefPtr<ComplexTextRun>, 16> m_complexTextRuns; 177 134 Vector<CGSize, 256> m_adjustedAdvances; -
trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
r122670 r123181 25 25 #include "config.h" 26 26 27 #if USE(CORE_TEXT)28 29 27 #include "ComplexTextController.h" 30 28 … … 136 134 // Missing glyphs run constructor. Core Text will not generate a run of missing glyphs, instead falling back on 137 135 // glyphs from LastResort. We want to use the primary font's missing glyph in order to match the fast text code path. 138 void ComplexTextController::ComplexTextRun::createTextRunFromFontDataCoreText(bool ltr) 136 ComplexTextController::ComplexTextRun::ComplexTextRun(const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, bool ltr) 137 : m_fontData(fontData) 138 , m_characters(characters) 139 , m_stringLocation(stringLocation) 140 , m_stringLength(stringLength) 141 , m_indexEnd(stringLength) 142 , m_isMonotonic(true) 139 143 { 140 144 m_coreTextIndicesVector.reserveInitialCapacity(m_stringLength); … … 181 185 } 182 186 183 void ComplexTextController::collectComplexTextRunsForCharactersCoreText(const UChar* cp, unsigned length, unsigned stringLocation, const SimpleFontData* fontData) 184 { 185 ASSERT_ARG(fontData, fontData); 187 void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, unsigned length, unsigned stringLocation, const SimpleFontData* fontData) 188 { 189 if (!fontData) { 190 // Create a run of missing glyphs from the primary font. 191 m_complexTextRuns.append(ComplexTextRun::create(m_font.primaryFont(), cp, stringLocation, length, m_run.ltr())); 192 return; 193 } 186 194 187 195 bool isSystemFallback = false; … … 296 304 297 305 } // namespace WebCore 298 299 #endif // USE(CORE_TEXT) -
trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
r122670 r123181 143 143 void SimpleFontData::platformInit() 144 144 { 145 #if USE(ATSUI)146 m_ATSUMirrors = false;147 m_checkedShapesArabic = false;148 m_shapesArabic = false;149 #endif150 151 145 m_syntheticBoldOffset = m_platformData.m_syntheticBold ? 1.0f : 0.f; 152 146 … … 320 314 fontCache()->releaseFontData(m_derivedFontData->emphasisMark.leakPtr()); 321 315 } 322 323 #if USE(ATSUI)324 HashMap<unsigned, ATSUStyle>::iterator end = m_ATSUStyleMap.end();325 for (HashMap<unsigned, ATSUStyle>::iterator it = m_ATSUStyleMap.begin(); it != end; ++it)326 ATSUDisposeStyle(it->second);327 #endif328 316 } 329 317
Note:
See TracChangeset
for help on using the changeset viewer.