Chromium Code Reviews| 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 .c5 > .c4 ~ .c3 .c2 + .c1 { background-color: green } | 4 .c5 > .c4 ~ .c3 .c2 + .c1 { background-color: green } | 
| 5 </style> | 5 </style> | 
| 6 <!-- | 6 <!-- | 
| 7 Expected sets | 7 Expected sets | 
| 8 | 8 | 
| 9 .c1 { } | 9 .c1 { } | 
| 10 .c2 { subtree } | 10 .c2 { subtree } | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 49 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 
| 50 | 50 | 
| 51 document.body.offsetTop; // Force style recalc. | 51 document.body.offsetTop; // Force style recalc. | 
| 52 i2.className = "c2"; | 52 i2.className = "c2"; | 
| 53 if (window.internals) | 53 if (window.internals) | 
| 54 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 54 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 
| 55 | 55 | 
| 56 document.body.offsetTop; // Force style recalc. | 56 document.body.offsetTop; // Force style recalc. | 
| 57 i3.className = "c3"; | 57 i3.className = "c3"; | 
| 58 if (window.internals) | 58 if (window.internals) | 
| 59 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 59 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); | 
| 
 
esprehn
2015/10/26 21:20:14
why did it go up?
 
Eric Willigers
2015/10/28 23:09:08
Addressed in https://codereview.chromium.org/14181
 
 | |
| 60 | 60 | 
| 61 document.body.offsetTop; // Force style recalc. | 61 document.body.offsetTop; // Force style recalc. | 
| 62 i4.className = "c4"; | 62 i4.className = "c4"; | 
| 63 if (window.internals) | 63 if (window.internals) | 
| 64 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 64 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 
| 65 | 65 | 
| 66 shouldBe("getComputedStyle(i1, null).backgroundColor", "transparent"); | 66 shouldBe("getComputedStyle(i1, null).backgroundColor", "transparent"); | 
| 67 | 67 | 
| 68 document.body.offsetLeft; // force style recalc. | 68 document.body.offsetLeft; // force style recalc. | 
| 69 i5.className = "c5"; | 69 i5.className = "c5"; | 
| 70 if (window.internals) | 70 if (window.internals) | 
| 71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 
| 72 | 72 | 
| 73 shouldBe("getComputedStyle(i1, null).backgroundColor", "green"); | 73 shouldBe("getComputedStyle(i1, null).backgroundColor", "green"); | 
| 74 | 74 | 
| 75 </script> | 75 </script> | 
| OLD | NEW |