Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: caab01d5e748531c1ff7fbcdab9b2da36801d73e
https://github.com/WebKit/WebKit/commit/caab01d5e748531c1ff7fbcdab9b2da36801d73e
Author: Sammy Gill <[email protected]>
Date: 2023-09-12 (Tue, 12 Sep 2023)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-001-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-002-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-justify-baseline-002-expected.txt
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
Log Message:
-----------
[css-grid] Last baseline aligned grid items should use the start of the last
track they span for their alignment context
https://bugs.webkit.org/show_bug.cgi?id=261244
rdar://115083708
Reviewed by Matt Woodrow.
Instead of using span.endLine() for a last baseline aligned grid item's
alignment context, we should use span.endLine() - 1. This will allow
them to be in the same alignment context and potentially the same
baseline sharing group as first baseline aligned items in the same
track. For example, both items in the following grid should be in
the same baseline sharing group and should be aligned together as a
result:
<style>
display: grid;
grid-auto-flow: column;
align-items: last baseline;
width: 200px;
writing-mode: vertical-lr;
}
background: lime;
margin-right: 20px;
padding-right: 20px;
font-size: 20px;
line-height: 20px;
align-self: first baseline;
writing-mode: vertical-rl;
}
background: hotpink;
font-size: 30px;
line-height: 30px;
writing-mode: vertical-lr;
}
</style>
<div id="grid">
<div>line1<br>line2</div>
<div>line1<br>line2</div>
<div>
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-001-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-002-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-justify-baseline-002-expected.txt:
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::alignmentContextForBaselineAlignment):
(WebCore::GridTrackSizingAlgorithm::updateBaselineAlignmentContext):
(WebCore::GridTrackSizingAlgorithm::baselineOffsetForChild const):
Canonical link: https://commits.webkit.org/267922@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes