You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cssom-view] Remove "familiar with" check for move/resize methods
Closes#1725 by removing the usage of incumbent settings object. I could find no evidence of such a check in the Blink, Gecko, or WebKit codebases. Indeed, such a check should not generally be necessary, as (unlike, e.g., window.close()) these methods are not accessible cross-origin.
Also includes various changes for things that have updated in other specs:
* Use "this" instead of "context object"
* Use "string is" instead of "case-sensitive"
* Use "start node" and "start offset" instead of referring to properties of Range (or now, AbstractRange)
* Link to the correct "event loop" definition
* Remove redundant anchor blocks, as these days most definitions are properly exported
Abstract: The APIs introduced by this specification provide authors with a way to inspect and manipulate the visual view of a document. This includes getting the position of element layout boxes, obtaining the width of the viewport through script, and also scrolling an element.
@@ -321,7 +274,7 @@ The term <dfn>transforms</dfn> refers to SVG transforms and CSS transforms. [[!S
321
274
When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that
322
275
e.g. the author can't change the behavior by overriding attributes or methods with custom properties or functions in ECMAScript.
323
276
324
-
Unless otherwise stated, string comparisons are done in a <a>case-sensitive</a> manner.
277
+
Unless otherwise stated, all string comparisons use [=string/is=].
325
278
326
279
327
280
<h3 id=css-pixels>CSS pixels</h3>
@@ -470,7 +423,7 @@ When the <dfn method for=Window caniuse=matchmedia>matchMedia(<var>query</var>)<
470
423
<a lt='parse a media query list'>parsing</a>
471
424
<var>query</var>.
472
425
<li>Return a new {{MediaQueryList}} object,
473
-
with the <a>context object’s</a>
426
+
with [=this=]'s
474
427
<a>associated <code>Document</code></a>
475
428
as the <a for=MediaQueryList>document</a>,
476
429
with <var>parsed media query list</var> as its associated <a>media query list</a>.
@@ -484,48 +437,39 @@ results when the {{Document}} is navigated.
484
437
485
438
The <dfn method for=Window>moveTo(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
486
439
487
-
1. Optionally, terminate these steps.
488
-
1. Let <var>target</var> be the <a>browsing context</a> of the <a>context object</a>.
489
-
1. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
490
-
1. If <var>source</var> is not <a>allowed to resize and move</a><var>target</var>, terminate these steps.
440
+
1. Optionally, return.
441
+
1. Let <var>target</var> be [=this=]'s [=relevant global object=]'s [=Window/browsing context=].
442
+
1. If |target| is not an [=auxiliary browsing context=] that was created by a script (as opposed to by an action of the user), then return.
491
443
1. Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not move outside the available space.
492
444
1. Move <var>target</var>’s window such that the window’s top left corner is at coordinates (<var>x</var>, <var>y</var>) relative to the top left corner of the output device, measured in <a lt=px value>CSS pixels</a> of <var>target</var>. The positive axes are rightward and downward.
493
445
494
446
The <dfn method for=Window>moveBy(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
495
447
496
-
1. Optionally, terminate these steps.
497
-
1. Let <var>target</var> be the <a>browsing context</a> of the <a>context object</a>.
498
-
1. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
499
-
1. If <var>source</var> is not <a>allowed to resize and move</a><var>target</var>, terminate these steps.
448
+
1. Optionally, return.
449
+
1. Let <var>target</var> be [=this=]'s [=relevant global object=]'s [=Window/browsing context=].
450
+
1. If |target| is not an [=auxiliary browsing context=] that was created by a script (as opposed to by an action of the user), then return.
500
451
1. Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not move outside the available space.
501
452
1. Move <var>target</var>'s window <var>x</var><a lt=px value>CSS pixels</a> of <var>target</var> rightward and <var>y</var><a lt=px value>CSS pixels</a> of <var>target</var> downward.
502
453
503
454
504
455
The <dfn method for=Window>resizeTo(<var>width</var>, <var>height</var>)</dfn> method must follow these steps:
505
456
506
-
1. Optionally, terminate these steps.
507
-
1. Let <var>target</var> be the <a>browsing context</a> of the <a>context object</a>.
508
-
1. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
509
-
1. If <var>source</var> is not <a>allowed to resize and move</a><var>target</var>, terminate these steps.
457
+
1. Optionally, return.
458
+
1. Let <var>target</var> be [=this=]'s [=relevant global object=]'s [=Window/browsing context=].
459
+
1. If |target| is not an [=auxiliary browsing context=] that was created by a script (as opposed to by an action of the user), then return.
510
460
1. Optionally, clamp <var>width</var> and <var>height</var> in a user-agent-defined manner so that the window does not get too small or bigger than the available space.
511
461
1. Resize <var>target</var>'s window by moving its right and bottom edges such that the distance between the left and right edges of the viewport are <var>width</var><a lt=px value>CSS pixels</a> of <var>target</var> and the distance between the top and bottom edges of the viewport are <var>height</var><a lt=px value>CSS pixels</a> of <var>target</var>.
512
462
1. Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does not grow outside the available space.
513
463
514
464
The <dfn method for=Window>resizeBy(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
515
465
516
-
1. Optionally, terminate these steps.
517
-
1. Let <var>target</var> be the <a>browsing context</a> of the <a>context object</a>.
518
-
1. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
519
-
1. If <var>source</var> is not <a>allowed to resize and move</a><var>target</var>, terminate these steps.
466
+
1. Optionally, return.
467
+
1. Let <var>target</var> be [=this=]'s [=relevant global object=]'s [=Window/browsing context=].
468
+
1. If |target| is not an [=auxiliary browsing context=] that was created by a script (as opposed to by an action of the user), then return.
520
469
1. Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not get too small or bigger than the available space.
521
470
1. Resize <var>target</var>'s window by moving its right edge <var>x</var><a lt=px value>CSS pixels</a> of <var>target</var> rightward and its bottom edge <var>y</var><a lt=px value>CSS pixels</a> of <var>target</var> downward.
522
471
1. Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does not grow outside the available space.
523
472
524
-
A <a>browsing context</a><var>A</var> is <dfn>allowed to resize and move</dfn> a <a>browsing context</a><var>B</var> if all the following conditions are met:
525
-
526
-
* <var>B</var> is an <a>auxiliary browsing context</a> that was created by a script (as opposed to by an action of the user).
527
-
* <var>A</var> is <a>familiar with</a><var>B</var>.
528
-
529
473
The <dfn attribute for=Window>innerWidth</dfn> attribute must return the <a>viewport</a> width including the size of a rendered
530
474
scroll bar (if any), or zero if there is no <a>viewport</a>. <!--fingerprint-->
531
475
@@ -716,7 +660,7 @@ A <dfn export>supported <code>open()</code> feature name</dfn> is one of the fol
0 commit comments