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 input { background: transparent } | 4 input { background: transparent } |
5 :enabled { background-color: green } | 5 :enabled { background-color: green } |
6 input + div { color: pink } | 6 input + div { color: pink } |
7 </style> | 7 </style> |
8 <input id="button" type="button" disabled></input> | 8 <input id="button" type="button" disabled></input> |
9 <div> | 9 <div> |
10 <div></div> | 10 <div></div> |
11 <div></div> | 11 <div></div> |
12 <div></div> | 12 <div></div> |
13 <div></div> | 13 <div></div> |
14 </div> | 14 </div> |
15 <script> | 15 <script> |
16 description("Use descendant invalidation set for :enabled pseudo class.") | 16 description("Use descendant invalidation set for :enabled pseudo class.") |
17 | 17 |
18 var transparent = "rgba(0, 0, 0, 0)"; | 18 var transparent = "rgba(0, 0, 0, 0)"; |
19 var green = "rgb(0, 128, 0)"; | 19 var green = "rgb(0, 128, 0)"; |
20 | 20 |
21 shouldBe("getComputedStyle(button, '').backgroundColor", "transparent"); | 21 shouldBe("getComputedStyle(button, '').backgroundColor", "transparent"); |
22 | 22 |
23 button.offsetTop; // Force recalc. | 23 button.offsetTop; // Force recalc. |
24 | 24 |
25 button.disabled = false; | 25 button.disabled = false; |
26 | 26 |
27 if (window.internals) | 27 if (window.internals) |
28 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 28 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1
"); |
29 | 29 |
30 shouldBe("getComputedStyle(button, '').backgroundColor", "green"); | 30 shouldBe("getComputedStyle(button, '').backgroundColor", "green"); |
31 </script> | 31 </script> |
OLD | NEW |