| 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 .a1 span { background-color: green } | 4 .a1 span { background-color: green } |
| 5 .a2 span + div { background-color: green } | 5 .a2 span + div { background-color: green } |
| 6 .a3 * { background-color: green } | 6 .a3 * { background-color: green } |
| 7 </style> | 7 </style> |
| 8 <div id="t1"> | 8 <div id="t1"> |
| 9 <span></span> | 9 <span></span> |
| 10 <span></span> | 10 <span></span> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 for (var j=0; j<children[i].length; j++) { | 41 for (var j=0; j<children[i].length; j++) { |
| 42 var evalString = "getComputedStyle(children["+i+"]["+j+"], null).backgro
undColor"; | 42 var evalString = "getComputedStyle(children["+i+"]["+j+"], null).backgro
undColor"; |
| 43 shouldBe(evalString, "transparent"); | 43 shouldBe(evalString, "transparent"); |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 document.body.offsetTop; // Force style recalc. | 47 document.body.offsetTop; // Force style recalc. |
| 48 | 48 |
| 49 document.getElementById("t1").className = "a1"; | 49 document.getElementById("t1").className = "a1"; |
| 50 if (window.internals) | 50 if (window.internals) |
| 51 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); | 51 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); |
| 52 shouldBe("getComputedStyle(children[0][0], null).backgroundColor", "green"); | 52 shouldBe("getComputedStyle(children[0][0], null).backgroundColor", "green"); |
| 53 shouldBe("getComputedStyle(children[0][1], null).backgroundColor", "green"); | 53 shouldBe("getComputedStyle(children[0][1], null).backgroundColor", "green"); |
| 54 shouldBe("getComputedStyle(children[0][2], null).backgroundColor", "transparent"
); | 54 shouldBe("getComputedStyle(children[0][2], null).backgroundColor", "transparent"
); |
| 55 shouldBe("getComputedStyle(children[0][3], null).backgroundColor", "transparent"
); | 55 shouldBe("getComputedStyle(children[0][3], null).backgroundColor", "transparent"
); |
| 56 | 56 |
| 57 document.body.offsetLeft; // force style recalc. | 57 document.body.offsetLeft; // force style recalc. |
| 58 | 58 |
| 59 document.getElementById("t2").className = "a2"; | 59 document.getElementById("t2").className = "a2"; |
| 60 if (window.internals) | 60 if (window.internals) |
| 61 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); | 61 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); |
| 62 shouldBe("getComputedStyle(children[1][0], null).backgroundColor", "transparent"
); | 62 shouldBe("getComputedStyle(children[1][0], null).backgroundColor", "transparent"
); |
| 63 shouldBe("getComputedStyle(children[1][1], null).backgroundColor", "transparent"
); | 63 shouldBe("getComputedStyle(children[1][1], null).backgroundColor", "transparent"
); |
| 64 shouldBe("getComputedStyle(children[1][2], null).backgroundColor", "green"); | 64 shouldBe("getComputedStyle(children[1][2], null).backgroundColor", "green"); |
| 65 shouldBe("getComputedStyle(children[1][3], null).backgroundColor", "transparent"
); | 65 shouldBe("getComputedStyle(children[1][3], null).backgroundColor", "transparent"
); |
| 66 | 66 |
| 67 document.body.offsetLeft; // force style recalc. | 67 document.body.offsetLeft; // force style recalc. |
| 68 | 68 |
| 69 document.getElementById("t3").className = "a3"; | 69 document.getElementById("t3").className = "a3"; |
| 70 if (window.internals) | 70 if (window.internals) |
| 71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); | 71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); |
| 72 shouldBe("getComputedStyle(children[2][0], null).backgroundColor", "green"); | 72 shouldBe("getComputedStyle(children[2][0], null).backgroundColor", "green"); |
| 73 shouldBe("getComputedStyle(children[2][1], null).backgroundColor", "green"); | 73 shouldBe("getComputedStyle(children[2][1], null).backgroundColor", "green"); |
| 74 shouldBe("getComputedStyle(children[2][2], null).backgroundColor", "green"); | 74 shouldBe("getComputedStyle(children[2][2], null).backgroundColor", "green"); |
| 75 shouldBe("getComputedStyle(children[2][3], null).backgroundColor", "green"); | 75 shouldBe("getComputedStyle(children[2][3], null).backgroundColor", "green"); |
| 76 | 76 |
| 77 </script> | 77 </script> |
| OLD | NEW |