Skip to content

Commit 9b473ac

Browse files
author
Simon Pieters
committed
[cssom-view] Define what devicePixelRatio returns when there's no screen. https://www.w3.org/Bugs/Public/show_bug.cgi?id=23555
1 parent 6e163e8 commit 9b473ac

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

cssom-view/Overview.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ <h2 id="extensions-to-the-window-interface"><span class="secno">5 </span>Extensi
715715
<p>The <dfn id="dom-window-devicepixelratio" title="dom-Window-devicePixelRatio"><code>devicePixelRatio</code></dfn> attribute must return the result of the following algorithm:
716716

717717
<ol>
718+
<li><p>If there is no output device, return 1 and abort these steps.
718719
<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
719720
factor of 1.0.
720721
<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

cssom-view/Overview.src.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ <h2>Extensions to the <code title>Window</code> Interface</h2>
672672
<p>The <dfn title=dom-Window-devicePixelRatio><code>devicePixelRatio</code></dfn> attribute must return the result of the following algorithm:
673673

674674
<ol>
675+
<li><p>If there is no output device, return 1 and abort these steps.
675676
<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
676677
factor of 1.0.
677678
<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

0 commit comments

Comments
 (0)