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