Skip to content
Permalink
Browse files
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
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
alanbujtas committed May 24, 2022
1 parent 927d4f7 commit eea20329478ec4f1b4b6c4da29d2907b26af17d3
Showing 8 changed files with 52 additions and 105 deletions.
@@ -4638,6 +4638,7 @@ webanimations/transform-property-and-transform-animation-with-delay-on-forced-la
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 @@ webkit.org/b/238555 imported/w3c/web-platform-tests/css/css-contain/contain-flex
# 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 ]

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -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>
@@ -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>
@@ -2843,8 +2843,7 @@ LayoutUnit RenderBlockFlow::getClearDelta(RenderBox& child, LayoutUnit logicalTo
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).

0 comments on commit eea2032

Please sign in to comment.