OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> |
| 4 :target #match { background-color: green } |
| 5 #target + div { color: pink } |
| 6 </style> |
| 7 <div id="target"> |
| 8 <div></div> |
| 9 <div></div> |
| 10 <div> |
| 11 <div></div> |
| 12 <div id="match"></div> |
| 13 </div> |
| 14 <div></div> |
| 15 </div> |
| 16 <div> |
| 17 <div></div> |
| 18 <div></div> |
| 19 <div></div> |
| 20 <div></div> |
| 21 </div> |
| 22 <script> |
| 23 description("Use descendant invalidation set for :target pseudo class.") |
| 24 |
| 25 var transparent = "rgba(0, 0, 0, 0)"; |
| 26 var green = "rgb(0, 128, 0)"; |
| 27 |
| 28 shouldBe("getComputedStyle(match, '').backgroundColor", "transparent"); |
| 29 |
| 30 target.offsetTop; // Force recalc. |
| 31 |
| 32 document.location.hash = "#target"; |
| 33 |
| 34 // Should have checked that internals.updateStyleAndReturnAffectedElementCount() |
| 35 // equals 2 here, but the target style is updated synchronously from where the |
| 36 // target is set. |
| 37 |
| 38 shouldBe("getComputedStyle(match, '').backgroundColor", "green"); |
| 39 </script> |
OLD | NEW |