Title: [294754] trunk
Revision
294754
Author
za...@apple.com
Date
2022-05-24 11:48:31 -0700 (Tue, 24 May 2022)

Log Message

REGRESSION (r292532): pge.com: Unable to focus on any of the inputs
https://bugs.webkit.org/show_bug.cgi?id=240832
<rdar://92538460>

Reviewed by Simon Fraser.

This is a revert of r292532. Blank float avoiders (used width = 0px) do fit even when the available space is zero. We have to find a different way to address the float fitting issue in contain-inline-size-bfc-floats-001.html (though I am not convinced that the expected result is correct anymore).

* LayoutTests/TestExpectations:
* LayoutTests/fast/block/float/zero-size-float-avoider-incorrect-position-expected.html: Added.
* LayoutTests/fast/block/float/zero-size-float-avoider-incorrect-position.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::getClearDelta):

Canonical link: https://commits.webkit.org/250922@main

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/TestExpectations (294753 => 294754)


--- trunk/LayoutTests/TestExpectations	2022-05-24 17:28:58 UTC (rev 294753)
+++ trunk/LayoutTests/TestExpectations	2022-05-24 18:48:31 UTC (rev 294754)
@@ -4638,6 +4638,7 @@
 webanimations/translate-property-and-translate-animation-with-delay-on-forced-layer.html [ Skip ]
 
 # CSS containment tests that fail
+imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-bfc-floats-001.html [ ImageOnlyFailure ]
 # webkit-ruby-text
 imported/w3c/web-platform-tests/css/css-contain/contain-layout-017.html [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-contain/contain-paint-021.html [ ImageOnlyFailure ]
@@ -4693,7 +4694,6 @@
 # Container queries
 webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-layout-container-001.https.html [ ImageOnlyFailure ]
 webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/svg-foreignobject-no-size-container.html [ Skip ]
-webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/inline-size-bfc-floats.html [ ImageOnlyFailure ]
 
 # Flaky css-contain test
 imported/w3c/web-platform-tests/css/css-contain/content-visibility/animation-display-lock.html [ Failure Pass ]

Deleted: trunk/LayoutTests/fast/block/float/float-avoider-with-shrinking-content-expected.html (294753 => 294754)


--- trunk/LayoutTests/fast/block/float/float-avoider-with-shrinking-content-expected.html	2022-05-24 17:28:58 UTC (rev 294753)
+++ trunk/LayoutTests/fast/block/float/float-avoider-with-shrinking-content-expected.html	2022-05-24 18:48:31 UTC (rev 294754)
@@ -1,28 +0,0 @@
-<style>
-.outer {
-  width: 150px;
-}
-
-.float {
-  float: left;
-  background-color: green;
-  width: 100px;
-  height: 100px
-}
-
-.right {
-  float: right;
-  background-color: blue;
-}
-
-.float_avoider {
-  width: 50px;
-  height: 200px;
-  background: yellow;
-}
-</style>
-<div class=outer>
-  <div class="float"></div>
-  <div class="float right"></div>
-  <div class="float float_avoider"></div>
-</div>

Deleted: trunk/LayoutTests/fast/block/float/float-avoider-with-shrinking-content.html (294753 => 294754)


--- trunk/LayoutTests/fast/block/float/float-avoider-with-shrinking-content.html	2022-05-24 17:28:58 UTC (rev 294753)
+++ trunk/LayoutTests/fast/block/float/float-avoider-with-shrinking-content.html	2022-05-24 18:48:31 UTC (rev 294754)
@@ -1,33 +0,0 @@
-<style>
-.outer {
-  width: 150px;
-}
-
-.float {
-  float: left;
-  background-color: green;
-  width: 100px;
-  height: 100px
-}
-
-.right {
-  float: right;
-  background-color: blue;
-}
-
-.float_avoider {
-  overflow: hidden;
-}
-
-.content {
-  display: inline-block;
-  width: 100px;
-  height: 200px;
-  background: yellow;
-}
-</style>
-<div class=outer>
-  <div class="float"></div>
-  <div class="float right"></div>
-  <div class=float_avoider><span class=content></span></div>
-</div>

Deleted: trunk/LayoutTests/fast/block/float/float-avoider-with-zero-width-expected.txt (294753 => 294754)


--- trunk/LayoutTests/fast/block/float/float-avoider-with-zero-width-expected.txt	2022-05-24 17:28:58 UTC (rev 294753)
+++ trunk/LayoutTests/fast/block/float/float-avoider-with-zero-width-expected.txt	2022-05-24 18:48:31 UTC (rev 294754)
@@ -1 +0,0 @@
-float avoider top position: 108

Deleted: trunk/LayoutTests/fast/block/float/float-avoider-with-zero-width.html (294753 => 294754)


--- trunk/LayoutTests/fast/block/float/float-avoider-with-zero-width.html	2022-05-24 17:28:58 UTC (rev 294753)
+++ trunk/LayoutTests/fast/block/float/float-avoider-with-zero-width.html	2022-05-24 18:48:31 UTC (rev 294754)
@@ -1,40 +0,0 @@
-<style>
-.outer {
-  width: 150px;
-}
-
-.float {
-  float: left;
-  background-color: green;
-  width: 100px;
-  height: 100px
-}
-
-.right {
-  float: right;
-  background-color: blue;
-}
-
-#float_avoider {
-  overflow: hidden;
-  width: 0px;
-}
-
-.content {
-  display: inline-block;
-  width: 100px;
-  height: 200px;
-  background: yellow;
-}
-</style>
-<div class=outer>
-  <div class="float"></div>
-  <div class="float right"></div>
-  <div id=float_avoider><span class=content></span></div>
-</div>
-<pre id=result></pre>
-<script>
-if (window.testRunner)
-  testRunner.dumpAsText();
-result.innerText = "float avoider top position: " + float_avoider.offsetTop;
-</script>
\ No newline at end of file

Added: trunk/LayoutTests/fast/block/float/zero-size-float-avoider-incorrect-position-expected.html (0 => 294754)


--- trunk/LayoutTests/fast/block/float/zero-size-float-avoider-incorrect-position-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/float/zero-size-float-avoider-incorrect-position-expected.html	2022-05-24 18:48:31 UTC (rev 294754)
@@ -0,0 +1,26 @@
+<style>
+.container {
+  background-color: green;
+  width: 200px;
+  height: 200px;
+}
+
+.block {
+  background-color: blue;
+  height: 100px;
+  width: 300px;
+}
+.relative {
+  width: 0px;
+  height: 0px;
+  overflow: hidden;
+  outline: 5px solid cyan;
+  position: relative;
+  left: 300px;
+  top: -100px;
+}
+</style>
+<div class=container>
+  <div class=block></div>
+  <div class=relative></div>
+</div>

Added: trunk/LayoutTests/fast/block/float/zero-size-float-avoider-incorrect-position.html (0 => 294754)


--- trunk/LayoutTests/fast/block/float/zero-size-float-avoider-incorrect-position.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/float/zero-size-float-avoider-incorrect-position.html	2022-05-24 18:48:31 UTC (rev 294754)
@@ -0,0 +1,24 @@
+<style>
+.container {
+  background-color: green;
+  width: 200px;
+  height: 200px;
+}
+
+.float {
+  float: left;
+  background-color: blue;
+  height: 100px;
+  width: 300px;
+}
+.overflow {
+  width: 0px;
+  height: 0px;
+  overflow: hidden;
+  outline: 5px solid cyan;
+}
+</style>
+<div class=container>
+  <div class=float></div>
+  <div class=overflow></div>
+</div>

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (294753 => 294754)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2022-05-24 17:28:58 UTC (rev 294753)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2022-05-24 18:48:31 UTC (rev 294754)
@@ -2843,8 +2843,7 @@
             child.setMarginLeft(childOldMarginLeft);
             child.setMarginRight(childOldMarginRight);
             
-            auto shouldAvoidCurrentVerticalPosition = !availableLogicalWidthAtNewLogicalTopOffset || childLogicalWidthAtNewLogicalTopOffset > availableLogicalWidthAtNewLogicalTopOffset;
-            if (!shouldAvoidCurrentVerticalPosition) {
+            if (childLogicalWidthAtNewLogicalTopOffset <= availableLogicalWidthAtNewLogicalTopOffset) {
                 // Even though we may not be moving, if the logical width did shrink because of the presence of new floats, then
                 // we need to force a relayout as though we shifted. This happens because of the dynamic addition of overhanging floats
                 // from previous siblings when negative margins exist on a child (see the addOverhangingFloats call at the end of collapseMargins).
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to