Changeset 287674 in webkit


Ignore:
Timestamp:
Jan 5, 2022 9:51:41 PM (7 months ago)
Author:
Alan Bujtas
Message:

Text-decoration color not changing back after input blur with outline removed
https://bugs.webkit.org/show_bug.cgi?id=234800
<rdar://problem/87145636>

Reviewed by Antti Koivisto.

Source/WebCore:

This patch fixes the case when a decoration type of style value changes on the input
element (e.g. text-decoration-color) and the inner renderer does not get notified through the usual styleDidChange
flow because the property is non-inherited.

Test: fast/forms/dynamic-text-decoration-change.html

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::styleDidChange):

LayoutTests:

  • fast/forms/dynamic-text-decoration-change-expected.html: Added.
  • fast/forms/dynamic-text-decoration-change.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r287673 r287674  
     12022-01-05  Alan Bujtas  <zalan@apple.com>
     2
     3        Text-decoration color not changing back after input blur with outline removed
     4        https://bugs.webkit.org/show_bug.cgi?id=234800
     5        <rdar://problem/87145636>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        * fast/forms/dynamic-text-decoration-change-expected.html: Added.
     10        * fast/forms/dynamic-text-decoration-change.html: Added.
     11
    1122021-10-30  Myles C. Maxfield  <mmaxfield@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r287671 r287674  
     12022-01-05  Alan Bujtas  <zalan@apple.com>
     2
     3        Text-decoration color not changing back after input blur with outline removed
     4        https://bugs.webkit.org/show_bug.cgi?id=234800
     5        <rdar://problem/87145636>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        This patch fixes the case when a decoration type of style value changes on the input
     10        element (e.g. text-decoration-color) and the inner renderer does not get notified through the usual styleDidChange
     11        flow because the property is non-inherited.
     12
     13        Test: fast/forms/dynamic-text-decoration-change.html
     14
     15        * rendering/RenderTextControl.cpp:
     16        (WebCore::RenderTextControl::styleDidChange):
     17
    1182022-01-05  Wenson Hsieh  <wenson_hsieh@apple.com>
    219
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r279918 r287674  
    7272        if (newInnerTextStyle != oldInnerTextStyle)
    7373            innerTextRenderer->setStyle(WTFMove(newInnerTextStyle));
     74        else if (diff == StyleDifference::RepaintIfTextOrBorderOrOutline || diff == StyleDifference::Repaint) {
     75            // Repaint is expected to be propagated down to the shadow tree when non-inherited style property changes
     76            // (e.g. text-decoration-color) since that's where the value actually takes effect.
     77            innerTextRenderer->repaint();
     78        }
    7479    }
    7580    textFormControlElement().updatePlaceholderVisibility();
Note: See TracChangeset for help on using the changeset viewer.