Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / layout / display-none-no-relayout.html
blobeb6964e5565ef07d370509c867fe6bf76d83637a
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 .a span {}
5 </style>
6 <div id="parent">
7 <span style="display:none"></span>
8 <div style="float:left;"></div>
9 <span></span>
10 </div>
11 <script>
12 // Force style recalc and layout.
13 document.body.offsetTop;
15 if (window.internals)
16 shouldBe("window.internals.needsLayoutCount()", "0", true);
18 var parent = document.getElementById("parent");
20 // Changing the class attribute here will cause a style recalc with a resulting
21 // reattach, but it should not cause a relayout.
22 parent.className = "a";
24 if (window.internals) {
25 shouldBe("window.internals.updateStyleAndReturnAffectedElementCount()", "2", true);
26 shouldBe("window.internals.needsLayoutCount()", "0", true);
28 </script>