|
16 | 16 |
|
17 | 17 | <h1>CSSOM View Module</h1> |
18 | 18 |
|
19 | | - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 9 October 2013</h2> |
| 19 | + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 17 October 2013</h2> |
20 | 20 |
|
21 | 21 | <dl> |
22 | 22 |
|
@@ -83,7 +83,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2> |
83 | 83 | can be found in the <a href="http://www.w3.org/TR/">W3C technical reports |
84 | 84 | index at http://www.w3.org/TR/.</a></em> |
85 | 85 |
|
86 | | -<p>This is the 9 October 2013 Editor's Draft of CSSOM View. Please send |
| 86 | +<p>This is the 17 October 2013 Editor's Draft of CSSOM View. Please send |
87 | 87 | comments to |
88 | 88 | <a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a> |
89 | 89 | (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) |
@@ -117,7 +117,8 @@ <h2 class="no-num no-toc" id="toc">Table of Contents</h2> |
117 | 117 | <li><a href="#web-idl"><span class="secno">2.1 </span>Web IDL</a></ul></li> |
118 | 118 | <li><a href="#terminology"><span class="secno">3 </span>Terminology</a> |
119 | 119 | <ul class="toc"> |
120 | | - <li><a href="#css-pixels"><span class="secno">3.1 </span>CSS pixels</a></ul></li> |
| 120 | + <li><a href="#css-pixels"><span class="secno">3.1 </span>CSS pixels</a></li> |
| 121 | + <li><a href="#zooming"><span class="secno">3.2 </span>Zooming</a></ul></li> |
121 | 122 | <li><a href="#common-infrastructure"><span class="secno">4 </span>Common Infrastructure</a> |
122 | 123 | <ul class="toc"> |
123 | 124 | <li><a href="#scrolling"><span class="secno">4.1 </span>Scrolling</a></ul></li> |
@@ -433,6 +434,11 @@ <h3 id="css-pixels"><span class="secno">3.1 </span>CSS pixels</h3> |
433 | 434 | are explicitly given there.</p> |
434 | 435 |
|
435 | 436 |
|
| 437 | +<h3 id="zooming"><span class="secno">3.2 </span>Zooming</h3> |
| 438 | + |
| 439 | +<p>There are two kinds of zoom, <dfn id="page-zoom">page zoom</dfn> which affects the size of the initial viewport<!-- XXX ref -->, and <dfn id="pinch-zoom">pinch zoom</dfn> which acts like |
| 440 | +a magnifying glass and does not affect the initial viewport<!-- XXX ref --> or actual viewport<!-- XXX ref -->. <a href="#refsCSSDEVICEADAPT">[CSSDEVICEADAPT]</a> |
| 441 | + |
436 | 442 |
|
437 | 443 | <h2 id="common-infrastructure"><span class="secno">4 </span>Common Infrastructure</h2> |
438 | 444 |
|
@@ -706,9 +712,15 @@ <h2 id="extensions-to-the-window-interface"><span class="secno">5 </span>Extensi |
706 | 712 | client window. If there is no client window this |
707 | 713 | attribute must return zero. <!--fingerprint--></p> |
708 | 714 |
|
709 | | -<p>The <dfn id="dom-window-devicepixelratio" title="dom-Window-devicePixelRatio"><code>devicePixelRatio</code></dfn> attribute must return the result of dividing the size of a CSS pixel at 100% |
710 | | -zoom by the size of a device pixel of the output device, in one dimension (vertical or horizontal). If the device pixel is not square, then the smaller of the |
711 | | -vertical or horizontal size of the smallest bounding box of the device pixel must be used. |
| 715 | +<p>The <dfn id="dom-window-devicepixelratio" title="dom-Window-devicePixelRatio"><code>devicePixelRatio</code></dfn> attribute must return the result of the following algorithm: |
| 716 | + |
| 717 | +<ol> |
| 718 | + <li><p>Let <var>CSS pixel size</var> be the size of a CSS pixel at the current <a href="#page-zoom">page zoom</a> scale factor and at a <a href="#pinch-zoom">pinch zoom</a> scale |
| 719 | + factor of 1.0. |
| 720 | + <li><p>Let <var>device pixel size</var> be the size of a device pixel of the output device, in one dimension (vertical or horizontal). If the device pixel is |
| 721 | + not square, then use the smaller of the vertical or horizontal size of the smallest bounding box of the device pixel. |
| 722 | + <li><p>Return the result of dividing <var>CSS pixel size</var> by <var>device pixel size</var>. |
| 723 | +</ol> |
712 | 724 |
|
713 | 725 |
|
714 | 726 | <h4 id="the-features-argument-to-the-open()-method"><span class="secno">5.1 </span>The <var>features</var> argument to the <code title="">open()</code> method</h4> |
@@ -1884,9 +1896,9 @@ <h2 id="events"><span class="secno">12 </span>Events</h2> |
1884 | 1896 |
|
1885 | 1897 | <h3 id="resizing-viewports"><span class="secno">12.1 </span>Resizing viewports</h3> |
1886 | 1898 |
|
1887 | | -<p>Whenever a <a href="#viewport">viewport</a> has its width or height changed (e.g. as a result of the user resizing the browser window, or zooming in, or an |
1888 | | -<code title="">iframe</code> element's dimensions are changed), the user agent must <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">queue a task</a> to |
1889 | | -<a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-event-fire" title="concept-event-fire">fire an event</a> event named |
| 1899 | +<p>Whenever a <a href="#viewport">viewport</a> has its width or height changed (e.g. as a result of the user resizing the browser window, or changing the <a href="#page-zoom">page |
| 1900 | +zoom</a> scale factor, or an <code title="">iframe</code> element's dimensions are changed), the user agent must <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">queue a task</a> |
| 1901 | +to <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-event-fire" title="concept-event-fire">fire an event</a> event named |
1890 | 1902 | <code title="">resize</code> at the <code class="external" data-anolis-spec="html"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#window">Window</a></code> object associated with that |
1891 | 1903 | <a href="#viewport">viewport</a>. If such a resize is ongoing over a period of time, the user agent must <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task" title="queue a task">queue</a> that |
1892 | 1904 | task at a user-agent-defined interval while the resize is ongoing. <!--fingerprint--> <!-- e.g. if you change the width of an iframe with a transition --> |
@@ -1943,6 +1955,9 @@ <h2 class="no-num" id="references">References</h2> |
1943 | 1955 | <div id="anolis-references"><dl><dt id="refsCSSBOX">[CSSBOX] |
1944 | 1956 | <dd><cite><a href="http://dev.w3.org/csswg/css-box/">CSS basic box model</a></cite>, Bert Bos and Anton Prowse. W3C. |
1945 | 1957 |
|
| 1958 | +<dt id="refsCSSDEVICEADAPT">[CSSDEVICEADAPT] |
| 1959 | +<dd><cite><a href="http://dev.w3.org/csswg/css-device-adapt/">CSS Device Adaptation</a></cite>, Rune Lillesveen, Øyvind Stenhaug and Florian Rivoal. |
| 1960 | + |
1946 | 1961 | <dt id="refsCSSOM">[CSSOM] |
1947 | 1962 | <dd><cite><a href="http://dev.w3.org/csswg/cssom/">CSS Object Model (CSSOM)</a></cite>, Simon Pieters and Glenn Adams. W3C. |
1948 | 1963 |
|
|
0 commit comments