| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> | 3 <style> |
| 4 .scroller::-webkit-scrollbar { | 4 .scroller::-webkit-scrollbar { |
| 5 height: 5px; | 5 height: 5px; |
| 6 } | 6 } |
| 7 | 7 |
| 8 .scroller { | 8 .scroller { |
| 9 width: 200px; | 9 width: 200px; |
| 10 height: 10px; | 10 height: 10px; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 if (window.internals) | 82 if (window.internals) |
| 83 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "" + ex
pectedCount); | 83 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "" + ex
pectedCount); |
| 84 | 84 |
| 85 shouldBe(computedString, "green"); | 85 shouldBe(computedString, "green"); |
| 86 classElement.className = ""; | 86 classElement.className = ""; |
| 87 } | 87 } |
| 88 | 88 |
| 89 // The expected affected element counts below need an explanation: | 89 // The expected affected element counts below need an explanation: |
| 90 // | 90 // |
| 91 // The descendant selector tests invalidate 2 normal dom elements: | 91 // The descendant and sibling selector tests invalidate 2 normal dom elements: |
| 92 // #scrollerParent, #scroller1 | 92 // #scrollerParent, #scroller1 |
| 93 // | 93 // |
| 94 // The sibling selector tests invalidate 7 normal dom elements: | |
| 95 // #scrollerSibling, #scroller2, the div child of #scroller2 and its 4 spans | |
| 96 // | |
| 97 // In addition there the pseudo element selectors add the following pseudo eleme
nts | 94 // In addition there the pseudo element selectors add the following pseudo eleme
nts |
| 98 // on the #scroller1 and #scroller2 elements: | 95 // on the #scroller1 and #scroller2 elements: |
| 99 // | 96 // |
| 100 // ::-webkit-scrollbar: 1 scrollbar pseudo element (in total 3 and 8) | 97 // ::-webkit-scrollbar: 1 scrollbar pseudo element (in total 3) |
| 101 // ::-webkit-scrollbar-button: 1 scrollbar + 4 buttons (in total 7 and 12) | 98 // ::-webkit-scrollbar-button: 1 scrollbar + background + 4 buttons (in total 8) |
| 102 // ::-webkit-scrollbar-corner: 1 scrollbar + 1 corner (in total 4 and 9) | 99 // ::-webkit-scrollbar-corner: 1 scrollbar + 1 corner (in total 4) |
| 103 // ::-webkit-scrollbar-thumb: 1 scrollbar + 1 thumb (in total 4 and 9) | 100 // ::-webkit-scrollbar-thumb: 1 scrollbar + 1 thumb (in total 4) |
| 104 // ::-webkit-scrollbar-track: 1 scrollbar + 1 track (in total 4 and 9) | 101 // ::-webkit-scrollbar-track: 1 scrollbar + 1 track (in total 4) |
| 105 // ::-webkit-scrollbar-track-piece: 1 scrollbar + 2 track pieces (in total 5 and
10) | 102 // ::-webkit-scrollbar-track-piece: 1 scrollbar + 2 track pieces (in total 5) |
| 106 // ::-webkit-resizer: 1 scrollbar + 1 resizer (in total 4 and 9) | 103 // ::-webkit-resizer: 1 scrollbar + 1 resizer (in total 4) |
| 107 | 104 |
| 108 testScrollbarPseudo("::-webkit-scrollbar", "scroller1", scrollerParent, "t1", 2)
; | 105 testScrollbarPseudo("::-webkit-scrollbar", "scroller1", scrollerParent, "t1", 3)
; |
| 109 testScrollbarPseudo("::-webkit-scrollbar", "scroller2", scrollerSibling, "t2", 2
); | 106 testScrollbarPseudo("::-webkit-scrollbar", "scroller2", scrollerSibling, "t2", 3
); |
| 110 testScrollbarPseudo("::-webkit-scrollbar-button", "scroller1", scrollerParent, "
t3", 6); | 107 testScrollbarPseudo("::-webkit-scrollbar-button", "scroller1", scrollerParent, "
t3", 8); |
| 111 testScrollbarPseudo("::-webkit-scrollbar-button", "scroller2", scrollerSibling,
"t4", 6); | 108 testScrollbarPseudo("::-webkit-scrollbar-button", "scroller2", scrollerSibling,
"t4", 8); |
| 112 testScrollbarPseudo("::-webkit-scrollbar-corner", "scroller1", scrollerParent, "
t5", 3); | 109 testScrollbarPseudo("::-webkit-scrollbar-corner", "scroller1", scrollerParent, "
t5", 4); |
| 113 testScrollbarPseudo("::-webkit-scrollbar-corner", "scroller2", scrollerSibling,
"t6", 3); | 110 testScrollbarPseudo("::-webkit-scrollbar-corner", "scroller2", scrollerSibling,
"t6", 4); |
| 114 testScrollbarPseudo("::-webkit-scrollbar-thumb", "scroller1", scrollerParent, "t
7", 3); | 111 testScrollbarPseudo("::-webkit-scrollbar-thumb", "scroller1", scrollerParent, "t
7", 4); |
| 115 testScrollbarPseudo("::-webkit-scrollbar-thumb", "scroller2", scrollerSibling, "
t8", 3); | 112 testScrollbarPseudo("::-webkit-scrollbar-thumb", "scroller2", scrollerSibling, "
t8", 4); |
| 116 testScrollbarPseudo("::-webkit-scrollbar-track", "scroller1", scrollerParent, "t
9", 3); | 113 testScrollbarPseudo("::-webkit-scrollbar-track", "scroller1", scrollerParent, "t
9", 4); |
| 117 testScrollbarPseudo("::-webkit-scrollbar-track", "scroller2", scrollerSibling, "
t10", 3); | 114 testScrollbarPseudo("::-webkit-scrollbar-track", "scroller2", scrollerSibling, "
t10", 4); |
| 118 testScrollbarPseudo("::-webkit-scrollbar-track-piece", "scroller1", scrollerPare
nt, "t11", 4); | 115 testScrollbarPseudo("::-webkit-scrollbar-track-piece", "scroller1", scrollerPare
nt, "t11", 5); |
| 119 testScrollbarPseudo("::-webkit-scrollbar-track-piece", "scroller2", scrollerSibl
ing, "t12", 4); | 116 testScrollbarPseudo("::-webkit-scrollbar-track-piece", "scroller2", scrollerSibl
ing, "t12", 5); |
| 120 testScrollbarPseudo("::-webkit-resizer", "scroller1", scrollerParent, "t13", 3); | 117 testScrollbarPseudo("::-webkit-resizer", "scroller1", scrollerParent, "t13", 4); |
| 121 testScrollbarPseudo("::-webkit-resizer", "scroller2", scrollerSibling, "t14", 3)
; | 118 testScrollbarPseudo("::-webkit-resizer", "scroller2", scrollerSibling, "t14", 4)
; |
| 122 </script> | 119 </script> |
| OLD | NEW |