OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Font relative lengths in @viewport relative to initial font</title> | 4 <title>Font relative lengths in @viewport relative to initial font</title> |
5 <style> | 5 <style> |
6 html { font-size: 100px; } | 6 html { font-size: 100px; } |
7 </style> | 7 </style> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <script> | 10 <script> |
11 document.body.offsetWidth; // Trigger style resolving | 11 document.body.offsetWidth; // Trigger style resolving |
12 </script> | 12 </script> |
13 <style> | 13 <style> |
14 @viewport { | 14 @viewport { |
15 width: 10em; | 15 width: 10em; |
16 height: 10rem; | 16 height: 10rem; |
17 } | 17 } |
18 </style> | 18 </style> |
19 <script> | 19 <script> |
20 if (window.testRunner) { | 20 if (window.testRunner) { |
21 testRunner.addUserStyleSheet("@viewport { width: extend-to-zoom 980p
x; min-zoom: 0.25; max-zoom: 5; height: auto; zoom: auto; user-zoom: zoom; orien
tation: auto }", true); | 21 testRunner.injectStyleSheet("@viewport { width: extend-to-zoom 980px
; min-zoom: 0.25; max-zoom: 5; height: auto; zoom: auto; user-zoom: zoom; orient
ation: auto }", true); |
22 testRunner.dumpAsText(); | 22 testRunner.dumpAsText(); |
23 document.body.offsetWidth; // Trigger style resolving | 23 document.body.offsetWidth; // Trigger style resolving |
24 alert(internals.viewportAsText(document, 1, 320, 352)); | 24 alert(internals.viewportAsText(document, 1, 320, 352)); |
25 } | 25 } |
26 </script> | 26 </script> |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |