Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GridNG] Fix querying %-padding on grid-items.
As above. ComputedCSSPadding will simply look at the available inline-size of its containing-block. Legacy grid worked by setting the override containing-block inline-size. This patch writes back the %-size. This isn't ideal - in a future world we should answer these queries directly from the fragment(s), but we aren't there yet. Bug: 1045599 Change-Id: I3afd8d03b0410dd0e02aba4133de28d92432630e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2721043 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#858396}
- Loading branch information
Showing
6 changed files
with
28 additions
and
15 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
13 changes: 13 additions & 0 deletions
13
...nk/web_tests/external/wpt/css/css-grid/grid-items/grid-items-percentage-paddings-015.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-item-sizing"> | ||
<meta name="assert" content="Checks that the %-padding accessed from script, for an OOF descendant resolves correctly."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/check-layout-th.js"></script> | ||
<body onload="checkLayout('#target')"> | ||
<div style="display: inline-grid; position: relative; grid-template: 50px 20px / 50px 20px;"> | ||
<div style="grid-area: 2/2/2/2;"> | ||
<div id="target" style="position: absolute; top: 0; left: 0; grid-area: 1/1/1/1; padding: 100%; background: green;" data-expected-padding-left="50" data-expected-padding-top="50"></div> | ||
</div> | ||
</div> | ||
</div> |