Title: [287674] trunk
- Revision
- 287674
- Author
- za...@apple.com
- Date
- 2022-01-05 21:51:41 -0800 (Wed, 05 Jan 2022)
Log 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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (287673 => 287674)
--- trunk/LayoutTests/ChangeLog 2022-01-06 04:40:39 UTC (rev 287673)
+++ trunk/LayoutTests/ChangeLog 2022-01-06 05:51:41 UTC (rev 287674)
@@ -1,3 +1,14 @@
+2022-01-05 Alan Bujtas <za...@apple.com>
+
+ 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.
+
+ * fast/forms/dynamic-text-decoration-change-expected.html: Added.
+ * fast/forms/dynamic-text-decoration-change.html: Added.
+
2021-10-30 Myles C. Maxfield <mmaxfi...@apple.com>
[GPU Process] Small ImageBuffers cause the web process to crash
Added: trunk/LayoutTests/fast/forms/dynamic-text-decoration-change-expected.txt (0 => 287674)
--- trunk/LayoutTests/fast/forms/dynamic-text-decoration-change-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/dynamic-text-decoration-change-expected.txt 2022-01-06 05:51:41 UTC (rev 287674)
@@ -0,0 +1,2 @@
+
+PASS
Added: trunk/LayoutTests/fast/forms/dynamic-text-decoration-change.html (0 => 287674)
--- trunk/LayoutTests/fast/forms/dynamic-text-decoration-change.html (rev 0)
+++ trunk/LayoutTests/fast/forms/dynamic-text-decoration-change.html 2022-01-06 05:51:41 UTC (rev 287674)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src=""
+<style>
+input {
+ width: 500px;
+ font-size: 18px;
+ text-decoration-line: underline;
+ text-decoration-color: red;
+ outline: none;
+}
+</style>
+<input id=changeThis type='text' value="PASS if underline color changes">
+<pre id=result></pre>
+<script>
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText(true);
+}
+setTimeout(async () => {
+ await UIHelper.renderingUpdate();
+ if (window.internals)
+ internals.startTrackingRepaints();
+ changeThis.style.textDecorationColor = "green";
+ document.body.offsetHeight;
+ if (internals) {
+ result.textContent = internals.repaintRectsAsText().length ? "PASS" : "FAIL -no repaint happened";
+ internals.stopTrackingRepaints();
+ }
+ if (window.testRunner)
+ testRunner.notifyDone();
+}, 0);
+</script>
Modified: trunk/Source/WebCore/ChangeLog (287673 => 287674)
--- trunk/Source/WebCore/ChangeLog 2022-01-06 04:40:39 UTC (rev 287673)
+++ trunk/Source/WebCore/ChangeLog 2022-01-06 05:51:41 UTC (rev 287674)
@@ -1,3 +1,20 @@
+2022-01-05 Alan Bujtas <za...@apple.com>
+
+ 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.
+
+ 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):
+
2022-01-05 Wenson Hsieh <wenson_hs...@apple.com>
Modal container observer should detect and suppress elements that prevent user interaction
Modified: trunk/Source/WebCore/rendering/RenderTextControl.cpp (287673 => 287674)
--- trunk/Source/WebCore/rendering/RenderTextControl.cpp 2022-01-06 04:40:39 UTC (rev 287673)
+++ trunk/Source/WebCore/rendering/RenderTextControl.cpp 2022-01-06 05:51:41 UTC (rev 287674)
@@ -71,6 +71,11 @@
auto oldInnerTextStyle = textFormControlElement().createInnerTextStyle(*oldStyle);
if (newInnerTextStyle != oldInnerTextStyle)
innerTextRenderer->setStyle(WTFMove(newInnerTextStyle));
+ else if (diff == StyleDifference::RepaintIfTextOrBorderOrOutline || diff == StyleDifference::Repaint) {
+ // Repaint is expected to be propagated down to the shadow tree when non-inherited style property changes
+ // (e.g. text-decoration-color) since that's where the value actually takes effect.
+ innerTextRenderer->repaint();
+ }
}
textFormControlElement().updatePlaceholderVisibility();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes