Title: [271845] branches/safari-611-branch
- Revision
- 271845
- Author
- alanc...@apple.com
- Date
- 2021-01-25 14:12:43 -0800 (Mon, 25 Jan 2021)
Log Message
Cherry-pick r271516. rdar://problem/73477422
[LFC][Integration] REGRESSION (r270123) facebook.com birthday dropdown do not work when creating new account
https://bugs.webkit.org/show_bug.cgi?id=220638
<rdar://problem/73175259>
Reviewed by Simon Fraser.
Source/WebCore:
This patch fixes incorrect hittest results when the hittest target
1. participates in the modern line layout and
2. prior to the hittesting its style changes in a way that it does not trigger layout.
e.g.
<div><div id=inner style="display: inline-block; visibility: hidden"><div></div>
<script>inner.style.visibility = "visible"</script>
Any subsequent hittest will miss the inner <div> as the loop in LineLayout::hitTest() early returns due to stale style information.
The reason why we end up with stale style is because we only update the layout box's style when the style diff >= StyleDifference::Layout () in RenderBox::styleDidChange.
Test: fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
LayoutTests:
* fast/inline-block/hittest-fails-on-inline-block-with-visibility-change-expected.txt: Added.
* fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-611-branch/LayoutTests/ChangeLog (271844 => 271845)
--- branches/safari-611-branch/LayoutTests/ChangeLog 2021-01-25 22:12:40 UTC (rev 271844)
+++ branches/safari-611-branch/LayoutTests/ChangeLog 2021-01-25 22:12:43 UTC (rev 271845)
@@ -1,5 +1,51 @@
2021-01-25 Alan Coon <alanc...@apple.com>
+ Cherry-pick r271516. rdar://problem/73477422
+
+ [LFC][Integration] REGRESSION (r270123) facebook.com birthday dropdown do not work when creating new account
+ https://bugs.webkit.org/show_bug.cgi?id=220638
+ <rdar://problem/73175259>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ This patch fixes incorrect hittest results when the hittest target
+ 1. participates in the modern line layout and
+ 2. prior to the hittesting its style changes in a way that it does not trigger layout.
+ e.g.
+ <div><div id=inner style="display: inline-block; visibility: hidden"><div></div>
+ <script>inner.style.visibility = "visible"</script>
+
+ Any subsequent hittest will miss the inner <div> as the loop in LineLayout::hitTest() early returns due to stale style information.
+ The reason why we end up with stale style is because we only update the layout box's style when the style diff >= StyleDifference::Layout () in RenderBox::styleDidChange.
+
+ Test: fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::styleDidChange):
+
+ LayoutTests:
+
+ * fast/inline-block/hittest-fails-on-inline-block-with-visibility-change-expected.txt: Added.
+ * fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-01-15 Zalan Bujtas <za...@apple.com>
+
+ [LFC][Integration] REGRESSION (r270123) facebook.com birthday dropdown do not work when creating new account
+ https://bugs.webkit.org/show_bug.cgi?id=220638
+ <rdar://problem/73175259>
+
+ Reviewed by Simon Fraser.
+
+ * fast/inline-block/hittest-fails-on-inline-block-with-visibility-change-expected.txt: Added.
+ * fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html: Added.
+
+2021-01-25 Alan Coon <alanc...@apple.com>
+
Cherry-pick r271471. rdar://problem/73477068
Source/WebCore:
Added: branches/safari-611-branch/LayoutTests/fast/inline-block/hittest-fails-on-inline-block-with-visibility-change-expected.txt (0 => 271845)
--- branches/safari-611-branch/LayoutTests/fast/inline-block/hittest-fails-on-inline-block-with-visibility-change-expected.txt (rev 0)
+++ branches/safari-611-branch/LayoutTests/fast/inline-block/hittest-fails-on-inline-block-with-visibility-change-expected.txt 2021-01-25 22:12:43 UTC (rev 271845)
@@ -0,0 +1,2 @@
+click me
+clicked - PASSED
Added: branches/safari-611-branch/LayoutTests/fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html (0 => 271845)
--- branches/safari-611-branch/LayoutTests/fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html (rev 0)
+++ branches/safari-611-branch/LayoutTests/fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html 2021-01-25 22:12:43 UTC (rev 271845)
@@ -0,0 +1,33 @@
+<script src=""
+<style>
+#container {
+ visibility: hidden;
+}
+
+#click_me {
+ display: inline-block;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+}
+</style>
+<div id=container><div id=click_me>click me</div></div>
+<pre id=result></pre>
+<script>
+document.body.offsetHeight;
+
+click_me.addEventListener("click", function() {
+ result.innerText = "clicked - PASSED";
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, false);
+
+container.style.visibility = "visible";
+document.body.offsetHeight;
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ UIHelper.activateElement(click_me);
+}
+</script>
Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (271844 => 271845)
--- branches/safari-611-branch/Source/WebCore/ChangeLog 2021-01-25 22:12:40 UTC (rev 271844)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog 2021-01-25 22:12:43 UTC (rev 271845)
@@ -1,5 +1,63 @@
2021-01-25 Alan Coon <alanc...@apple.com>
+ Cherry-pick r271516. rdar://problem/73477422
+
+ [LFC][Integration] REGRESSION (r270123) facebook.com birthday dropdown do not work when creating new account
+ https://bugs.webkit.org/show_bug.cgi?id=220638
+ <rdar://problem/73175259>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ This patch fixes incorrect hittest results when the hittest target
+ 1. participates in the modern line layout and
+ 2. prior to the hittesting its style changes in a way that it does not trigger layout.
+ e.g.
+ <div><div id=inner style="display: inline-block; visibility: hidden"><div></div>
+ <script>inner.style.visibility = "visible"</script>
+
+ Any subsequent hittest will miss the inner <div> as the loop in LineLayout::hitTest() early returns due to stale style information.
+ The reason why we end up with stale style is because we only update the layout box's style when the style diff >= StyleDifference::Layout () in RenderBox::styleDidChange.
+
+ Test: fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::styleDidChange):
+
+ LayoutTests:
+
+ * fast/inline-block/hittest-fails-on-inline-block-with-visibility-change-expected.txt: Added.
+ * fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-01-15 Zalan Bujtas <za...@apple.com>
+
+ [LFC][Integration] REGRESSION (r270123) facebook.com birthday dropdown do not work when creating new account
+ https://bugs.webkit.org/show_bug.cgi?id=220638
+ <rdar://problem/73175259>
+
+ Reviewed by Simon Fraser.
+
+ This patch fixes incorrect hittest results when the hittest target
+ 1. participates in the modern line layout and
+ 2. prior to the hittesting its style changes in a way that it does not trigger layout.
+ e.g.
+ <div><div id=inner style="display: inline-block; visibility: hidden"><div></div>
+ <script>inner.style.visibility = "visible"</script>
+
+ Any subsequent hittest will miss the inner <div> as the loop in LineLayout::hitTest() early returns due to stale style information.
+ The reason why we end up with stale style is because we only update the layout box's style when the style diff >= StyleDifference::Layout () in RenderBox::styleDidChange.
+
+ Test: fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::styleDidChange):
+
+2021-01-25 Alan Coon <alanc...@apple.com>
+
Cherry-pick r271476. rdar://problem/73478439
Crash ASSERT in AccessibilityRenderObject::textUnderElement during AXIsolatedObject initialization.
Modified: branches/safari-611-branch/Source/WebCore/rendering/RenderBox.cpp (271844 => 271845)
--- branches/safari-611-branch/Source/WebCore/rendering/RenderBox.cpp 2021-01-25 22:12:40 UTC (rev 271844)
+++ branches/safari-611-branch/Source/WebCore/rendering/RenderBox.cpp 2021-01-25 22:12:43 UTC (rev 271845)
@@ -412,7 +412,7 @@
clearOverridingContentSize();
#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- if (diff == StyleDifference::Layout) {
+ if (diff >= StyleDifference::Repaint) {
if (auto* lineLayout = LayoutIntegration::LineLayout::containing(*this))
lineLayout->updateStyle(*this);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes