Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4258e7ee63a17d362a9d57f91615925b176962ca
      
https://github.com/WebKit/WebKit/commit/4258e7ee63a17d362a9d57f91615925b176962ca
  Author: Elika Etemad <[email protected]>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-safe-overflow-position-002.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-safe-overflow-position-003.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-safe-overflow-position-004.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-safe-overflow-position-005.html
    M Source/WebCore/rendering/RenderFlexibleBox.cpp
    M Source/WebCore/rendering/RenderFlexibleBox.h

  Log Message:
  -----------
  Implement safe alignment in flexbox.
https://bugs.webkit.org/show_bug.cgi?id=263893
rdar://118000717

Reviewed by Sammy Gill.

Coverts alignment to Start when available space is negative and overflow 
alignment safety is on.

* LayoutTests/TestExpectations: Pass more tests!
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-safe-overflow-position-002.html:
 Fix (and augment) incorrect test.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-safe-overflow-position-003.html:
 Fix (and augment) incorrect test.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-safe-overflow-position-004.html:
 Fix (and augment) incorrect test.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-safe-overflow-position-005.html:
 Fix (and augment) incorrect test.
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::initialJustifyContentOffset): Apply overflow safety to main-axis 
content alignment.
(WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild): Apply 
overflow safety to static positioning.
(WebCore::RenderFlexibleBox::overflowAlignmentForChild const): Implement new 
helper method.
(WebCore::initialAlignContentOffset): Apply overflow safety to main-axis 
content alignment.
(WebCore::RenderFlexibleBox::alignFlexLines): Don't skip alignment calculation 
when safety is on, pass safety value to initialAlignContentOffset().
(WebCore::RenderFlexibleBox::alignChildren): Apply overflow safety to 
cross-axis item alignment.
(WebCore::RenderFlexibleBox::allowedLayoutOverflow const): Apply overflow 
safety to overflow bounds.
* Source/WebCore/rendering/RenderFlexibleBox.h: Add helper method 
overflowAlignmentForChild(), parallel to alignmentForChild().

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to