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

Unified Diff: LayoutTests/fast/text-autosizing/style-recalc-no-layout.html

Issue 208393008: Preserve autosizing multiplier on style recalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix clang build with missing header import. 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/text-autosizing/style-recalc-no-layout-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/text-autosizing/style-recalc-no-layout.html
diff --git a/LayoutTests/fast/text-autosizing/style-recalc-no-layout.html b/LayoutTests/fast/text-autosizing/style-recalc-no-layout.html
new file mode 100644
index 0000000000000000000000000000000000000000..f60a983467e4ce8732e0ee84dc41dbdec6f0dc00
--- /dev/null
+++ b/LayoutTests/fast/text-autosizing/style-recalc-no-layout.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/autosizingTest.js"></script>
+<style>
+#autosize {
+ font-size: 10px;
+}
+</style>
+</head>
+<body>
+ <div id="autosize">
+ This test verifies that a style recalc on a block with an autosizing multiplier does not
+ cause an unnecessary relayout.
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ </div>
+ <script>
+ // Force style recalc and layout.
+ document.body.offsetTop;
+
+ if (window.internals)
+ shouldBe("window.internals.needsLayoutCount()", "0", true);
+
+ // Should cause a repaint but no layout.
+ document.querySelector('#autosize').style.color = 'green';
+
+ if (window.internals) {
+ shouldBe("window.internals.updateStyleAndReturnAffectedElementCount()", "1", true);
+ shouldBe("window.internals.needsLayoutCount()", "0", true);
+ }
+ </script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/text-autosizing/style-recalc-no-layout-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698