Skip to content

Commit 5d8ef73

Browse files
bramusfantasai
authored andcommitted
[cssom-view-1] Linkify root element
w3c#8224
1 parent 18317f9 commit 5d8ef73

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

cssom-view-1/Overview.bs

+21-21
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ To <dfn export>scroll to the beginning of the document</dfn> for a document <var
387387
<li>If <var>position</var> is the same as <var>viewport</var>'s current scroll position, and <var>viewport</var> does not have an ongoing
388388
<a>smooth scroll</a>, abort these steps.
389389
<li><a>Perform a scroll</a> of <var>viewport</var> to <var>position</var>,
390-
and <var>document</var>'s root element as the associated element, if there is one, or null otherwise.
390+
and <var>document</var>'s [=root element=] as the associated element, if there is one, or null otherwise.
391391
</ol>
392392

393393
Note: This algorithm is used when navigating to the <code>#top</code> fragment identifier, as defined in HTML. [[!HTML]]
@@ -580,7 +580,7 @@ steps must be run:
580580
and the <a>viewport</a> does not have an ongoing <a>smooth scroll</a>, abort these steps.
581581
1. Let <var>document</var> be the <a>viewport’s</a> associated {{Document}}.
582582
1. <a>Perform a scroll</a> of the <a>viewport</a> to <var>position</var>,
583-
<var>document</var>'s root element as the associated element, if there is one, or null otherwise,
583+
<var>document</var>'s [=root element=] as the associated element, if there is one, or null otherwise,
584584
and the scroll behavior being the value of the {{ScrollOptions/behavior}} dictionary member of <var>options</var>.
585585

586586
When the <dfn method for=Window lt="scrollTo(options)|scrollTo(x, y)">scrollTo()</dfn> method is invoked, the
@@ -915,7 +915,7 @@ The <dfn method for=Document caniuse=element-from-point>elementFromPoint(<var>x<
915915
associated with the document, return null and terminate these steps.
916916
1. If there is a [=CSS/box=] in the <a>viewport</a> that would be a target for hit testing at coordinates <var>x</var>,<var>y</var>,
917917
when applying the <a>transforms</a> that apply to the descendants of the <a>viewport</a>, return the associated element and terminate these steps.
918-
1. If the document has a root element, return the root element and terminate these steps.
918+
1. If the document has a [=root element=], return the [=root element=] and terminate these steps.
919919
1. Return null.
920920

921921
Note: The {{elementFromPoint()}} method does not necessarily return the top-most painted element. For
@@ -931,7 +931,7 @@ instance, an element can be excluded from being a target for hit testing by usin
931931
1. For each [=CSS/box=] in the <a>viewport</a>, in paint order, starting with the topmost box, that would be a target for hit testing at
932932
coordinates <var>x</var>,<var>y</var> even if nothing would be overlapping it, when applying the <a>transforms</a> that apply to the descendants of the
933933
<a>viewport</a>, append the associated element to <var>sequence</var>.
934-
1. If the document has a root element, and the last item in <var>sequence</var> is not the root element, append the root element to <var>sequence</var>.
934+
1. If the document has a [=root element=], and the last item in <var>sequence</var> is not the [=root element=], append the [=root element=] to <var>sequence</var>.
935935
1. Return <var>sequence</var>.
936936

937937
The <dfn method for=Document>caretPositionFromPoint(<var>x</var>, <var>y</var>)</dfn> method must return the
@@ -993,7 +993,7 @@ revision of CSS or HTML.
993993
a value of ''overflow:clip'' on the <a>the <code>body</code> element</a>'s parent element
994994
must be treated as ''overflow:hidden''.
995995
1. Return null and abort these steps.
996-
1. If there is a root element, return the root element and abort these steps.
996+
1. If there is a [=root element=], return the [=root element=] and abort these steps.
997997
1. Return null.
998998

999999
Note: For non-conforming user agents that always use the <a>quirks mode</a> behavior for {{Element/scrollTop}}
@@ -1184,8 +1184,8 @@ The <dfn method for=Element lt="scroll(options)|scroll(x, y)">scroll()</dfn> met
11841184
1. If <var>document</var> is not the <a>active document</a>, terminate these steps.
11851185
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
11861186
1. If <var>window</var> is null, terminate these steps.
1187-
1. If the element is the root element and <var>document</var> is in <a>quirks mode</a>, terminate these steps.
1188-
1. If the element is the root element invoke {{Window/scroll()}} on <var>window</var> with {{Window/scrollX}} on <var>window</var> as first argument and <var>y</var> as second argument,
1187+
1. If the element is the [=root element=] and <var>document</var> is in <a>quirks mode</a>, terminate these steps.
1188+
1. If the element is the [=root element=] invoke {{Window/scroll()}} on <var>window</var> with {{Window/scrollX}} on <var>window</var> as first argument and <var>y</var> as second argument,
11891189
and terminate these steps.
11901190
1. If the element is <a>the <code>body</code> element</a>,
11911191
<var>document</var> is in <a>quirks mode</a>,
@@ -1224,8 +1224,8 @@ The <dfn attribute for=Element>scrollTop</dfn> attribute, on getting, must retur
12241224
1. If <var>document</var> is not the <a>active document</a>, return zero and terminate these steps.
12251225
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
12261226
1. If <var>window</var> is null, return zero and terminate these steps.
1227-
1. If the element is the root element and <var>document</var> is in <a>quirks mode</a>, return zero and terminate these steps.
1228-
1. If the element is the root element return the value of {{Window/scrollY}} on <var>window</var>.
1227+
1. If the element is the [=root element=] and <var>document</var> is in <a>quirks mode</a>, return zero and terminate these steps.
1228+
1. If the element is the [=root element=] return the value of {{Window/scrollY}} on <var>window</var>.
12291229
1. If the element is <a>the <code>body</code> element</a>, <var>document</var> is in <a>quirks mode</a>, and the element is not <a>potentially scrollable</a>, return the value of {{Window/scrollY}} on <var>window</var>.
12301230
1. If the element does not have any associated [=CSS/box=], return zero and terminate these steps.
12311231
1. Return the y-coordinate of the <a>scrolling area</a> at the alignment point with the top of the <a>padding edge</a> of the element.
@@ -1238,8 +1238,8 @@ When setting the {{Element/scrollTop}} attribute these steps must be run:
12381238
1. If <var>document</var> is not the <a>active document</a>, terminate these steps.
12391239
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
12401240
1. If <var>window</var> is null, terminate these steps.
1241-
1. If the element is the root element and <var>document</var> is in <a>quirks mode</a>, terminate these steps.
1242-
1. If the element is the root element invoke {{Window/scroll()}} on <var>window</var> with {{Window/scrollX}} on <var>window</var> as first argument and <var>y</var> as second argument, and terminate these steps.
1241+
1. If the element is the [=root element=] and <var>document</var> is in <a>quirks mode</a>, terminate these steps.
1242+
1. If the element is the [=root element=] invoke {{Window/scroll()}} on <var>window</var> with {{Window/scrollX}} on <var>window</var> as first argument and <var>y</var> as second argument, and terminate these steps.
12431243
1. If the element is <a>the <code>body</code> element</a>, <var>document</var> is in <a>quirks mode</a>, and the element is not <a>potentially scrollable</a>, invoke {{Window/scroll()}} on <var>window</var> with {{Window/scrollX}} as first argument and <var>y</var> as second argument, and terminate these steps.
12441244
1. If the element does not have any associated [=CSS/box=], the element has no associated <a>scrolling box</a>, or the element has no overflow, terminate these steps.
12451245
1. <a lt='scroll an element'>Scroll the element</a> to {{Element/scrollLeft}},<var>y</var>, with the scroll behavior being "<code>auto</code>".
@@ -1250,8 +1250,8 @@ The <dfn attribute for=Element>scrollLeft</dfn> attribute, on getting, must retu
12501250
1. If <var>document</var> is not the <a>active document</a>, return zero and terminate these steps.
12511251
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
12521252
1. If <var>window</var> is null, return zero and terminate these steps.
1253-
1. If the element is the root element and <var>document</var> is in <a>quirks mode</a>, return zero and terminate these steps.
1254-
1. If the element is the root element return the value of {{Window/scrollX}} on <var>window</var>.
1253+
1. If the element is the [=root element=] and <var>document</var> is in <a>quirks mode</a>, return zero and terminate these steps.
1254+
1. If the element is the [=root element=] return the value of {{Window/scrollX}} on <var>window</var>.
12551255
1. If the element is <a>the <code>body</code> element</a>, <var>document</var> is in <a>quirks mode</a>, and the element is not <a>potentially scrollable</a>, return the value of {{Window/scrollX}} on <var>window</var>.
12561256
1. If the element does not have any associated [=CSS/box=], return zero and terminate these steps.
12571257
1. Return the x-coordinate of the <a>scrolling area</a> at the alignment point with the left of the <a>padding edge</a> of the element.
@@ -1264,8 +1264,8 @@ When setting the {{Element/scrollLeft}} attribute these steps must be run:
12641264
1. If <var>document</var> is not the <a>active document</a>, terminate these steps.
12651265
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
12661266
1. If <var>window</var> is null, terminate these steps.
1267-
1. If the element is the root element and <var>document</var> is in <a>quirks mode</a>, terminate these steps.
1268-
1. If the element is the root element invoke {{Window/scroll()}} on <var>window</var> with <var>x</var> as first argument and {{Window/scrollY}} on <var>window</var> as second argument, and terminate these steps.
1267+
1. If the element is the [=root element=] and <var>document</var> is in <a>quirks mode</a>, terminate these steps.
1268+
1. If the element is the [=root element=] invoke {{Window/scroll()}} on <var>window</var> with <var>x</var> as first argument and {{Window/scrollY}} on <var>window</var> as second argument, and terminate these steps.
12691269
1. If the element is <a>the <code>body</code> element</a>, <var>document</var> is in <a>quirks mode</a>, and the element is not <a>potentially scrollable</a>, invoke {{Window/scroll()}} on <var>window</var> with <var>x</var> as first argument and {{Window/scrollY}} on <var>window</var> as second argument, and terminate these steps.
12701270
1. If the element does not have any associated [=CSS/box=], the element has no associated <a>scrolling box</a>, or the element has no overflow, terminate these steps.
12711271
1. <a lt='scroll an element'>Scroll the element</a> to <var>x</var>,{{Element/scrollTop}}, with the scroll behavior being "<code>auto</code>".
@@ -1275,7 +1275,7 @@ The <dfn attribute for=Element>scrollWidth</dfn> attribute must return the resul
12751275
1. Let <var>document</var> be the element's <a>node document</a>.
12761276
1. If <var>document</var> is not the <a>active document</a>, return zero and terminate these steps.
12771277
1. Let <var>viewport width</var> be the width of the <a>viewport</a> excluding the width of the scroll bar, if any, or zero if there is no <a>viewport</a>.
1278-
1. If the element is the root element and <var>document</var> is not in <a>quirks mode</a> return max(<a>viewport</a> <a>scrolling area</a> width, <var>viewport width</var>).
1278+
1. If the element is the [=root element=] and <var>document</var> is not in <a>quirks mode</a> return max(<a>viewport</a> <a>scrolling area</a> width, <var>viewport width</var>).
12791279
1. If the element is <a>the <code>body</code> element</a>, <var>document</var> is in <a>quirks mode</a> and the element is not <a>potentially scrollable</a>, return max(<a>viewport</a> <a>scrolling area</a> width, <var>viewport width</var>).
12801280
1. If the element does not have any associated [=CSS/box=] return zero and terminate these steps.
12811281
1. Return the width of the element's <a>scrolling area</a>.
@@ -1285,7 +1285,7 @@ The <dfn attribute for=Element>scrollHeight</dfn> attribute must return the resu
12851285
1. Let <var>document</var> be the element's <a>node document</a>.
12861286
1. If <var>document</var> is not the <a>active document</a>, return zero and terminate these steps.
12871287
1. Let <var>viewport height</var> be the height of the <a>viewport</a> excluding the height of the scroll bar, if any, or zero if there is no <a>viewport</a>.
1288-
1. If the element is the root element and <var>document</var> is not in <a>quirks mode</a> return max(<a>viewport</a> <a>scrolling area</a> height, <var>viewport height</var>).
1288+
1. If the element is the [=root element=] and <var>document</var> is not in <a>quirks mode</a> return max(<a>viewport</a> <a>scrolling area</a> height, <var>viewport height</var>).
12891289
1. If the element is <a>the <code>body</code> element</a>, <var>document</var> is in <a>quirks mode</a> and the element is not <a>potentially scrollable</a>, return max(<a>viewport</a> <a>scrolling area</a> height, <var>viewport height</var>).
12901290
1. If the element does not have any associated [=CSS/box=] return zero and terminate these steps.
12911291
1. Return the height of the element's <a>scrolling area</a>.
@@ -1303,13 +1303,13 @@ The <dfn attribute for=Element>clientLeft</dfn> attribute must run these steps:
13031303
The <dfn attribute for=Element>clientWidth</dfn> attribute must run these steps:
13041304

13051305
1. If the element has no associated [=CSS/box=] or if the [=CSS/box=] is inline, return zero.
1306-
1. If the element is the root element and the element's <a>node document</a> is not in <a>quirks mode</a>, or if the element is <a>the <code>body</code> element</a> and the element's <a>node document</a> <em>is</em> in <a>quirks mode</a>, return the <a>viewport</a> width excluding the size of a rendered scroll bar (if any).
1306+
1. If the element is the [=root element=] and the element's <a>node document</a> is not in <a>quirks mode</a>, or if the element is <a>the <code>body</code> element</a> and the element's <a>node document</a> <em>is</em> in <a>quirks mode</a>, return the <a>viewport</a> width excluding the size of a rendered scroll bar (if any).
13071307
1. Return the width of the <a>padding edge</a> excluding the width of any rendered scrollbar between the <a>padding edge</a> and the <a>border edge</a>, ignoring any <a>transforms</a> that apply to the element and its ancestors.
13081308

13091309
The <dfn attribute for=Element>clientHeight</dfn> attribute must run these steps:
13101310

13111311
1. If the element has no associated [=CSS/box=] or if the [=CSS/box=] is inline, return zero.
1312-
1. If the element is the root element and the element's <a>node document</a> is not in <a>quirks mode</a>, or if the element is <a>the <code>body</code> element</a> and the element's <a>node document</a> <em>is</em> in <a>quirks mode</a>, return the <a>viewport</a> height excluding the size of a rendered scroll bar (if any).
1312+
1. If the element is the [=root element=] and the element's <a>node document</a> is not in <a>quirks mode</a>, or if the element is <a>the <code>body</code> element</a> and the element's <a>node document</a> <em>is</em> in <a>quirks mode</a>, return the <a>viewport</a> height excluding the size of a rendered scroll bar (if any).
13131313
1. Return the height of the <a>padding edge</a> excluding the height of any rendered scrollbar between the <a>padding edge</a> and the <a>border edge</a>, ignoring any <a>transforms</a> that apply to the element and its ancestors.
13141314

13151315

@@ -1376,7 +1376,7 @@ a <a>scrolling box</a> <var>scrolling box</var>, in order of innermost to outerm
13761376
<dt>If <var>scrolling box</var> is associated with a <a>viewport</a>
13771377
<dd>
13781378
Let <var>document</var> be the <a>viewport’s</a> associated {{Document}}.
1379-
Let <var>associated element</var> be <var>document</var>'s root element, if there is one, or null otherwise.
1379+
Let <var>associated element</var> be <var>document</var>'s [=root element=], if there is one, or null otherwise.
13801380
</dl>
13811381
1. <a>Perform a scroll</a> of <var>scrolling box</var> to <var>position</var>, <var>associated element</var> as the associated element and <var>behavior</var> as the scroll behavior.
13821382

@@ -1420,7 +1420,7 @@ The <dfn attribute for=HTMLElement>offsetParent</dfn> attribute must return the
14201420

14211421
1. If any of the following holds true return null and terminate this algorithm:
14221422
* The element does not have an associated [=CSS/box=].
1423-
* The element is the root element.
1423+
* The element is the [=root element=].
14241424
* The element is <a>the <code>body</code> element</a>.
14251425
* The element's computed value of the 'position' property is ''position/fixed''.
14261426
1. Let <var>ancestor</var> be the parent of the element in the <a>flat tree</a> and repeat these substeps:

0 commit comments

Comments
 (0)