OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Use initial width for auto width if initial height is zero</title> | 4 <title>Use initial width for auto width if initial height is zero</title> |
5 <link rel="help" href="http://www.w3.org/TR/css-device-adapt/#constraining-v iewport-descriptor-values"> | 5 <link rel="help" href="http://www.w3.org/TR/css-device-adapt/#constraining-v iewport-descriptor-values"> |
6 <style type="text/css"> | 6 <style type="text/css"> |
7 @viewport { | 7 @viewport { |
8 width: auto; | 8 width: auto; |
9 height: 100px; | 9 height: 100px; |
10 } | 10 } |
11 </style> | 11 </style> |
12 <script type="text/javascript"> | 12 <script type="text/javascript"> |
13 if (window.testRunner) | |
14 testRunner.addUserStyleSheet("@viewport { width: extend-to-zoom 980p x; min-zoom: 0.25; max-zoom: 5; }", true); | |
kenneth.r.christiansen
2013/07/17 16:44:30
It is saver to add the other values as well with "
| |
15 | |
13 function test() { | 16 function test() { |
14 if (window.testRunner) { | 17 if (window.testRunner) { |
15 testRunner.dumpAsText(); | 18 testRunner.dumpAsText(); |
16 alert(internals.configurationForViewport(document, 1, 320, 480, 200, 0)); | 19 alert(internals.configurationForViewport(document, 1, 320, 480, 200, 0)); |
17 } | 20 } |
18 } | 21 } |
19 </script> | 22 </script> |
20 </head> | 23 </head> |
21 <body onload="test();"></body> | 24 <body onload="test();"></body> |
22 </html> | 25 </html> |
OLD | NEW |