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

Side by Side Diff: LayoutTests/fast/text-autosizing/oscillation-javascript-fontsize-change.html

Issue 16019004: Text Autosizing: Treat position:absolute/fixed as constrained height. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html style="font-size: 16px"> 2 <html style="font-size: 16px">
3 <head> 3 <head>
4 4
5 <meta name="viewport" content="width=800"> 5 <meta name="viewport" content="width=800">
6 <style> 6 <style>
7 body { 7 body {
8 width: 800px; 8 width: 800px;
9 margin: 0; 9 margin: 0;
10 overflow-y: hidden; 10 overflow-y: hidden;
11 } 11 }
12 .largersize{font-size: 1.1em} 12 .largersize{font-size: 1.1em}
13 </style> 13 </style>
14 14
15 <script> 15 <script>
16 if (window.internals) { 16 if (window.internals) {
17 window.internals.settings.setTextAutosizingEnabled(true); 17 window.internals.settings.setTextAutosizingEnabled(true);
18 window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480); 18 window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
19 } else if (window.console && console.warn) { 19 } else if (window.console && console.warn) {
20 console.warn("This test depends on the Text Autosizing setting being true, s o run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_ FORCE_TEXT_AUTOSIZING_ON_DESKTOP."); 20 console.warn("This test depends on the Text Autosizing setting being true, s o run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_ FORCE_TEXT_AUTOSIZING_ON_DESKTOP.");
21 } 21 }
22 </script> 22 </script>
23 23
24 </head> 24 </head>
25 <body> 25 <body>
26 26
27 <div style="top:50px;position:absolute;"> 27 <div style="top: 50px; position: absolute; overflow: auto;">
28 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br/> 28 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br/>
29 This paragraph should be autosized to 19.8px<br/> 29 This paragraph should be autosized to 19.8px<br/>
30 because it contains line breaks.<br/> 30 because it contains line breaks.<br/>
31 This test is intended to check<br/> 31 This test is intended to check<br/>
32 that there are no oscillations due to javascript<br/> 32 that there are no oscillations due to javascript<br/>
33 briefly increasing the font size of a<br/> 33 briefly increasing the font size of a<br/>
34 small paragraph below. 34 small paragraph below.
35 </div> 35 </div>
36 <div id="sizechanging"> 36 <div id="sizechanging">
37 This text changes size using javascript below. 37 This text changes size using javascript below.
38 </div> 38 </div>
39 39
40 <script> 40 <script>
41 element = document.getElementById("sizechanging"); 41 element = document.getElementById("sizechanging");
42 if (element.offsetHeight) { 42 if (element.offsetHeight) {
43 // force layout (computation of offsetHeight triggers reflow) 43 // force layout (computation of offsetHeight triggers reflow)
44 } 44 }
45 element.className = 'largersize'; 45 element.className = 'largersize';
46 if (element.offsetHeight) {} 46 if (element.offsetHeight) {}
47 element.className = ''; 47 element.className = '';
48 if (element.offsetHeight) {} 48 if (element.offsetHeight) {}
49 </script> 49 </script>
50 <noscript>fail (no support for javascript)</noscript> 50 <noscript>fail (no support for javascript)</noscript>
51 51
52 </body> 52 </body>
53 </html> 53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698