Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: LayoutTests/fast/layout/display-none-no-relayout.html

Issue 188543002: Avoid reattachWhitespaceSiblings when renderer does not change. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « no previous file | LayoutTests/fast/layout/display-none-no-relayout-expected.txt » ('j') | Source/core/dom/Element.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698