| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
| 4 </head> | 4 </head> |
| 5 <div id="sheet-container"></div> | 5 <div id="sheet-container"></div> |
| 6 <div><!-- Extra divs so it's clear when we're doing a full document recalc --> | 6 <div><!-- Extra divs so it's clear when we're doing a full document recalc --> |
| 7 <div></div> | 7 <div></div> |
| 8 <div></div> | 8 <div></div> |
| 9 <div></div> | 9 <div></div> |
| 10 <div></div> | 10 <div></div> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 sheetContainer.innerHTML = '<style>.foo { color: green; }</style><style>.bar { c
olor: red; }</style>' | 31 sheetContainer.innerHTML = '<style>.foo { color: green; }</style><style>.bar { c
olor: red; }</style>' |
| 32 // 6 elements + documentElement + body get recalced. | 32 // 6 elements + documentElement + body get recalced. |
| 33 if (window.internals) | 33 if (window.internals) |
| 34 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "8"); | 34 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "8"); |
| 35 | 35 |
| 36 document.documentElement.offsetTop; | 36 document.documentElement.offsetTop; |
| 37 sheetContainer.innerHTML = '<style>.baz { color: blue; }</style>' | 37 sheetContainer.innerHTML = '<style>.baz { color: blue; }</style>' |
| 38 | 38 |
| 39 // 9 elements + documentElement + body get recalced. | 39 // 9 elements + documentElement + body get recalced. |
| 40 if (window.internals) | 40 if (window.internals) |
| 41 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "11"); | 41 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "10"); |
| 42 | 42 |
| 43 shouldBe("getComputedStyle(document.querySelector('.foo')).color", '"rgb(0, 0, 0
)"'); | 43 shouldBe("getComputedStyle(document.querySelector('.foo')).color", '"rgb(0, 0, 0
)"'); |
| 44 shouldBe("getComputedStyle(document.querySelector('.baz')).color", '"rgb(0, 0, 2
55)"'); | 44 shouldBe("getComputedStyle(document.querySelector('.baz')).color", '"rgb(0, 0, 2
55)"'); |
| 45 shouldBe("getComputedStyle(document.querySelector('.bar')).color", '"rgb(0, 0, 0
)"'); | 45 shouldBe("getComputedStyle(document.querySelector('.bar')).color", '"rgb(0, 0, 0
)"'); |
| 46 </script> | 46 </script> |
| OLD | NEW |