Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Use align-content when calculating the static position of absolutely-…
…positioned flexbox children. https://bugs.webkit.org/show_bug.cgi?id=221472 rdar://74278896 Reviewed by Sergio Villar Senin. Absolutely-positioned children of multi-line flex containers were not taking into account the value of align-content. Since abspos children are statically positioned as if they were the only flex item, we must compute the alignment of the hypothetical flex line that they would be on. * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild const): Added a lambda for computing the alignment offset of the hypothetical flex line that an abspos child of a flex container lives on. We don't fully implement the spec at this time since there is a webcompat issue for fallback behavior for align-content: stretch. We maintain our current behavior and compatibility with all other engines and we compute position as if the hypothetical flex line stretches to fill the container. (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild const): (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild): Deleted. Made into a const member function. (WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild): Deleted. Made into a const member function. * Source/WebCore/rendering/RenderFlexibleBox.h: LayoutTests: Rebaseline css/css-flexbox/abspos tests. * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-002-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-003-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-004-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-005-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-006-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-007-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-008-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-rtl-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-rtl-002-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-vertWM-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/abspos/flex-abspos-staticpos-align-content-vertWM-002-expected.txt: Canonical link: https://commits.webkit.org/253389@main
- Loading branch information
Showing
15 changed files
with
206 additions
and
463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.