惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Security Latest
Security Latest
C
Cisco Blogs
P
Palo Alto Networks Blog
Know Your Adversary
Know Your Adversary
Project Zero
Project Zero
C
Cyber Attacks, Cyber Crime and Cyber Security
NISL@THU
NISL@THU
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
D
Docker
Google Online Security Blog
Google Online Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Recent Announcements
Recent Announcements
T
The Exploit Database - CXSecurity.com
G
Google Developers Blog
Schneier on Security
Schneier on Security
小众软件
小众软件
爱范儿
爱范儿
GbyAI
GbyAI
J
Java Code Geeks
T
Tailwind CSS Blog
Cisco Talos Blog
Cisco Talos Blog
The Hacker News
The Hacker News
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
TaoSecurity Blog
TaoSecurity Blog
MyScale Blog
MyScale Blog
B
Blog RSS Feed
Cyberwarzone
Cyberwarzone
有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Securelist
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Y
Y Combinator Blog
S
Schneier on Security
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 叶小钗
F
Fortinet All Blogs
M
MIT News - Artificial intelligence
PCI Perspectives
PCI Perspectives
V
V2EX
V2EX - 技术
V2EX - 技术
O
OpenAI News
W
WeLiveSecurity

Recent Commits to visual-viewport:gh-pages

archive this repo · WICG/visual-viewport@03de238 [Viewport Segments] Cleanup the existing explainer. · WICG/visual-viewport@8948a2a Viewport Segments: Fix mitigation by removing the focused area one (#88) · WICG/visual-viewport@ce02d5d Update Viewport Segments explainer. (#86) Add Security and Privacy self assessment for the viewport segments pr… Update link to draft spec · WICG/visual-viewport@44deaba Improve CG report metadata Link to fire an event definition · WICG/visual-viewport@74efebe Add definition of visual and layout viewports Specify resize and scroll event ordering (#80) Code update · WICG/visual-viewport@ffb31ee Update JS example Update with previous changes Fix markdown links · WICG/visual-viewport@56af3e0 Address Daniel's changes Update README with segments explainer · WICG/visual-viewport@fb277c9 Update image path Add segments-explainer Merge pull request #77 from dlibby-/dlibby-segments-typo · WICG/visual-viewport@9d2419c
Minor editorial clean-ups · WICG/visual-viewport@0317366
bokand · 2022-05-21 · via Recent Commits to visual-viewport:gh-pages

@@ -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&lt;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">