[webkit-changes] [WebKit/WebKit] 1e66b0: [baseline-alignment][flex] Ascent for flex items t...

Sammy Gill noreply at github.com
Thu May 11 10:13:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1e66b0fc954597d3d357d1c7db0c7b8373dad8b1
      https://github.com/WebKit/WebKit/commit/1e66b0fc954597d3d357d1c7db0c7b8373dad8b1
  Author: Sammy Gill <sammy.gill at apple.com>
  Date:   2023-05-11 (Thu, 11 May 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-001.tentative-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-overflow-001-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-overflow-002-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-overflow-003-expected.txt
    M Source/WebCore/rendering/RenderBox.h
    M Source/WebCore/rendering/RenderFlexibleBox.cpp

  Log Message:
  -----------
  [baseline-alignment][flex] Ascent for flex items that are scroll containers should be clamped to the border box.
https://bugs.webkit.org/show_bug.cgi?id=246229
rdar://100908615

Reviewed by Alan Baradlay.

If a flex item is a scroll container (e.g. overflow scroll/hidden) then
it may provide an ascent value that is outside the visible content box
and result in a non-visible position being used for baseline alignment.

When determining the ascent of a flex item, we will check to see if it
is a scroll container by checking to see if it has an overflow value
of either scroll, hidden, or auto and then clamp the used ascent value
of the box to the bottom/top edges of its border box if it is.

https://drafts.csswg.org/css-align/#baseline-export

* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-001.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-overflow-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-overflow-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-overflow-003-expected.txt:
* Source/WebCore/rendering/RenderBox.h:
(WebCore::RenderBox::isScrollContainerX const):
(WebCore::RenderBox::isScrollContainerY const):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::flexItemIsScrollContainerCrossAxis const):
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
* Source/WebCore/rendering/RenderFlexibleBox.h:

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




More information about the webkit-changes mailing list