Changeset 150085 in webkit
- Timestamp:
- May 14, 2013 1:22:52 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r150084 r150085 1 2013-05-14 Andreas Kling <akling@apple.com> 2 3 Assertion failure in GlyphPage::setGlyphDataForIndex: (!glyph || fontData == m_fontDataForAllGlyphs) 4 <http://webkit.org/b/116113> 5 <rdar://problem/13833790> 6 7 Reviewed by Dan Bernstein. 8 9 If we're filling a full GlyphPage with a SimpleFontData that is actually a composite font reference, 10 we need to make sure we have per-glyph font data pointers, since it may end up using them. 11 12 Added GlyphPage::mayUseMixedFontDataWhenFilling() which can be implemented by the platform to let 13 GlyphPageTreeNode know that it should allocate a full-sized GlyphPage for mixed font data pointers 14 in case the font is a composite font reference, or if there are CJK ideographs in the text. 15 16 This code can be made smarter, but that's outside the scope of this change. 17 Fixes heavy asserting on bots running unreleased software. 18 19 * platform/graphics/GlyphPage.h: 20 (GlyphPage): 21 (WebCore::GlyphPage::mayUseMixedFontDataWhenFilling): 22 * platform/graphics/GlyphPageTreeNode.cpp: 23 (WebCore::GlyphPageTreeNode::initializePage): 24 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: 25 (WebCore::shouldUseCoreText): 26 (WebCore::GlyphPage::mayUseMixedFontDataWhenFilling): 27 1 28 2013-05-14 Bem Jones-Bey <bjonesbe@adobe.com> 2 29 -
trunk/Source/WebCore/platform/graphics/GlyphPage.h
r149529 r150085 169 169 // Implemented by the platform. 170 170 bool fill(unsigned offset, unsigned length, UChar* characterBuffer, unsigned bufferLength, const SimpleFontData*); 171 #if PLATFORM(MAC) 172 static bool mayUseMixedFontDataWhenFilling(const UChar* characterBuffer, unsigned bufferLength, const SimpleFontData*); 173 #else 174 static bool mayUseMixedFontDataWhenFilling(const UChar*, unsigned, const SimpleFontData*) { return false; } 175 #endif 171 176 172 177 private: -
trunk/Source/WebCore/platform/graphics/GlyphPageTreeNode.cpp
r147691 r150085 212 212 bool haveGlyphs; 213 213 if (!fontData->isSegmented()) { 214 m_page = GlyphPage::createForSingleFontData(this, static_cast<const SimpleFontData*>(fontData)); 214 if (GlyphPage::mayUseMixedFontDataWhenFilling(buffer, bufferLength, static_cast<const SimpleFontData*>(fontData))) 215 m_page = GlyphPage::createForMixedFontData(this); 216 else 217 m_page = GlyphPage::createForSingleFontData(this, static_cast<const SimpleFontData*>(fontData)); 215 218 haveGlyphs = fill(m_page.get(), 0, GlyphPage::size, buffer, bufferLength, static_cast<const SimpleFontData*>(fontData)); 216 219 } else { -
trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
r149255 r150085 37 37 namespace WebCore { 38 38 39 static bool shouldUseCoreText( UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)39 static bool shouldUseCoreText(const UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData) 40 40 { 41 41 if (fontData->platformData().isCompositeFontReference()) … … 50 50 51 51 return false; 52 } 53 54 bool GlyphPage::mayUseMixedFontDataWhenFilling(const UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData) 55 { 56 // FIXME: This could be smarter if the logic currently in GlyphPage::fill() got to make the decision about what kind of GlyphPage to construct. 57 return shouldUseCoreText(buffer, bufferLength, fontData); 52 58 } 53 59
Note: See TracChangeset
for help on using the changeset viewer.