| Index: LayoutTests/fast/layout/display-none-no-relayout.html
|
| diff --git a/LayoutTests/fast/layout/display-none-no-relayout.html b/LayoutTests/fast/layout/display-none-no-relayout.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b010807cade70a45081c39008d1700e0d73c17f9
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/layout/display-none-no-relayout.html
|
| @@ -0,0 +1,28 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<style>
|
| + .a span {}
|
| +</style>
|
| +<div id="parent">
|
| + <span style="display:none"></span>
|
| + <div style="float:left;"></div>
|
| + <span></span>
|
| +</div>
|
| +<script>
|
| +// Force style recalc and layout.
|
| +document.body.offsetTop;
|
| +
|
| +if (window.internals)
|
| + shouldBe("window.internals.needsLayoutCount()", "0", true);
|
| +
|
| +var parent = document.getElementById("parent");
|
| +
|
| +// Changing the class attribute here will cause a style recalc with a resulting
|
| +// reattach, but it should not cause a relayout.
|
| +parent.className = "a";
|
| +
|
| +if (window.internals) {
|
| + shouldBe("window.internals.updateStyleAndReturnAffectedElementCount()", "4", true);
|
| + shouldBe("window.internals.needsLayoutCount()", "0", true);
|
| +}
|
| +</script>
|
|
|