Thu, 17 Oct 2013 16:28:46 +0200
[cssom-view] Make devicePixelRatio take page zoom into account but ignore pinch zoom. https://www.w3.org/Bugs/Public/show_bug.cgi?id=23228
1.1 --- a/cssom-view/Overview.html Thu Oct 17 01:57:05 2013 -0700 1.2 +++ b/cssom-view/Overview.html Thu Oct 17 16:28:46 2013 +0200 1.3 @@ -16,7 +16,7 @@ 1.4 1.5 <h1>CSSOM View Module</h1> 1.6 1.7 - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 9 October 2013</h2> 1.8 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 17 October 2013</h2> 1.9 1.10 <dl> 1.11 1.12 @@ -83,7 +83,7 @@ 1.13 can be found in the <a href="http://www.w3.org/TR/">W3C technical reports 1.14 index at http://www.w3.org/TR/.</a></em> 1.15 1.16 -<p>This is the 9 October 2013 Editor's Draft of CSSOM View. Please send 1.17 +<p>This is the 17 October 2013 Editor's Draft of CSSOM View. Please send 1.18 comments to 1.19 <a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a> 1.20 (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) 1.21 @@ -117,7 +117,8 @@ 1.22 <li><a href="#web-idl"><span class="secno">2.1 </span>Web IDL</a></ul></li> 1.23 <li><a href="#terminology"><span class="secno">3 </span>Terminology</a> 1.24 <ul class="toc"> 1.25 - <li><a href="#css-pixels"><span class="secno">3.1 </span>CSS pixels</a></ul></li> 1.26 + <li><a href="#css-pixels"><span class="secno">3.1 </span>CSS pixels</a></li> 1.27 + <li><a href="#zooming"><span class="secno">3.2 </span>Zooming</a></ul></li> 1.28 <li><a href="#common-infrastructure"><span class="secno">4 </span>Common Infrastructure</a> 1.29 <ul class="toc"> 1.30 <li><a href="#scrolling"><span class="secno">4.1 </span>Scrolling</a></ul></li> 1.31 @@ -433,6 +434,11 @@ 1.32 are explicitly given there.</p> 1.33 1.34 1.35 +<h3 id="zooming"><span class="secno">3.2 </span>Zooming</h3> 1.36 + 1.37 +<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 1.38 +a magnifying glass and does not affect the initial viewport<!-- XXX ref --> or actual viewport<!-- XXX ref -->. <a href="#refsCSSDEVICEADAPT">[CSSDEVICEADAPT]</a> 1.39 + 1.40 1.41 <h2 id="common-infrastructure"><span class="secno">4 </span>Common Infrastructure</h2> 1.42 1.43 @@ -706,9 +712,15 @@ 1.44 client window. If there is no client window this 1.45 attribute must return zero. <!--fingerprint--></p> 1.46 1.47 -<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% 1.48 -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 1.49 -vertical or horizontal size of the smallest bounding box of the device pixel must be used. 1.50 +<p>The <dfn id="dom-window-devicepixelratio" title="dom-Window-devicePixelRatio"><code>devicePixelRatio</code></dfn> attribute must return the result of the following algorithm: 1.51 + 1.52 +<ol> 1.53 + <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 1.54 + factor of 1.0. 1.55 + <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 1.56 + not square, then use the smaller of the vertical or horizontal size of the smallest bounding box of the device pixel. 1.57 + <li><p>Return the result of dividing <var>CSS pixel size</var> by <var>device pixel size</var>. 1.58 +</ol> 1.59 1.60 1.61 <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> 1.62 @@ -1884,9 +1896,9 @@ 1.63 1.64 <h3 id="resizing-viewports"><span class="secno">12.1 </span>Resizing viewports</h3> 1.65 1.66 -<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 1.67 -<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 1.68 -<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 1.69 +<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 1.70 +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> 1.71 +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 1.72 <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 1.73 <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 1.74 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 --> 1.75 @@ -1943,6 +1955,9 @@ 1.76 <div id="anolis-references"><dl><dt id="refsCSSBOX">[CSSBOX] 1.77 <dd><cite><a href="http://dev.w3.org/csswg/css-box/">CSS basic box model</a></cite>, Bert Bos and Anton Prowse. W3C. 1.78 1.79 +<dt id="refsCSSDEVICEADAPT">[CSSDEVICEADAPT] 1.80 +<dd><cite><a href="http://dev.w3.org/csswg/css-device-adapt/">CSS Device Adaptation</a></cite>, Rune Lillesveen, Øyvind Stenhaug and Florian Rivoal. 1.81 + 1.82 <dt id="refsCSSOM">[CSSOM] 1.83 <dd><cite><a href="http://dev.w3.org/csswg/cssom/">CSS Object Model (CSSOM)</a></cite>, Simon Pieters and Glenn Adams. W3C. 1.84
2.1 --- a/cssom-view/Overview.src.html Thu Oct 17 01:57:05 2013 -0700 2.2 +++ b/cssom-view/Overview.src.html Thu Oct 17 16:28:46 2013 +0200 2.3 @@ -391,6 +391,11 @@ 2.4 are explicitly given there.</p> 2.5 2.6 2.7 +<h3>Zooming</h3> 2.8 + 2.9 +<p>There are two kinds of zoom, <dfn>page zoom</dfn> which affects the size of the initial viewport<!-- XXX ref -->, and <dfn>pinch zoom</dfn> which acts like 2.10 +a magnifying glass and does not affect the initial viewport<!-- XXX ref --> or actual viewport<!-- XXX ref -->. <span data-anolis-ref>CSSDEVICEADAPT</span> 2.11 + 2.12 2.13 <h2>Common Infrastructure</h2> 2.14 2.15 @@ -664,9 +669,15 @@ 2.16 client window. If there is no client window this 2.17 attribute must return zero. <!--fingerprint--></p> 2.18 2.19 -<p>The <dfn title=dom-Window-devicePixelRatio><code>devicePixelRatio</code></dfn> attribute must return the result of dividing the size of a CSS pixel at 100% 2.20 -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 2.21 -vertical or horizontal size of the smallest bounding box of the device pixel must be used. 2.22 +<p>The <dfn title=dom-Window-devicePixelRatio><code>devicePixelRatio</code></dfn> attribute must return the result of the following algorithm: 2.23 + 2.24 +<ol> 2.25 + <li><p>Let <var>CSS pixel size</var> be the size of a CSS pixel at the current <span>page zoom</span> scale factor and at a <span>pinch zoom</span> scale 2.26 + factor of 1.0. 2.27 + <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 2.28 + not square, then use the smaller of the vertical or horizontal size of the smallest bounding box of the device pixel. 2.29 + <li><p>Return the result of dividing <var>CSS pixel size</var> by <var>device pixel size</var>. 2.30 +</ol> 2.31 2.32 2.33 <h4>The <var>features</var> argument to the <code title>open()</code> method</h4> 2.34 @@ -1842,9 +1853,9 @@ 2.35 2.36 <h3>Resizing viewports</h3> 2.37 2.38 -<p>Whenever a <span>viewport</span> has its width or height changed (e.g. as a result of the user resizing the browser window, or zooming in, or an 2.39 -<code title>iframe</code> element's dimensions are changed), the user agent must <span data-anolis-spec=html>queue a task</span> to 2.40 -<span data-anolis-spec=dom title=concept-event-fire>fire an event</span> event named 2.41 +<p>Whenever a <span>viewport</span> has its width or height changed (e.g. as a result of the user resizing the browser window, or changing the <span>page 2.42 +zoom</span> scale factor, or an <code title>iframe</code> element's dimensions are changed), the user agent must <span data-anolis-spec=html>queue a task</span> 2.43 +to <span data-anolis-spec=dom title=concept-event-fire>fire an event</span> event named 2.44 <code title>resize</code> at the <code data-anolis-spec=html>Window</code> object associated with that 2.45 <span>viewport</span>. If such a resize is ongoing over a period of time, the user agent must <span data-anolis-spec=html title="queue a task">queue</span> that 2.46 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 -->
3.1 --- a/cssom/Overview.html Thu Oct 17 01:57:05 2013 -0700 3.2 +++ b/cssom/Overview.html Thu Oct 17 16:28:46 2013 +0200 3.3 @@ -16,7 +16,7 @@ 3.4 <h1>CSS Object Model (CSSOM)</h1> 3.5 3.6 3.7 - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 10 October 2013</h2> 3.8 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 17 October 2013</h2> 3.9 3.10 <dl> 3.11 3.12 @@ -90,7 +90,7 @@ 3.13 can be found in the 3.14 <a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em> 3.15 3.16 -<p class="dontpublish">This is the 10 October 2013 Editor's Draft of CSSOM. Please send comments to 3.17 +<p class="dontpublish">This is the 17 October 2013 Editor's Draft of CSSOM. Please send comments to 3.18 <a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a> 3.19 (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) 3.20 with <samp>[cssom]</samp> at the start of the subject line.