Skip to content

Commit c441b5c

Browse files
author
Simon Pieters
committed
[cssom-view] Define devicePixelRatio. https://www.w3.org/Bugs/Public/show_bug.cgi?id=23228
1 parent 14828a4 commit c441b5c

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

cssom-view/Overview.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<h1>CSSOM View Module</h1>
1818

19-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 7 October 2013</h2>
19+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 9 October 2013</h2>
2020

2121
<dl>
2222

@@ -83,7 +83,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2>
8383
can be found in the <a href="http://www.w3.org/TR/">W3C technical reports
8484
index at http://www.w3.org/TR/.</a></em>
8585

86-
<p>This is the 7 October 2013 Editor's Draft of CSSOM View. Please send
86+
<p>This is the 9 October 2013 Editor's Draft of CSSOM View. Please send
8787
comments to
8888
<a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a>
8989
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
@@ -530,6 +530,7 @@ <h2 id="extensions-to-the-window-interface"><span class="secno">5 </span>Extensi
530530
readonly attribute double <a href="#dom-window-screeny" title="dom-Window-screenY">screenY</a>;
531531
readonly attribute double <a href="#dom-window-outerwidth" title="dom-Window-outerWidth">outerWidth</a>;
532532
readonly attribute double <a href="#dom-window-outerheight" title="dom-Window-outerHeight">outerHeight</a>;
533+
readonly attribute double <a href="#dom-window-devicepixelratio" title="dom-Window-devicePixelRatio">devicePixelRatio</a>;
533534
};</pre>
534535

535536
<p>When the <dfn id="dom-window-matchmedia" title="dom-Window-matchMedia"><code>matchMedia(<var>query</var>)</code></dfn> method is invoked these steps must be run:</p>
@@ -705,6 +706,10 @@ <h2 id="extensions-to-the-window-interface"><span class="secno">5 </span>Extensi
705706
client window. If there is no client window this
706707
attribute must return zero. <!--fingerprint--></p>
707708

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.
712+
708713

709714
<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>
710715

@@ -1069,8 +1074,7 @@ <h2 id="extensions-to-the-element-interface"><span class="secno">7 </span>Extens
10691074
<li><p>If the element is the root element return the value of
10701075
<code title="dom-Window-scrollY"><a href="#dom-window-scrolly">scrollY</a></code>.</li>
10711076
<li><p>If the element is <a href="#the-html-body-element">the HTML <code title="">body</code> element</a>,
1072-
the <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> is in <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, and the element
1073-
does not have any overflow, return the value of
1077+
the <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> is in <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, return the value of
10741078
<code title="dom-Window-scrollY"><a href="#dom-window-scrolly">scrollY</a></code>.</li>
10751079
<li><p>Return the y-coordinate of the <a href="#scrolling-area">scrolling area</a> at the
10761080
alignment point with the top of the <a href="#padding-edge">padding edge</a> of the
@@ -1107,8 +1111,7 @@ <h2 id="extensions-to-the-element-interface"><span class="secno">7 </span>Extens
11071111
<li><p>If the element is the root element return the value of
11081112
<code title="dom-Window-scrollX"><a href="#dom-window-scrollx">scrollX</a></code>.</li>
11091113
<li><p>If the element is <a href="#the-html-body-element">the HTML <code title="">body</code> element</a>,
1110-
the <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> is in <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, and the element
1111-
does not have any overflow, return the value of
1114+
the <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> is in <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, return the value of
11121115
<code title="dom-Window-scrollX"><a href="#dom-window-scrollx">scrollX</a></code>.</li>
11131116
<li><p>Return the x-coordinate of the <a href="#scrolling-area">scrolling area</a> at the
11141117
alignment point with the left of the <a href="#padding-edge">padding edge</a> of the

cssom-view/Overview.src.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ <h2>Extensions to the <code title>Window</code> Interface</h2>
488488
readonly attribute double <span title=dom-Window-screenY>screenY</span>;
489489
readonly attribute double <span title=dom-Window-outerWidth>outerWidth</span>;
490490
readonly attribute double <span title=dom-Window-outerHeight>outerHeight</span>;
491+
readonly attribute double <span title=dom-Window-devicePixelRatio>devicePixelRatio</span>;
491492
};</pre>
492493

493494
<p>When the <dfn title=dom-Window-matchMedia><code>matchMedia(<var>query</var>)</code></dfn> method is invoked these steps must be run:</p>
@@ -663,6 +664,10 @@ <h2>Extensions to the <code title>Window</code> Interface</h2>
663664
client window. If there is no client window this
664665
attribute must return zero. <!--fingerprint--></p>
665666

667+
<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%
668+
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
669+
vertical or horizontal size of the smallest bounding box of the device pixel must be used.
670+
666671

667672
<h4>The <var>features</var> argument to the <code title>open()</code> method</h4>
668673

0 commit comments

Comments
 (0)