Changeset 244277 in webkit


Ignore:
Timestamp:
Apr 15, 2019 11:56:52 AM (5 years ago)
Author:
Chris Dumez
Message:

Regression(r237903) Speedometer 2 is 1-2% regressed on iOS
https://bugs.webkit.org/show_bug.cgi?id=196841
<rdar://problem/45957016>

Reviewed by Myles C. Maxfield.

Speedometer 2 content does not use the text-underline-offset and text-decoration-thickness
features that were added in r237903 so I looked for behavior changes in the context of
Speedometer from r237903. I found that RenderStyle::changeAffectsVisualOverflow() started
returning true a lot more often after r237903. The reason is that r237903 dropped the
visualOverflowForDecorations() checks in this method and started returning true a lot
more as a result.

To restore previous behavior, this patch adds back the visualOverflowForDecorations() checks
that were dropped in r237903. I have verified that with this patch,
RenderStyle::changeAffectsVisualOverflow() returns true as many times as it used to before
r237903.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeAffectsVisualOverflow const):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244276 r244277  
     12019-04-15  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r237903) Speedometer 2 is 1-2% regressed on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=196841
     5        <rdar://problem/45957016>
     6
     7        Reviewed by Myles C. Maxfield.
     8
     9        Speedometer 2 content does not use the text-underline-offset and text-decoration-thickness
     10        features that were added in r237903 so I looked for behavior changes in the context of
     11        Speedometer from r237903. I found that RenderStyle::changeAffectsVisualOverflow() started
     12        returning true a lot more often after r237903. The reason is that r237903 dropped the
     13        visualOverflowForDecorations() checks in this method and started returning true a lot
     14        more as a result.
     15
     16        To restore previous behavior, this patch adds back the visualOverflowForDecorations() checks
     17        that were dropped in r237903. I have verified that with this patch,
     18        RenderStyle::changeAffectsVisualOverflow() returns true as many times as it used to before
     19        r237903.
     20
     21        * rendering/style/RenderStyle.cpp:
     22        (WebCore::RenderStyle::changeAffectsVisualOverflow const):
     23
    1242019-04-15  Said Abou-Hallawa  <said@apple.com>
    225
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r243275 r244277  
    543543        || m_rareInheritedData->textUnderlineOffset != other.m_rareInheritedData->textUnderlineOffset
    544544        || m_rareInheritedData->textUnderlinePosition != other.m_rareInheritedData->textUnderlinePosition) {
    545         return true;
     545        // Underlines are always drawn outside of their textbox bounds when text-underline-position: under;
     546        // is specified. We can take an early out here.
     547        if (textUnderlinePosition() == TextUnderlinePosition::Under || other.textUnderlinePosition() == TextUnderlinePosition::Under)
     548            return true;
     549        return visualOverflowForDecorations(*this, nullptr) != visualOverflowForDecorations(other, nullptr);
    546550    }
    547551
Note: See TracChangeset for help on using the changeset viewer.