























@@ -64,9 +64,6 @@
6464</section>
65656666<section id='sotd'>
67-<p>
68- TODO
69-</p>
7067</section>
71687269<section id="intro" class="informative">
@@ -137,7 +134,7 @@ <h3>Extensions to the <code>Window</code> interface</h3>
137134<h3>The <dfn><code>VisualViewport</code></dfn> interface</h3>
138135<p>
139136 A <a>VisualViewport</a> object represents the visual viewport for a <a>window</a>'s
140-<a>browsing context</a>. Each <a>window</a> on a page will have a unique
137+<a>browsing context</a>. Each <a>window</a> in a page has a distinct
141138<a>VisualViewport</a> object. This object represents the properties of the <a>window</a>'s
142139<a>associated Document</a>'s <a>browsing context</a> when that <a>Document</a> is
143140</a>fully active</a>.
@@ -161,7 +158,7 @@ <h3>The <dfn><code>VisualViewport</code></dfn> interface</h3>
161158 readonly attribute double height;
162159163160 readonly attribute double scale;
164-161+165162 readonly attribute FrozenArray<DOMRect>? segments;
166163167164 attribute EventHandler onresize;
@@ -176,7 +173,7 @@ <h3>The <dfn><code>VisualViewport</code></dfn> interface</h3>
176173</p>
177174<p>
178175 Otherwise, return the offset of the left edge of the visual viewport from the left edge
179- of the layout viewport in CSS pixels.
176+ of the <a>associated Document</a>'s layout viewport in CSS pixels.
180177</p>
181178</dd>
182179<dt><dfn>offsetTop</dfn></dt>
@@ -186,7 +183,7 @@ <h3>The <dfn><code>VisualViewport</code></dfn> interface</h3>
186183</p>
187184<p>
188185 Otherwise, return the offset of the top edge of the visual viewport from the top edge of
189- the layout viewport in CSS pixels.
186+ the <a>associated Document</a>'s layout viewport in CSS pixels.
190187</p>
191188</dd>
192189@@ -196,7 +193,7 @@ <h3>The <dfn><code>VisualViewport</code></dfn> interface</h3>
196193 If the <a>window</a>'s <a>associated Document</a> is not <a>fully active</a>, return 0.
197194</p>
198195<p>
199- Otherwise, return the x-coordinate, relative to the
196+ Otherwise, return the x-coordinate, relative to the <a>associated Document</a>'s
200197<dfn data-cite="!CSS-DISPLAY-3#initial-containing-block">initial containing block</dfn>
201198 origin, of the left edge of the visual viewport in CSS pixels.
202199</p>
@@ -207,7 +204,8 @@ <h3>The <dfn><code>VisualViewport</code></dfn> interface</h3>
207204 If the <a>window</a>'s <a>associated Document</a> is not <a>fully active</a>, return 0.
208205</p>
209206<p>
210- Otherwise, return the y-coordinate, relative to the <a>initial containing block</a>
207+ Otherwise, return the y-coordinate, relative to the <a>associated Document</a>'s
208+<a>initial containing block</a>
211209 origin, of the top edge of the visual viewport in CSS pixels.
212210</p>
213211</dd>
@@ -253,6 +251,9 @@ <h3>The <dfn><code>VisualViewport</code></dfn> interface</h3>
253251<dt><dfn>scale</dfn></dt>
254252<dd>
255253 Returns the pinch-zoom scaling factor applied to the visual viewport. It can be computed using the following algorithm:
254+<div class="note">
255+ Although it is referred to as the pinch-zoom scaling factor, it can be affected through means other than pinch-zooming. e.g. When the UA centers and zooms in on a focused edit box.
256+</div>
256257<ol>
257258<li data-md><p>If the <a>window</a>'s <a>associated Document</a> is not <a>fully active</a>, return 0 and abort these steps.</p></li>
258259<li data-md><p>If there is no output device, return 1 and abort these steps.</p></li>
@@ -268,13 +269,13 @@ <h3>The <dfn><code>VisualViewport</code></dfn> interface</h3>
268269<p>
269270 Let <var>device independent pixel size</var> be the product of <var>device pixel size</var> and the
270271<dfn data-cite="CSSOM-VIEW#dom-window-devicepixelratio">devicePixelRatio</dfn>
272+<div class="note">
273+ Visual viewport scale (e.g. pinch-zoom) does not affect the devicePixelRatio.
274+</div>
271275</p>
272276</li>
273277<li data-md><p>Return the result of dividing the <var>CSS pixel size</var> by the <var>device independent pixel size</var>.</li>
274278</ol>
275-<div class="note">
276- Although it is referred to as the pinch-zoom scaling factor, it can be affected through means other than pinch-zooming. e.g. When the UA centers and zooms in a focused edit box.
277-</div>
278279</dd>
279280<dt><dfn>segments</dfn></dt>
280281<div class="note">
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。