| OLD | NEW |
| 1 <?xml version="1.0" encoding="utf-8"?> | 1 <?xml version="1.0" encoding="utf-8"?> |
| 2 <head> | 2 <head> |
| 3 <!-- | 3 <!-- |
| 4 Related spec: http://www.w3.org/TR/css-device-adapt/ | 4 Related spec: http://www.w3.org/TR/css-device-adapt/ |
| 5 | 5 |
| 6 XHTML-MP is used for mobile documents which are assumed to be designed for | 6 XHTML-MP is used for mobile documents which are assumed to be designed for |
| 7 handheld devices, hence using the viewport size as the initial containing | 7 handheld devices, hence using the viewport size as the initial containing |
| 8 block size, so using XHTML-MP will give the same result as a viewport | 8 block size, so using XHTML-MP will give the same result as a viewport |
| 9 meta tag with the following parameters: | 9 meta tag with the following parameters: |
| 10 | 10 |
| 11 width=device-width, height=device-height, initial-scale=1 | 11 width=device-width, height=device-height, initial-scale=1 |
| 12 | 12 |
| 13 However XHTML-MP is a legacy way of setting the viewport, so any viewport | 13 However XHTML-MP is a legacy way of setting the viewport, so any viewport |
| 14 related meta tag takes precedence. | 14 related meta tag takes precedence. |
| 15 | 15 |
| 16 This test if a missplaced XHTML-MP doctype entry doesn't change the already | 16 This test if a missplaced XHTML-MP doctype entry doesn't change the already |
| 17 set viewport settings. | 17 set viewport settings. |
| 18 | 18 |
| 19 --> | 19 --> |
| 20 <meta name="viewport" content="width=640" /> | 20 <meta name="viewport" content="width=640" /> |
| 21 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wa
pforum.org/DTD/xhtml-mobile10.dtd"> | 21 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wa
pforum.org/DTD/xhtml-mobile10.dtd"> |
| 22 <title>Default viewport value changed by XHTML-MP and overwritten by viewpor
t meta tag</title> | 22 <title>Default viewport value changed by XHTML-MP and overwritten by viewpor
t meta tag</title> |
| 23 <script> | 23 <script> |
| 24 function test() { | 24 function test() { |
| 25 if (window.testRunner) { | 25 if (window.testRunner) { |
| 26 testRunner.dumpAsText(); | 26 testRunner.dumpAsText(); |
| 27 alert(internals.configurationForViewport(document, 1, 320, 480,
320, 352)); | 27 alert(internals.viewportAsText(document, 1, 320, 352)); |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 </script> | 30 </script> |
| 31 </head> | 31 </head> |
| 32 <body onload="test();" /> | 32 <body onload="test();" /> |
| OLD | NEW |