⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 131375 in webkit


Ignore:
Timestamp:
Oct 15, 2012, 3:52:35 PM (14 years ago)
Author:
mitz@apple.com
Message:

Try to fix assertion failures on ports that do not support kerning and ligatures on the fast
code path after r131365.

  • platform/graphics/WidthIterator.cpp:

(WebCore::applyFontTransforms): Changed the early return condition to not bother with 1-glyph
sequences.

  • platform/graphics/WidthIterator.h:

(WebCore::WidthIterator::shouldApplyFontTransforms): Changed to return false if the run is
shorter than 2 characters.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r131374 r131375  
     12012-10-15  Dan Bernstein  <mitz@apple.com>
     2
     3        Try to fix assertion failures on ports that do not support kerning and ligatures on the fast
     4        code path after r131365.
     5
     6        * platform/graphics/WidthIterator.cpp:
     7        (WebCore::applyFontTransforms): Changed the early return condition to not bother with 1-glyph
     8        sequences.
     9        * platform/graphics/WidthIterator.h:
     10        (WebCore::WidthIterator::shouldApplyFontTransforms): Changed to return false if the run is
     11        shorter than 2 characters.
     12
    1132012-10-15  Dan Bernstein  <mitz@apple.com>
    214
  • trunk/Source/WebCore/platform/graphics/WidthIterator.cpp

    r131365 r131375  
    110110
    111111    int glyphBufferSize = glyphBuffer->size();
    112     if (glyphBuffer->size() <= lastGlyphCount)
     112    if (glyphBuffer->size() <= lastGlyphCount + 1)
    113113        return 0;
    114114
  • trunk/Source/WebCore/platform/graphics/WidthIterator.h

    r131365 r131375  
    9292    inline unsigned advanceInternal(TextIterator&, GlyphBuffer*);
    9393
    94     bool shouldApplyFontTransforms() const { return m_typesettingFeatures & (Kerning | Ligatures); }
     94    bool shouldApplyFontTransforms() const { return m_run.length() > 1 && (m_typesettingFeatures & (Kerning | Ligatures)); }
    9595
    9696    TypesettingFeatures m_typesettingFeatures;
Note: See TracChangeset for help on using the changeset viewer.