Skip to content

Commit 017a682

Browse files
lilleschromium-wpt-export-bot
authored andcommitted
Tree counting functions should not operate on the flat tree
Per resolution and PR[1] This is basically a revert of [2] and [3]. [1] w3c/csswg-drafts#12144 [2] https://crrev.com/09ec78e0186d6d28678452d305af13ce4cf092dd [3] https://crrev.com/335f039762e05639ba4f0efc00022b36a631e259 Bug: 413015181 Change-Id: I50b38a60745f85eae0346556863def756bd8f427 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6508508 Commit-Queue: Rune Lillesveen Reviewed-by: Steinar H Gunderson Cr-Commit-Position: refs/heads/main@{#1454908}
1 parent 41e38c6 commit 017a682

File tree

2 files changed

+5
-57
lines changed

2 files changed

+5
-57
lines changed

css/css-values/tree-counting/calc-sibling-function-in-shadow-dom.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
3434
3535
`;
36-
assert_equals(getComputedStyle(target).zIndex, '3');
37-
assert_equals(getComputedStyle(target).order, '3');
38-
assert_equals(getComputedStyle(target).orphans, '3');
39-
assert_equals(getComputedStyle(target).widows, '3');
40-
}, 'Host children have sibling-index() and sibling-count() based on assignedNodes order');
36+
assert_equals(getComputedStyle(target).zIndex, '4');
37+
assert_equals(getComputedStyle(target).order, '4');
38+
assert_equals(getComputedStyle(target).orphans, '4');
39+
assert_equals(getComputedStyle(target).widows, '4');
40+
}, 'Host children have sibling-index() and sibling-count() based on the DOM tree order');
4141
script>

css/css-values/tree-counting/sibling-function-invalidation.html

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -48,55 +48,3 @@
4848
assert_equals(t2.offsetHeight, 50);
4949
}, "5 siblings after removal");
5050
script>
51-
52-
<style>
53-
#t3 {
54-
width: calc(10px * sibling-index());
55-
height: 50px;
56-
background: teal;
57-
}
58-
style>
59-
<div>
60-
<template shadowrootmode="open">
61-
<slot>slot>
62-
template>
63-
<div id="rm3">div>
64-
<div>div>
65-
<div>div>
66-
<div>div>
67-
<div>div>
68-
<div id="t3">div>
69-
div>
70-
<script>
71-
test(() => assert_equals(t3.offsetWidth, 60), "Initially 6th slotted sibling");
72-
test(() => {
73-
rm3.slot = "null";
74-
assert_equals(t3.offsetWidth, 50);
75-
}, "5th sibling after slot change");
76-
script>
77-
78-
<style>
79-
#t4 {
80-
width: 50px;
81-
height: calc(10px * sibling-count());
82-
background: teal;
83-
}
84-
style>
85-
<div>
86-
<template shadowrootmode="open">
87-
<slot>slot>
88-
template>
89-
<div id="t4">div>
90-
<div>div>
91-
<div>div>
92-
<div>div>
93-
<div>div>
94-
<div id="rm4">div>
95-
div>
96-
<script>
97-
test(() => assert_equals(t4.offsetHeight, 60), "Initially 6 slotted siblings");
98-
test(() => {
99-
rm4.slot = "null";
100-
assert_equals(t4.offsetHeight, 50);
101-
}, "5 siblings after slot change");
102-
script>

0 commit comments

Comments
 (0)