зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1821507 [wpt PR 38921] - [GridNG] Fix computed style values for non-layout subgrids, a=testonly
Automatic update from web-platform-tests [GridNG] Fix computed style values for non-layout subgrids This CL makes some changes in order to round-trip specified values when `subgrid` is specified on a non-subgrid. This necessitated a complete rewrite of how these values are queried for non-grids, as I discovered that the existing implementation improperly expands integer repeats when an auto repeat exists anywhere in the definition. This was an omission in the test cases, so I added various examples of this to grid-template-columns-computed-nogrid.html. The biggest change here is that in order to round-trip the specified values, we need to store some additional data in `NGGridTrackRepeater`. This includes creating repeaters of type `kNoRepeat` for subgrids, which brings them closer to standalone grids. However, this had some implications elsewhere. Layout needed some extra checks for subgrid when it builds the track collections, and placement behaves incorrectly when `track_count_without_auto_repeat_` incorporates these `kNoRepeat` tracks. grid-template-computed-nogrid.html didn't have any cases for integer repeats, so I added a bunch, both with and without auto repeats. Bug: 618969 Change-Id: If348f6b099a9032f067fa2299c9d3444d2f52a26 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4317507 Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Alison Maher <almaher@microsoft.com> Reviewed-by: Ethan Jimenez <ethavar@microsoft.com> Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1122559} -- wpt-commits: 8233b6326d0d3cffccebfe4743a3692857d52696 wpt-pr: 38921
This commit is contained in:
Родитель
0cb5575e87
Коммит
a498d99a6b
|
@ -26,6 +26,7 @@ test_computed_value("grid-template-columns", "1px repeat(1, 2px) 3px");
|
||||||
test_computed_value("grid-template-columns", "1px repeat(auto-fill, 2px) 3px");
|
test_computed_value("grid-template-columns", "1px repeat(auto-fill, 2px) 3px");
|
||||||
test_computed_value("grid-template-columns", "1px repeat(auto-fit, 2px) 3px");
|
test_computed_value("grid-template-columns", "1px repeat(auto-fit, 2px) 3px");
|
||||||
test_computed_value("grid-template-columns", "1px [a] repeat(1, 2px 3px) [b] 4px");
|
test_computed_value("grid-template-columns", "1px [a] repeat(1, 2px 3px) [b] 4px");
|
||||||
|
test_computed_value("grid-template-columns", "1px [a] repeat(2, 2px 3px) [b] 4px");
|
||||||
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fill, 2px 3px) [b] 4px");
|
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fill, 2px 3px) [b] 4px");
|
||||||
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fit, 2px 3px) [b] 4px");
|
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fit, 2px 3px) [b] 4px");
|
||||||
test_computed_value("grid-template-columns", "1px [a] repeat(1, [b] 2px [c]) [d] 3px");
|
test_computed_value("grid-template-columns", "1px [a] repeat(1, [b] 2px [c]) [d] 3px");
|
||||||
|
@ -33,6 +34,8 @@ test_computed_value("grid-template-columns", "1px [a] repeat(auto-fill, [b] 2px
|
||||||
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fit, [b] 2px [c]) [d] 3px");
|
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fit, [b] 2px [c]) [d] 3px");
|
||||||
test_computed_value("grid-template-columns", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]");
|
test_computed_value("grid-template-columns", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]");
|
||||||
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]");
|
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]");
|
||||||
|
test_computed_value("grid-template-columns", "[a] 1px 4px [d]");
|
||||||
|
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fill, 2px [b] 3px) [d] 4px");
|
||||||
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]");
|
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]");
|
||||||
test_computed_value("grid-template-rows", "100% [a] repeat(1, [b] 200% [c]) [d] 300%");
|
test_computed_value("grid-template-rows", "100% [a] repeat(1, [b] 200% [c]) [d] 300%");
|
||||||
test_computed_value("grid-template-rows", "100% [a] repeat(auto-fill, [b] 200% [c]) [d] 300%");
|
test_computed_value("grid-template-rows", "100% [a] repeat(auto-fill, [b] 200% [c]) [d] 300%");
|
||||||
|
@ -40,4 +43,9 @@ test_computed_value("grid-template-rows", "100% [a] repeat(auto-fit, [b] 200% [c
|
||||||
test_computed_value("grid-template-columns", "[a] 1em repeat(1, 2em [b] 3em) 4em [d]", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]");
|
test_computed_value("grid-template-columns", "[a] 1em repeat(1, 2em [b] 3em) 4em [d]", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]");
|
||||||
test_computed_value("grid-template-columns", "[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]");
|
test_computed_value("grid-template-columns", "[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]");
|
||||||
test_computed_value("grid-template-columns", "[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]");
|
test_computed_value("grid-template-columns", "[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]");
|
||||||
|
test_computed_value("grid-template-columns", "repeat(1, 2px [a] 3px) [b] repeat(auto-fill, [c] 200% [d]) [e] 300%");
|
||||||
|
test_computed_value("grid-template-columns", "[a] repeat(auto-fill, [b] 200% [c]) repeat(1, 2px [d] 3px) [e] 300%");
|
||||||
|
test_computed_value("grid-template-columns", "repeat(1, [a] 2px [b] 3px) [b] repeat(auto-fill, [c] 200% [d]) [e] 300%");
|
||||||
|
test_computed_value("grid-template-columns", "[a] repeat(auto-fill, [b] 200% [c]) repeat(1, 2px [d] 3px [e]) [f] 300%");
|
||||||
|
test_computed_value("grid-template-columns", "[a] 1px [b c] repeat(auto-fill, [d] 200% [e f]) [g] 2px repeat(1, 3px [d e] 4px [e f]) [g] 300% [h]");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -48,5 +48,22 @@ test_computed_value("grid-template-columns", "subgrid [a] repeat(auto-fill, [c]
|
||||||
test_computed_value("grid-template-columns", "subgrid [a b] repeat(auto-fill, [c] [d e]) [g]");
|
test_computed_value("grid-template-columns", "subgrid [a b] repeat(auto-fill, [c] [d e]) [g]");
|
||||||
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c] [d e]) [g h]");
|
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c] [d e]) [g h]");
|
||||||
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c] [d e])");
|
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c] [d e])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid [a] repeat(2, [c] [d e])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(1, [])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [a])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [a] [])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [] [a] [])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [] [] []) repeat(auto-fill, [] [] [])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(1, [a b])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [a b])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(1, [a] [b])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [a] [b])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid [a] repeat(2, [b])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [a]) [b]");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid [a] repeat(2, [b] [c d]) [e]");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [a b]) repeat(auto-fill, [c] [d e])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [a] [b c]) repeat(2, [d e])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid repeat(2, [a b]) repeat(auto-fill, [c] [d e]) repeat(2, [f g])");
|
||||||
|
test_computed_value("grid-template-columns", "subgrid [a] [b c] repeat(2, [d e]) [f] [g h] repeat(auto-fill, [i] [j k]) [l] repeat(2, [m n]) [o]");
|
||||||
</script>
|
</script>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче