OLD | NEW |
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 overflow-x: hidden; | 11 overflow-x: hidden; |
12 } | 12 } |
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> | 27 <div> |
28 The below list items should be autosized to 40px computed font-size (16 * 800/32
0). Also the corresponding list markers should increase in size appropriately. T
he whole list is shifted to the right by 8px (14 (autosized marker width) * (1 -
1/2.5) rounded) to compensate the scaling of list item markers and make sure th
ey don't get chopped off. | 28 This test verifies that FastTextAutosizer considers a list item (LI) to be |
| 29 "text" for the purpose of determining the deepest block containing all text |
| 30 (DBCAT). If this were not the case, the cluster's DBCAT would be the DIV inside |
| 31 the LI, which hasn't entered layout yet when the list marker is autosized (causi
ng |
| 32 the autosizer to crash). |
29 </div> | 33 </div> |
30 <ul> | 34 <ul style="float:left"> |
31 <li><a>List item with a link</a></li> | 35 <li><div>List item list item list item list item list item list item list item |
32 <li><b>List item with bold text</b></li> | 36 list item list item list item list item list item list item list item list item |
33 <li>Simple plain list item</li> | 37 list item list item list item list item list item list item list item list item<
/div></li> |
34 <li><a>List item with a link as part of anonymous block</a><div></div></li> | |
35 </ul> | 38 </ul> |
36 | 39 |
37 </body> | 40 </body> |
38 </html> | 41 </html> |
OLD | NEW |