OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../../resources/testharness.js"></script> |
3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../../resources/testharnessreport.js"></script> |
4 <style> | 4 <style> |
5 #t1 > span:nth-child(even) { | 5 #t1 > span:nth-child(even) { |
6 background-color: green | 6 background-color: green |
7 } | 7 } |
8 #t2 > span:nth-last-child(even) { | 8 #t2 > span:nth-last-child(even) { |
9 background-color: green | 9 background-color: green |
10 } | 10 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1); | 49 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1); |
50 }, "Prepending an element sibling should not affect :nth-last-child of succe
eding siblings."); | 50 }, "Prepending an element sibling should not affect :nth-last-child of succe
eding siblings."); |
51 | 51 |
52 test(() => { | 52 test(() => { |
53 t3.offsetTop; | 53 t3.offsetTop; |
54 let second = t3.querySelector(".second"); | 54 let second = t3.querySelector(".second"); |
55 backgroundIsTransparent(second); | 55 backgroundIsTransparent(second); |
56 t3.insertBefore(document.createElement("div"), t3.firstChild); | 56 t3.insertBefore(document.createElement("div"), t3.firstChild); |
57 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2); | 57 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2); |
58 backgroundIsGreen(second); | 58 backgroundIsGreen(second); |
59 }, "Prepending an element sibling should not affect :nth-last-child of succe
eding siblings."); | 59 }, "Prepending an element sibling causing :nth-child class invalidation."); |
60 | 60 |
61 </script> | 61 </script> |
OLD | NEW |