[webkit-changes] [WebKit/WebKit] 9aa15d: [Grid] Start considering overflow position from fa...

Sammy Gill noreply at github.com
Thu Aug 15 12:35:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9aa15d360c9652bf887c6c33776a81fb37010356
      https://github.com/WebKit/WebKit/commit/9aa15d360c9652bf887c6c33776a81fb37010356
  Author: Sammy Gill <sammy.gill at apple.com>
  Date:   2024-08-15 (Thu, 15 Aug 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001-expected.txt
    M Source/WebCore/rendering/RenderGrid.cpp

  Log Message:
  -----------
  [Grid] Start considering overflow position from fallback alignment of distributed alignment values.
https://bugs.webkit.org/show_bug.cgi?id=278118
rdar://133865365

Reviewed by Alan Baradlay.

We currently apply alignment safety when the content would overflow and
our content alignment value has an overflow position of safe. This will
only work if safe was specified alongside the content position, but
we also need to consider the fallback alignment of the content
distribution values if that was used instead. Certain content
distribution values have a fallback alignment of safe so we will need
to respect those.

In order to do this we need to change resolveContentDistributionFallback
to return a pair OverflowAlignment and ContentPosition. We will then
consider this OverflowAlignment value when checking for alignment safety.

I also moved creating the "position," now "usedContentPosition" to right
before performing the <content-position> / fallback positioning since
that is when we will need it. If the ContentDistribution value is not
default then we should not need to also check if ContentPosition is
normal since that should already be the case.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-place-content-001-expected.txt:
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::resolveContentDistributionFallback):
(WebCore::RenderGrid::computeContentPositionAndDistributionOffset):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list