Changeset 177878 in webkit


Ignore:
Timestamp:
Jan 4, 2015, 3:38:36 PM (10 years ago)
Author:
Antti Koivisto
Message:

Remove GlyphPageTree
https://bugs.webkit.org/show_bug.cgi?id=140015

Follow-up to r177876 to fix mathml/opentype/munderover-layout-resize.html which is asserting in bots.

  • platform/graphics/FontGlyphs.cpp:

(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):

Always return system fallback if no glyph is found.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r177877 r177878  
     12015-01-04  Antti Koivisto  <antti@apple.com>
     2
     3        Remove GlyphPageTree
     4        https://bugs.webkit.org/show_bug.cgi?id=140015
     5
     6        Follow-up to r177876 to fix mathml/opentype/munderover-layout-resize.html which is asserting in bots.
     7
     8        * platform/graphics/FontGlyphs.cpp:
     9        (WebCore::FontGlyphs::glyphDataForVariant):
     10        (WebCore::FontGlyphs::glyphDataForNormalVariant):
     11
     12        Always return system fallback if no glyph is found.
     13
    1142015-01-04  Dan Bernstein  <mitz@apple.com>
    215
  • trunk/Source/WebCore/platform/graphics/FontGlyphs.cpp

    r177876 r177878  
    277277GlyphData FontGlyphs::glyphDataForVariant(UChar32 c, const FontDescription& description, FontDataVariant variant, unsigned fallbackLevel)
    278278{
    279     for (; fallbackLevel <= description.familyCount(); ++fallbackLevel) {
     279    for (; fallbackLevel < description.familyCount(); ++fallbackLevel) {
    280280        auto* fontData = realizeFontDataAt(description, fallbackLevel);
    281281        if (!fontData)
    282             return glyphDataForSystemFallback(c, description, variant);
     282            break;
    283283
    284284        auto* simpleFontData = fontData->simpleFontDataForCharacter(c);
     
    294294        }
    295295    }
    296     ASSERT_NOT_REACHED();
    297     return GlyphData();
     296
     297    return glyphDataForSystemFallback(c, description, variant);
    298298}
    299299
     
    302302    const unsigned pageNumber = c / GlyphPage::size;
    303303
    304     for (unsigned fallbackLevel = 0; fallbackLevel <= description.familyCount(); ++fallbackLevel) {
     304    for (unsigned fallbackLevel = 0; fallbackLevel < description.familyCount(); ++fallbackLevel) {
    305305        auto* fontData = realizeFontDataAt(description, fallbackLevel);
    306306        if (!fontData)
    307             return glyphDataForSystemFallback(c, description, NormalVariant);
    308 
     307            break;
    309308        auto* simpleFontData = fontData->simpleFontDataForCharacter(c);
    310309        auto* page = simpleFontData ? simpleFontData->glyphPage(pageNumber) : nullptr;
     
    332331    }
    333332
    334     ASSERT_NOT_REACHED();
    335     return GlyphData();
     333    return glyphDataForSystemFallback(c, description, NormalVariant);
    336334}
    337335
Note: See TracChangeset for help on using the changeset viewer.