Changeset 166381 in webkit
- Timestamp:
- Mar 27, 2014 4:23:37 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r166378 r166381 1949 1949 platform/graphics/filters/SourceGraphic.cpp 1950 1950 platform/graphics/filters/SpotLightSource.cpp 1951 1952 platform/graphics/opentype/OpenTypeMathData.cpp1953 1951 1954 1952 platform/graphics/texmap/TextureMapper.cpp -
trunk/Source/WebCore/ChangeLog
r166380 r166381 1 2014-03-27 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r166364. 4 https://bugs.webkit.org/show_bug.cgi?id=130872 5 6 Caused a test assertion (Requested by smfr on #webkit). 7 8 Reverted changeset: 9 10 "Operator stretching: expose a math data API" 11 https://bugs.webkit.org/show_bug.cgi?id=130572 12 http://trac.webkit.org/changeset/166364 13 1 14 2014-03-27 Benjamin Poulain <bpoulain@apple.com> 2 15 -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r166378 r166381 7950 7950 <ClCompile Include="..\platform\graphics\win\IntSizeWin.cpp" /> 7951 7951 <ClCompile Include="..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.cpp" /> 7952 <ClCompile Include="..\platform\graphics\opentype\OpenTypeMathData.cpp" />7953 7952 <ClCompile Include="..\platform\graphics\opentype\OpenTypeUtilities.cpp" /> 7954 7953 <ClCompile Include="..\platform\graphics\opentype\OpenTypeVerticalData.cpp" /> … … 19374 19373 <ClInclude Include="..\platform\graphics\win\LocalWindowsContext.h" /> 19375 19374 <CustomBuildStep Include="..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.h" /> 19376 <ClInclude Include="..\platform\graphics\opentype\OpenTypeMathData.h" />19377 19375 <ClInclude Include="..\platform\graphics\opentype\OpenTypeTypes.h" /> 19378 19376 <ClInclude Include="..\platform\graphics\opentype\OpenTypeUtilities.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r166378 r166381 1477 1477 <Filter>platform\graphics\win</Filter> 1478 1478 </ClCompile> 1479 <ClCompile Include="..\platform\graphics\opentype\OpenTypeMathData.cpp">1480 <Filter>platform\graphics\win</Filter>1481 </ClCompile>1482 1479 <ClCompile Include="..\platform\graphics\opentype\OpenTypeUtilities.cpp"> 1483 1480 <Filter>platform\graphics\win</Filter> … … 8433 8430 </ClInclude> 8434 8431 <ClInclude Include="..\platform\graphics\win\LocalWindowsContext.h"> 8435 <Filter>platform\graphics\win</Filter>8436 </ClInclude>8437 <ClInclude Include="..\platform\graphics\opentype\OpenTypeMathData.h">8438 8432 <Filter>platform\graphics\win</Filter> 8439 8433 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r166378 r166381 4594 4594 B2C3DA640D006CD600EF6F26 /* SimpleFontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */; }; 4595 4595 B2C3DA650D006CD600EF6F26 /* SimpleFontData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA540D006CD600EF6F26 /* SimpleFontData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4596 B2D3DA640D006CD600EF6F27 /* OpenTypeMathData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2D3DA530D006CD600EF6F27 /* OpenTypeMathData.cpp */; };4597 B2D3DA650D006CD600EF6F27 /* OpenTypeMathData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2D3DA540D006CD600EF6F27 /* OpenTypeMathData.h */; settings = {ATTRIBUTES = (Private, ); }; };4598 4596 B2C3DA660D006CD600EF6F26 /* FontDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA550D006CD600EF6F26 /* FontDescription.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4599 4597 B2C3DA670D006CD600EF6F26 /* FontGlyphs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA560D006CD600EF6F26 /* FontGlyphs.cpp */; }; … … 11844 11842 B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleFontData.cpp; sourceTree = "<group>"; }; 11845 11843 B2C3DA540D006CD600EF6F26 /* SimpleFontData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SimpleFontData.h; sourceTree = "<group>"; }; 11846 B2D3DA530D006CD600EF6F27 /* OpenTypeMathData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = opentype/OpenTypeMathData.cpp; sourceTree = "<group>"; };11847 B2D3DA540D006CD600EF6F27 /* OpenTypeMathData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = opentype/OpenTypeMathData.h; sourceTree = "<group>"; };11848 11844 B2C3DA550D006CD600EF6F26 /* FontDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontDescription.h; sourceTree = "<group>"; }; 11849 11845 B2C3DA560D006CD600EF6F26 /* FontGlyphs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontGlyphs.cpp; sourceTree = "<group>"; }; … … 20134 20130 B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */, 20135 20131 B2C3DA540D006CD600EF6F26 /* SimpleFontData.h */, 20136 B2D3DA530D006CD600EF6F27 /* OpenTypeMathData.cpp */,20137 B2D3DA540D006CD600EF6F27 /* OpenTypeMathData.h */,20138 20132 CD641EB21818F5ED00EE4C41 /* SourceBufferPrivate.h */, 20139 20133 CDC61DA0180867D8004B913F /* SourceBufferPrivate.h */, … … 25476 25470 41D168EE10226E89009BC827 /* SharedWorkerThread.h in Headers */, 25477 25471 B2C3DA650D006CD600EF6F26 /* SimpleFontData.h in Headers */, 25478 B2D3DA650D006CD600EF6F27 /* OpenTypeMathData.h in Headers */,25479 25472 E48944A3180B57D800F165D8 /* SimpleLineLayout.h in Headers */, 25480 25473 E4E9B11D1814569C003ACCDF /* SimpleLineLayoutFunctions.h in Headers */, … … 28840 28833 41D168ED10226E89009BC827 /* SharedWorkerThread.cpp in Sources */, 28841 28834 B2C3DA640D006CD600EF6F26 /* SimpleFontData.cpp in Sources */, 28842 B2D3DA640D006CD600EF6F27 /* OpenTypeMathData.cpp in Sources */,28843 28835 163E88F7118A39D200ED9231 /* SimpleFontDataCoreText.cpp in Sources */, 28844 28836 37E65950163B10C200EB4574 /* SimpleFontDataIOS.mm in Sources */, -
trunk/Source/WebCore/platform/graphics/FontCache.cpp
r166364 r166381 35 35 #include "FontPlatformData.h" 36 36 #include "FontSelector.h" 37 #include "OpenTypeMathData.h"38 37 #include "WebKitFontFamilyNames.h" 39 38 #include <wtf/HashMap.h> … … 268 267 } 269 268 270 struct FontFileCacheKeyHash { 269 #if ENABLE(OPENTYPE_VERTICAL) 270 struct FontVerticalDataCacheKeyHash { 271 271 static unsigned hash(const FontCache::FontFileKey& fontFileKey) 272 272 { … … 282 282 }; 283 283 284 struct Font FileCacheKeyTraits : WTF::GenericHashTraits<FontCache::FontFileKey> {284 struct FontVerticalDataCacheKeyTraits : WTF::GenericHashTraits<FontCache::FontFileKey> { 285 285 static const bool emptyValueIsZero = true; 286 286 static const bool needsDestruction = true; … … 300 300 }; 301 301 302 typedef HashMap<FontCache::FontFileKey, RefPtr<OpenTypeMathData>, FontFileCacheKeyHash, FontFileCacheKeyTraits> FontMathDataCache; 303 304 static FontMathDataCache& fontMathDataCacheInstance() 305 { 306 static NeverDestroyed<FontMathDataCache> fontMathDataCache; 307 return fontMathDataCache; 308 } 309 310 PassRefPtr<OpenTypeMathData> FontCache::getMathData(const FontFileKey& key, const FontPlatformData& fontData) 311 { 312 FontMathDataCache& fontMathDataCache = fontMathDataCacheInstance(); 313 FontMathDataCache::iterator result = fontMathDataCache.find(key); 314 if (result != fontMathDataCache.end()) 315 return result.get()->value; 316 317 RefPtr<OpenTypeMathData> mathData = OpenTypeMathData::create(fontData); 318 if (!mathData->hasMathData()) 319 mathData.clear(); 320 fontMathDataCache.set(key, mathData); 321 return mathData; 322 } 323 324 #if ENABLE(OPENTYPE_VERTICAL) 325 typedef HashMap<FontCache::FontFileKey, RefPtr<OpenTypeVerticalData>, FontFileCacheKeyHash, FontFileCacheKeyTraits> FontVerticalDataCache; 326 327 static FontVerticalDataCache& fontVerticalDataCacheInstance() 302 typedef HashMap<FontCache::FontFileKey, RefPtr<OpenTypeVerticalData>, FontVerticalDataCacheKeyHash, FontVerticalDataCacheKeyTraits> FontVerticalDataCache; 303 304 FontVerticalDataCache& fontVerticalDataCacheInstance() 328 305 { 329 306 static NeverDestroyed<FontVerticalDataCache> fontVerticalDataCache; -
trunk/Source/WebCore/platform/graphics/FontCache.h
r166364 r166381 55 55 class FontData; 56 56 class FontSelector; 57 class OpenTypeMathData;58 57 class OpenTypeVerticalData; 59 58 class SimpleFontData; … … 153 152 #endif 154 153 154 #if ENABLE(OPENTYPE_VERTICAL) 155 155 typedef AtomicString FontFileKey; 156 PassRefPtr<OpenTypeMathData> getMathData(const FontFileKey&, const FontPlatformData&);157 #if ENABLE(OPENTYPE_VERTICAL)158 156 PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const FontPlatformData&); 159 157 #endif -
trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp
r166364 r166381 27 27 #include <wtf/text/StringHash.h> 28 28 #include <wtf/text/WTFString.h> 29 30 #if OS(DARWIN) && USE(CG)31 #include "SharedBuffer.h"32 #include <CoreGraphics/CGFont.h>33 #endif34 29 35 30 namespace WebCore { … … 175 170 } 176 171 177 #if OS(DARWIN) && USE(CG)178 PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const179 {180 if (CFDataRef data = CGFontCopyTableForTag(cgFont(), table))181 return SharedBuffer::wrapCFData(data);182 183 return nullptr;184 172 } 185 #endif186 187 } -
trunk/Source/WebCore/platform/graphics/FontPlatformData.h
r166364 r166381 217 217 } 218 218 219 #if (OS(DARWIN) && USE(CG)) || (PLATFORM(WIN) && (USE(CG) || USE(CAIRO)))219 #if PLATFORM(WIN) && (USE(CG) || USE(CAIRO)) 220 220 PassRefPtr<SharedBuffer> openTypeTable(uint32_t table) const; 221 221 #endif -
trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp
r166364 r166381 33 33 #include "Font.h" 34 34 #include "FontCache.h" 35 #include "OpenTypeMathData.h"36 35 #include <wtf/MathExtras.h> 37 36 … … 54 53 , m_isTextOrientationFallback(isTextOrientationFallback) 55 54 , m_isBrokenIdeographFallback(false) 56 , m_mathData(nullptr)57 55 #if ENABLE(OPENTYPE_VERTICAL) 58 56 , m_verticalData(0) … … 63 61 platformGlyphInit(); 64 62 platformCharWidthInit(); 65 66 bool tryMathData = false;67 #if PLATFORM(WIN) && (USE(CG) || USE(CAIRO))68 tryMathData = platformData.hfont();69 #elif OS(DARWIN) && USE(CG)70 tryMathData = platformData.font();71 #elif USE(FREETYPE)72 tryMathData = platformData.hash();73 #endif74 if (tryMathData)75 m_mathData = fontCache()->getMathData(String::number(platformData.hash()), platformData);76 77 63 #if ENABLE(OPENTYPE_VERTICAL) 78 64 if (platformData.orientation() == Vertical && !isTextOrientationFallback) { … … 91 77 , m_isTextOrientationFallback(false) 92 78 , m_isBrokenIdeographFallback(false) 93 , m_mathData(nullptr)94 79 #if ENABLE(OPENTYPE_VERTICAL) 95 80 , m_verticalData(0) -
trunk/Source/WebCore/platform/graphics/SimpleFontData.h
r166364 r166381 33 33 #include "GlyphMetricsMap.h" 34 34 #include "GlyphPageTreeNode.h" 35 #include "OpenTypeMathData.h"36 35 #if ENABLE(OPENTYPE_VERTICAL) 37 36 #include "OpenTypeVerticalData.h" … … 94 93 95 94 const FontPlatformData& platformData() const { return m_platformData; } 96 const OpenTypeMathData* mathData() const { return m_mathData ? m_mathData.get() : nullptr; }97 95 #if ENABLE(OPENTYPE_VERTICAL) 98 96 const OpenTypeVerticalData* verticalData() const { return m_verticalData.get(); } … … 262 260 bool m_isTextOrientationFallback; 263 261 bool m_isBrokenIdeographFallback; 264 RefPtr<OpenTypeMathData> m_mathData;265 262 #if ENABLE(OPENTYPE_VERTICAL) 266 263 RefPtr<OpenTypeVerticalData> m_verticalData;
Note: See TracChangeset
for help on using the changeset viewer.