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

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

Issue 215503003: Reland text autosizing changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/autosizingTest.js"></script>
6 <style>
7 #autosize {
8 font-size: 10px;
9 }
10 </style>
11 </head>
12 <body>
13 <div id="autosize">
14 This test verifies that a style recalc on a block with an autosizing multipl ier does not
15 cause an unnecessary relayout.
16 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tem por incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis n ostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Dui s aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fug iat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culp a qui officia deserunt mollit anim id est laborum.
17 </div>
18 <script>
19 // Force style recalc and layout.
20 document.body.offsetTop;
21
22 if (window.internals)
23 shouldBe("window.internals.needsLayoutCount()", "0", true);
24
25 // Should cause a repaint but no layout.
26 document.querySelector('#autosize').style.color = 'green';
27
28 if (window.internals) {
29 shouldBe("window.internals.updateStyleAndReturnAffectedElementCount()", "1", true);
30 shouldBe("window.internals.needsLayoutCount()", "0", true);
31 }
32 </script>
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698