| 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 /* Make all divs relayout boundaries. */ | 4 /* Make all divs relayout boundaries. */ |
| 5 div { | 5 div { |
| 6 width: 100px; | 6 width: 100px; |
| 7 height: 100px; | 7 height: 100px; |
| 8 overflow: hidden; | 8 overflow: hidden; |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 document.documentElement.offsetTop; | 25 document.documentElement.offsetTop; |
| 26 | 26 |
| 27 // Pass quiet=true here so that the added nodes from the shouldBe don't | 27 // Pass quiet=true here so that the added nodes from the shouldBe don't |
| 28 // mess up the needsLayoutCount on line 45. | 28 // mess up the needsLayoutCount on line 45. |
| 29 if (window.internals) | 29 if (window.internals) |
| 30 shouldBe("window.internals.needsLayoutCount()", "0", true); | 30 shouldBe("window.internals.needsLayoutCount()", "0", true); |
| 31 | 31 |
| 32 dirtyLayout(); | 32 dirtyLayout(); |
| 33 | 33 |
| 34 // FIXME: In theory we can restrict the layoutRoot in FrameView to the common | 34 // The tree appears as following, with the starred nodes dirty: |
| 35 // ancestor container and this should only be 5 instead of 8. | 35 // div [relayout-common-ancestor] |
| 36 // / \ |
| 37 // *div *div |
| 38 // / / |
| 39 // *div *div |
| 36 if (window.internals) | 40 if (window.internals) |
| 37 shouldBe("window.internals.needsLayoutCount()", "8"); | 41 shouldBe("window.internals.needsLayoutCount()", "4"); |
| 38 | 42 |
| 39 document.documentElement.offsetTop; | 43 document.documentElement.offsetTop; |
| 40 | 44 |
| 41 if (window.internals) | 45 if (window.internals) |
| 42 shouldBe("window.internals.needsLayoutCount()", "0"); | 46 shouldBe("window.internals.needsLayoutCount()", "0"); |
| 43 </script> | 47 </script> |
| OLD | NEW |