Title: [282045] trunk
- Revision
- 282045
- Author
- an...@apple.com
- Date
- 2021-09-04 06:20:39 -0700 (Sat, 04 Sep 2021)
Log Message
REGRESSION(r275515): pointer-events:none may get stuck in LFC runs
https://bugs.webkit.org/show_bug.cgi?id=229854
rdar://81165275
Reviewed by Alan Bujtas.
Source/WebCore:
We only update run style with diff >= StyleDifference::Repaint but pointer-events changes don't require repaint.
Test: fast/events/pointer-events-mutation.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleDidChange):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
Fix by pushing the new style to LFC unconditionally. This has no meaningful cost.
LayoutTests:
* fast/events/pointer-events-mutation-expected.txt: Added.
* fast/events/pointer-events-mutation.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (282044 => 282045)
--- trunk/LayoutTests/ChangeLog 2021-09-04 04:34:45 UTC (rev 282044)
+++ trunk/LayoutTests/ChangeLog 2021-09-04 13:20:39 UTC (rev 282045)
@@ -1,3 +1,14 @@
+2021-09-04 Antti Koivisto <an...@apple.com>
+
+ REGRESSION(r275515): pointer-events:none may get stuck in LFC runs
+ https://bugs.webkit.org/show_bug.cgi?id=229854
+ rdar://81165275
+
+ Reviewed by Alan Bujtas.
+
+ * fast/events/pointer-events-mutation-expected.txt: Added.
+ * fast/events/pointer-events-mutation.html: Added.
+
2021-09-03 Myles C. Maxfield <mmaxfi...@apple.com>
Test gardening after r281291
Added: trunk/LayoutTests/fast/events/pointer-events-mutation-expected.txt (0 => 282045)
--- trunk/LayoutTests/fast/events/pointer-events-mutation-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/pointer-events-mutation-expected.txt 2021-09-04 13:20:39 UTC (rev 282045)
@@ -0,0 +1,9 @@
+target1
+target2
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+
Added: trunk/LayoutTests/fast/events/pointer-events-mutation.html (0 => 282045)
--- trunk/LayoutTests/fast/events/pointer-events-mutation.html (rev 0)
+++ trunk/LayoutTests/fast/events/pointer-events-mutation.html 2021-09-04 13:20:39 UTC (rev 282045)
@@ -0,0 +1,23 @@
+<style>
+.none { pointer-events:none; }
+</style>
+<div class=target>target1</div>
+<div><span class=target>target2</span></div>
+<pre id=log></pre>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function test(target, expected) {
+ const pass = document.elementFromPoint(target.offsetLeft + 5, target.offsetTop + 5) === expected;
+ log.textContent += pass ? "PASS\n" : "FAIL\n"
+
+}
+for (target of document.querySelectorAll(".target")) {
+ test(target, target);
+ target.classList.add("none");
+ test(target, target.parentElement);
+ target.classList.remove("none");
+ test(target, target);
+}
+</script>
Modified: trunk/Source/WebCore/ChangeLog (282044 => 282045)
--- trunk/Source/WebCore/ChangeLog 2021-09-04 04:34:45 UTC (rev 282044)
+++ trunk/Source/WebCore/ChangeLog 2021-09-04 13:20:39 UTC (rev 282045)
@@ -1,3 +1,24 @@
+2021-09-04 Antti Koivisto <an...@apple.com>
+
+ REGRESSION(r275515): pointer-events:none may get stuck in LFC runs
+ https://bugs.webkit.org/show_bug.cgi?id=229854
+ rdar://81165275
+
+ Reviewed by Alan Bujtas.
+
+ We only update run style with diff >= StyleDifference::Repaint but pointer-events changes don't require repaint.
+
+ Test: fast/events/pointer-events-mutation.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::styleDidChange):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::styleDidChange):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::styleDidChange):
+
+ Fix by pushing the new style to LFC unconditionally. This has no meaningful cost.
+
2021-09-03 Johnson Zhou <qiaosong_z...@apple.com>
Addition of CSSNumericFactory in CSS Typed OM
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (282044 => 282045)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2021-09-04 04:34:45 UTC (rev 282044)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2021-09-04 13:20:39 UTC (rev 282045)
@@ -2142,12 +2142,12 @@
};
if (shouldInvalidateLineLayoutPath())
invalidateLineLayoutPath();
+ }
#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- if (auto* lineLayout = modernLineLayout())
- lineLayout->updateStyle(*this);
+ if (auto* lineLayout = modernLineLayout())
+ lineLayout->updateStyle(*this);
#endif
- }
if (multiColumnFlow())
updateStylesForColumnChildren();
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (282044 => 282045)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2021-09-04 04:34:45 UTC (rev 282044)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2021-09-04 13:20:39 UTC (rev 282045)
@@ -413,10 +413,8 @@
clearOverridingContentSize();
#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- if (diff >= StyleDifference::Repaint) {
- if (auto* lineLayout = LayoutIntegration::LineLayout::containing(*this))
- lineLayout->updateStyle(*this);
- }
+ if (auto* lineLayout = LayoutIntegration::LineLayout::containing(*this))
+ lineLayout->updateStyle(*this);
#endif
}
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (282044 => 282045)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2021-09-04 04:34:45 UTC (rev 282044)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2021-09-04 13:20:39 UTC (rev 282045)
@@ -196,15 +196,13 @@
}
#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- if (diff >= StyleDifference::Repaint) {
- if (auto* lineLayout = LayoutIntegration::LineLayout::containing(*this)) {
- if (selfNeedsLayout()) {
- // FIXME: Add support for partial invalidation.
- if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
- container->invalidateLineLayoutPath();
- } else
- lineLayout->updateStyle(*this);
- }
+ if (auto* lineLayout = LayoutIntegration::LineLayout::containing(*this)) {
+ if (diff >= StyleDifference::Repaint && selfNeedsLayout()) {
+ // FIXME: Add support for partial invalidation.
+ if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
+ container->invalidateLineLayoutPath();
+ } else
+ lineLayout->updateStyle(*this);
}
#endif
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes