Changeset 89248 in webkit


Ignore:
Timestamp:
Jun 20, 2011 8:50:29 AM (13 years ago)
Author:
Martin Robinson
Message:

2011-06-19 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] ASSERTION FAILED: it != gFontDataCache->end() in FontCache.cpp:318
https://bugs.webkit.org/show_bug.cgi?id=62942

Fix the == operator overload of the FreeType FontPlatformData to properly make the
distinction between the hash table deleted value and the hash table empty value.

No new tests. This is covered by existing tests, which should no longer
hit assertions.

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::operator==): Reorder the logic for determining if two FontPlatformData instances are equal. Do a pointer comparison on the Fontconfig patterns, instead of using FcPatternEqual. If the two Fontconfig patterns have different pointers they were created at different times and the overload should return false.
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89245 r89248  
     12011-06-19  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] ASSERTION FAILED: it != gFontDataCache->end() in FontCache.cpp:318
     6        https://bugs.webkit.org/show_bug.cgi?id=62942
     7
     8        Fix the == operator overload of the FreeType FontPlatformData to properly make the
     9        distinction between the hash table deleted value and the hash table empty value.
     10
     11        No new tests. This is covered by existing tests, which should no longer
     12        hit assertions.
     13
     14        * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
     15        (WebCore::FontPlatformData::operator==): Reorder the logic for determining if two
     16        FontPlatformData instances are equal. Do a pointer comparison on the Fontconfig patterns,
     17        instead of using FcPatternEqual. If the two Fontconfig patterns have different pointers
     18        they were created at different times and the overload should return false.
     19
    1202011-06-20  Ilya Tikhonovsky  <loislo@chromium.org>
    221
  • trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp

    r87696 r89248  
    229229bool FontPlatformData::operator==(const FontPlatformData& other) const
    230230{
    231     if (m_pattern == other.m_pattern)
    232         return true;
    233     if (!m_pattern || !other.m_pattern)
    234         return false;
    235     return FcPatternEqual(m_pattern.get(), other.m_pattern.get())
    236         && m_scaledFont == other.m_scaledFont && m_font == other.m_font && m_size == other.m_size
    237         && m_syntheticOblique == other.m_syntheticOblique && m_syntheticBold == other.m_syntheticBold;
     231    return m_pattern == other.m_pattern
     232        && m_scaledFont == other.m_scaledFont
     233        && m_font == other.m_font
     234        && m_size == other.m_size
     235        && m_syntheticOblique == other.m_syntheticOblique
     236        && m_syntheticBold == other.m_syntheticBold;
    238237}
    239238
Note: See TracChangeset for help on using the changeset viewer.