Changeset 229867 in webkit


Ignore:
Timestamp:
Mar 22, 2018 2:59:41 PM (6 years ago)
Author:
Alan Bujtas
Message:

[Simple line layout] Text with letter spacing is not positioned properly.
https://bugs.webkit.org/show_bug.cgi?id=183079
<rdar://problem/38762569>

Reviewed by Antti Koivisto.

Source/WebCore:

We need to recompute RenderText::m_canUseSimplifiedTextMeasuring when the font cascade changes
since we might not be able to use the fast path anymore.

Test: fast/text/simple-line-layout-dynamic-letter-word-spacing.html

  • rendering/RenderText.cpp:

(WebCore::RenderText::styleDidChange):

LayoutTests:

  • fast/text/simple-line-layout-dynamic-letter-word-spacing-expected.html: Added.
  • fast/text/simple-line-layout-dynamic-letter-word-spacing.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r229866 r229867  
     12018-03-22  Zalan Bujtas  <zalan@apple.com>
     2
     3        [Simple line layout] Text with letter spacing is not positioned properly.
     4        https://bugs.webkit.org/show_bug.cgi?id=183079
     5        <rdar://problem/38762569>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        * fast/text/simple-line-layout-dynamic-letter-word-spacing-expected.html: Added.
     10        * fast/text/simple-line-layout-dynamic-letter-word-spacing.html: Added.
     11
    1122018-03-22  Adrian Perez de Castro  <aperez@igalia.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r229864 r229867  
     12018-03-22  Zalan Bujtas  <zalan@apple.com>
     2
     3        [Simple line layout] Text with letter spacing is not positioned properly.
     4        https://bugs.webkit.org/show_bug.cgi?id=183079
     5        <rdar://problem/38762569>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        We need to recompute RenderText::m_canUseSimplifiedTextMeasuring when the font cascade changes
     10        since we might not be able to use the fast path anymore.
     11
     12        Test: fast/text/simple-line-layout-dynamic-letter-word-spacing.html
     13
     14        * rendering/RenderText.cpp:
     15        (WebCore::RenderText::styleDidChange):
     16
    1172018-03-21  Antoine Quint  <graouts@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r228908 r229867  
    264264        m_useBackslashAsYenSymbol = computeUseBackslashAsYenSymbol();
    265265        needsResetText = m_useBackslashAsYenSymbol;
    266         // It should really be computed in the c'tor, but during construction we don't have parent yet -and RenderText style == parent()->style()
    267         m_canUseSimplifiedTextMeasuring = computeCanUseSimplifiedTextMeasuring();
    268266    } else if (oldStyle->fontCascade().useBackslashAsYenSymbol() != newStyle.fontCascade().useBackslashAsYenSymbol()) {
    269267        m_useBackslashAsYenSymbol = computeUseBackslashAsYenSymbol();
    270268        needsResetText = true;
    271269    }
     270
     271    if (!oldStyle || oldStyle->fontCascade() != newStyle.fontCascade())
     272        m_canUseSimplifiedTextMeasuring = computeCanUseSimplifiedTextMeasuring();
    272273
    273274    ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE;
Note: See TracChangeset for help on using the changeset viewer.