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
Copy file name to clipboardExpand all lines: cssom-view-1/Overview.bs
+21-21
Original file line number
Diff line number
Diff line change
@@ -387,7 +387,7 @@ To <dfn export>scroll to the beginning of the document</dfn> for a document <var
387
387
<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
388
388
<a>smooth scroll</a>, abort these steps.
389
389
<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.
391
391
</ol>
392
392
393
393
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:
580
580
and the <a>viewport</a> does not have an ongoing <a>smooth scroll</a>, abort these steps.
581
581
1. Let <var>document</var> be the <a>viewport’s</a> associated {{Document}}.
582
582
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,
584
584
and the scroll behavior being the value of the {{ScrollOptions/behavior}} dictionary member of <var>options</var>.
585
585
586
586
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<
915
915
associated with the document, return null and terminate these steps.
916
916
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>,
917
917
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.
919
919
1. Return null.
920
920
921
921
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
931
931
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
932
932
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
933
933
<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>.
935
935
1. Return <var>sequence</var>.
936
936
937
937
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.
993
993
a value of ''overflow:clip'' on the <a>the <code>body</code> element</a>'s parent element
994
994
must be treated as ''overflow:hidden''.
995
995
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.
997
997
1. Return null.
998
998
999
999
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
1184
1184
1. If <var>document</var> is not the <a>active document</a>, terminate these steps.
1185
1185
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
1186
1186
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,
1189
1189
and terminate these steps.
1190
1190
1. If the element is <a>the <code>body</code> element</a>,
1191
1191
<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
1224
1224
1. If <var>document</var> is not the <a>active document</a>, return zero and terminate these steps.
1225
1225
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
1226
1226
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>.
1229
1229
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>.
1230
1230
1. If the element does not have any associated [=CSS/box=], return zero and terminate these steps.
1231
1231
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:
1238
1238
1. If <var>document</var> is not the <a>active document</a>, terminate these steps.
1239
1239
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
1240
1240
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.
1243
1243
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.
1244
1244
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.
1245
1245
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
1250
1250
1. If <var>document</var> is not the <a>active document</a>, return zero and terminate these steps.
1251
1251
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
1252
1252
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>.
1255
1255
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>.
1256
1256
1. If the element does not have any associated [=CSS/box=], return zero and terminate these steps.
1257
1257
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:
1264
1264
1. If <var>document</var> is not the <a>active document</a>, terminate these steps.
1265
1265
1. Let <var>window</var> be the value of <var>document</var>'s {{Document/defaultView}} attribute.
1266
1266
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.
1269
1269
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.
1270
1270
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.
1271
1271
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
1275
1275
1. Let <var>document</var> be the element's <a>node document</a>.
1276
1276
1. If <var>document</var> is not the <a>active document</a>, return zero and terminate these steps.
1277
1277
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>).
1279
1279
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>).
1280
1280
1. If the element does not have any associated [=CSS/box=] return zero and terminate these steps.
1281
1281
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
1285
1285
1. Let <var>document</var> be the element's <a>node document</a>.
1286
1286
1. If <var>document</var> is not the <a>active document</a>, return zero and terminate these steps.
1287
1287
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>).
1289
1289
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>).
1290
1290
1. If the element does not have any associated [=CSS/box=] return zero and terminate these steps.
1291
1291
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:
1303
1303
The <dfn attribute for=Element>clientWidth</dfn> attribute must run these steps:
1304
1304
1305
1305
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).
1307
1307
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.
1308
1308
1309
1309
The <dfn attribute for=Element>clientHeight</dfn> attribute must run these steps:
1310
1310
1311
1311
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).
1313
1313
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.
1314
1314
1315
1315
@@ -1376,7 +1376,7 @@ a <a>scrolling box</a> <var>scrolling box</var>, in order of innermost to outerm
1376
1376
<dt>If <var>scrolling box</var> is associated with a <a>viewport</a>
1377
1377
<dd>
1378
1378
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.
1380
1380
</dl>
1381
1381
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.
1382
1382
@@ -1420,7 +1420,7 @@ The <dfn attribute for=HTMLElement>offsetParent</dfn> attribute must return the
1420
1420
1421
1421
1. If any of the following holds true return null and terminate this algorithm:
1422
1422
* The element does not have an associated [=CSS/box=].
1423
-
* The element is the root element.
1423
+
* The element is the [=root element=].
1424
1424
* The element is <a>the <code>body</code> element</a>.
1425
1425
* The element's computed value of the 'position' property is ''position/fixed''.
1426
1426
1. Let <var>ancestor</var> be the parent of the element in the <a>flat tree</a> and repeat these substeps:
0 commit comments