Content-Length: 413374 | pFad | http://github.com/mozilla/gecko-dev/commit/34b12bc262fbcd667a802e39802fa2e65a89b848

59 Bug 1750537 [wpt PR 32410] - [@container] Resolve logical units again… · mozilla/gecko-dev@34b12bc · GitHub
Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 34b12bc

Browse files
andruudmoz-wptsync-bot
authored andcommittedFeb 5, 2022
Bug 1750537 [wpt PR 32410] - [@container] Resolve logical units against element's writing-mode, a=testonly
Automatic update from web-platform-tests [@container] Resolve logical units against element's writing-mode Previously the unit 'qi' (for example) would resolve against the nearest inline-axis container. However, according to a recent resolution [1] writing-mode sensitive units resolve to a physical axis based on the target element's writing mode. This simplifies the container-relative unit resolution a bit, since can always use PhysicalAxes when searching for the correct container. Being able to resolve logical units in CSSToLengthConversionData also prepares for implementation of the new viewport units [2], which include a number of new logical variants as well. (They also resolve to physical in the same way). This CL should only affect code behind the CSSContainerRelativeUnits runtime flag (status:test). [1] w3c/csswg-drafts#6873 [2] https://crbug.com/1093055 Bug: 1223030, 1093055 Change-Id: I548a613609b46a38262d5de48e294dab1131853b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3387159 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/main@{#961390} -- wpt-commits: e328f1220b9604fb03a555a78af99c08ea9f0d61 wpt-pr: 32410
1 parent 09e0f69 commit 34b12bc

File tree

1 file changed

+15
-43
lines changed

1 file changed

+15
-43
lines changed
 

‎testing/web-platform/tests/css/css-contain/container-queries/container-units-selection.html

+15-43
Original file line numberDiff line numberDiff line change
@@ -69,61 +69,33 @@
6969
test(() => {
7070
try {
7171
c1.className = 'size w500 h400';
72-
c2.className = 'inline w300';
73-
c3.className = 'inline w100 h200 vertical';
74-
75-
// Should select c2, and resolve against w300.
76-
assert_unit_equals(child, '10qw', '30px');
77-
78-
// Should select c3, and resolve against h200.
79-
assert_unit_equals(child, '10qi', '20px');
80-
81-
// Should select c3, and resolve against h200.
82-
assert_unit_equals(child, '10qh', '20px');
83-
84-
// Should select c1, and resolve against h400.
85-
assert_unit_equals(child, '10qb', '40px');
86-
87-
c3.classList.remove('vertical');
88-
89-
// Should select c3, and resolve against w100.
90-
assert_unit_equals(child, '10qw', '10px');
91-
92-
// Should select c3, and resolve against w100.
93-
assert_unit_equals(child, '10qi', '10px');
94-
95-
// Should select c1, and resolve against h400.
96-
assert_unit_equals(child, '10qh', '40px');
97-
98-
// Should select c1, and resolve against h400.
99-
assert_unit_equals(child, '10qb', '40px');
100-
101-
} finally {
102-
for (let c of [c1, c2, c3, c4, child])
103-
c.className = '';
104-
}
105-
}, 'Container with vertical writing mode');
106-
107-
test(() => {
108-
try {
109-
c1.className = 'size w500 h400';
110-
c2.className = 'inline w300';
72+
c2.className = 'inline w300 h200';
11173

74+
// [qi, qb] corresponds to [qw, qh].
11275
assert_unit_equals(child, '10qw', '30px');
11376
assert_unit_equals(child, '10qi', '30px');
11477
assert_unit_equals(child, '10qh', '40px');
11578
assert_unit_equals(child, '10qb', '40px');
11679

11780
child.className = 'vertical';
118-
81+
// [qi, qb] now corresponds to [qh, qw].
11982
assert_unit_equals(child, '10qw', '30px');
120-
assert_unit_equals(child, '10qi', '30px');
83+
assert_unit_equals(child, '10qi', '40px');
12184
assert_unit_equals(child, '10qh', '40px');
122-
assert_unit_equals(child, '10qb', '40px');
85+
assert_unit_equals(child, '10qb', '30px');
86+
87+
c2.classList.add('vertical');
88+
// The inline containment on #c2 now applies to the vertical axis.
89+
// [qi, qb] still corresponds to [qh, qw], but we now expect
90+
// qh to resolve against #c2, and qw to resolve against #c1.
91+
assert_unit_equals(child, '10qw', '50px');
92+
assert_unit_equals(child, '10qi', '20px');
93+
assert_unit_equals(child, '10qh', '20px');
94+
assert_unit_equals(child, '10qb', '50px');
12395

12496
} finally {
12597
for (let c of [c1, c2, c3, c4, child])
12698
c.className = '';
12799
}
128-
}, 'Units are not affected by the writing-mode of the current element');
100+
}, 'Units respond to the writing-mode of the element');
129101
</script>

0 commit comments

Comments
 (0)
Failed to load comments.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/mozilla/gecko-dev/commit/34b12bc262fbcd667a802e39802fa2e65a89b848

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy