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
<p>The <dfnid="scrolling-area-origin" title="scrolling area origin">origin</dfn> of a <ahref="#scrolling-area">scrolling area</a> is
398
+
the origin of the <ahref="#initial-containing-block">initial containing block</a> if the <ahref="#scrolling-area">scrolling area</a> is a <ahref="#viewport">viewport</a>,
399
+
and otherwise the top left padding edge of the element when the element has its default scroll position.
400
+
The x-coordinate increases rightwards, and the y-coordinate increases downwards.
401
+
397
402
<p>The <dfnid="beginning-edges">beginning edges</dfn> of a particular set of edges of a box or element are the following edges:
user agent must act as if the <codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> method was invoked with the same arguments.</p>
742
747
743
748
<p>When the <dfnid="dom-window-scrollby" title="dom-Window-scrollBy"><code>scrollBy()</code></dfn> method is invoked, the
744
-
user agent must act as if the <codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> method was invoked with
745
-
<var>x</var> plus <codetitle="dom-Window-scrollX"><ahref="#dom-window-scrollx">scrollX</a></code>
746
-
as first argument and <var>y</var> plus
747
-
<codetitle="dom-Window-scrollY"><ahref="#dom-window-scrolly">scrollY</a></code> as second argument.</p>
749
+
user agent must run these steps:
750
+
<ol>
751
+
<li><p>If invoked with two arguments, follow these substeps:
752
+
<ol>
753
+
<li><p>Let <var>options</var> be null <ahref="#converted-to-an-idl-value" title="converted to an IDL value">converted</a> to a <code><ahref="#scrolltooptions">ScrollToOptions</a></code> dictionary. <ahref="#refsWEBIDL">[WEBIDL]</a>
754
+
<li><p>Let <var>x</var> and <var>y</var> be the arguments, respectively.
755
+
<li><p><ahref="#normalize-non-finite-values">Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
756
+
<li><p>Let the <codetitle="">left</code> dictionary member of <var>options</var> have the value <var>x</var>.
757
+
<li><p>Let the <codetitle="">top</code> dictionary member of <var>options</var> have the value <var>y</var>.
758
+
</ol>
759
+
<li><p>Add the value of <codetitle="dom-Window-scrollX"><ahref="#dom-window-scrollx">scrollX</a></code> to the <codetitle="">left</code> dictionary member.
760
+
<li><p>Add the value of <codetitle="dom-Window-scrollY"><ahref="#dom-window-scrolly">scrollY</a></code> to the <codetitle="">top</code> dictionary member.
761
+
<li><p>Act as if the <codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> method was invoked with
762
+
<var>options</var> as the only argument.</p>
763
+
</ol>
748
764
749
765
<p>The <dfnid="dom-window-screenx" title="dom-Window-screenX"><code>screenX</code></dfn> attribute must return the x-coordinate,
750
766
relative to the origin of the screen of the output device, of the left of
@@ -1123,13 +1139,7 @@ <h3 id="the-caretposition-interface"><span class="secno">6.1 </span>The <code ti
1123
1139
1124
1140
<h2id="extensions-to-the-element-interface"><spanclass="secno">7 </span>Extensions to the <codetitle="">Element</code> Interface</h2>
<li><p>Optionally perform some other action that brings the element to the user's attention.
1221
1237
</ol>
1222
1238
1239
+
<p>The <dfnid="dom-element-scroll" title="dom-Element-scroll"><code>scroll()</code></dfn> method must run these steps:</p>
1240
+
<ol>
1241
+
<li><p>If invoked with one argument, follow these substeps:
1242
+
<ol>
1243
+
<li><p>Let <var>options</var> be the argument.
1244
+
<li><p>Let <var>x</var> be the value of the <codetitle="">left</code> dictionary member of <var>options</var>, if present, or the element's current scroll position on the x axis otherwise.
1245
+
<li><p>Let <var>y</var> be the value of the <codetitle="">top</code> dictionary member of <var>options</var>, if present, or the element's current scroll position on the y axis otherwise.
1246
+
</ol>
1247
+
<li><p>If invoked with two arguments, follow these substeps:
1248
+
<ol>
1249
+
<li><p>Let <var>options</var> be null <ahref="#converted-to-an-idl-value" title="converted to an IDL value">converted</a> to a <code><ahref="#scrolltooptions">ScrollToOptions</a></code> dictionary. <ahref="#refsWEBIDL">[WEBIDL]</a>
1250
+
<li><p>Let <var>x</var> and <var>y</var> be the arguments, respectively.
1251
+
<li><p><ahref="#normalize-non-finite-values">Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
1252
+
<li><p>Let the <codetitle="">left</code> dictionary member of <var>options</var> have the value <var>x</var>.
1253
+
<li><p>Let the <codetitle="">top</code> dictionary member of <var>options</var> have the value <var>y</var>.
1254
+
</ol>
1255
+
<li><p>If the element is the root element and the <codeclass="external" data-anolis-spec="dom"><ahref="https://dom.spec.whatwg.org/#document">Document</a></code> is in
1256
+
<aclass="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, terminate these steps.</li>
1257
+
<li><p>If the element is the root element invoke
1258
+
<codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> with <codetitle="dom-Window-scrollX"><ahref="#dom-window-scrollx">scrollX</a></code> as first
1259
+
argument and <var>y</var> as second argument, and terminate these steps.</li>
1260
+
<li><p>If the element is <ahref="#the-html-body-element">the HTML <codetitle="">body</code> element</a>,
1261
+
the <codeclass="external" data-anolis-spec="dom"><ahref="https://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, and the element
1262
+
does not have an associated <ahref="#scrolling-box">scrolling box</a>, invoke
1263
+
<codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> with
1264
+
<var>options</var> as the only argument, and
1265
+
terminate these steps.</li>
1266
+
<li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a>, the element has no associated <ahref="#scrolling-box">scrolling box</a>, or the element has no
1267
+
overflow, terminate these steps.</li>
1268
+
<li><p><ahref="#scroll-an-element" title="scroll an element">Scroll the element</a> to
1269
+
<var>x</var>,<var>y</var>, with the scroll behavior being the value of the <codetitle="">behavior</code> dictionary member of <var>options</var>.
1270
+
</ol>
1271
+
1272
+
<p>When the <dfnid="dom-element-scrollto" title="dom-Element-scrollTo"><code>scrollTo()</code></dfn> method is invoked, the
1273
+
user agent must act as if the <codetitle="dom-Element-scroll"><ahref="#dom-element-scroll">scroll()</a></code> method was invoked with the same arguments.</p>
1274
+
1275
+
<p>When the <dfnid="dom-element-scrollby" title="dom-Element-scrollBy"><code>scrollBy()</code></dfn> method is invoked, the
1276
+
user agent must run these steps:
1277
+
<ol>
1278
+
<li><p>If invoked with two arguments, follow these substeps:
1279
+
<ol>
1280
+
<li><p>Let <var>options</var> be null <ahref="#converted-to-an-idl-value" title="converted to an IDL value">converted</a> to a <code><ahref="#scrolltooptions">ScrollToOptions</a></code> dictionary. <ahref="#refsWEBIDL">[WEBIDL]</a>
1281
+
<li><p>Let <var>x</var> and <var>y</var> be the arguments, respectively.
1282
+
<li><p><ahref="#normalize-non-finite-values">Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
1283
+
<li><p>Let the <codetitle="">left</code> dictionary member of <var>options</var> have the value <var>x</var>.
1284
+
<li><p>Let the <codetitle="">top</code> dictionary member of <var>options</var> have the value <var>y</var>.
1285
+
</ol>
1286
+
<li><p>Add the value of <codetitle="dom-Element-scrollLeft"><ahref="#dom-element-scrollleft">scrollLeft</a></code> to the <codetitle="">left</code> dictionary member.
1287
+
<li><p>Add the value of <codetitle="dom-Element-scrollTop"><ahref="#dom-element-scrolltop">scrollTop</a></code> to the <codetitle="">top</code> dictionary member.
1288
+
<li><p>Act as if the <codetitle="dom-Element-scroll"><ahref="#dom-element-scroll">scroll()</a></code> method was invoked with
1289
+
<var>options</var> as the only argument.</p>
1290
+
</ol>
1291
+
1223
1292
<p>The <dfnid="dom-element-scrolltop" title="dom-Element-scrollTop"><code>scrollTop</code></dfn> attribute, on getting, must return the result of running these steps:</p>
1224
1293
<ol>
1225
1294
<li><p>If the element is the root element and the <codeclass="external" data-anolis-spec="dom"><ahref="https://dom.spec.whatwg.org/#document">Document</a></code> is in
<p>When setting the <codetitle="dom-Element-scrollTop"><ahref="#dom-element-scrolltop">scrollTop</a></code> attribute these steps must be run:</p>
1239
1308
<ol>
1240
-
<li><p>If the given value is not a <code><ahref="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, <ahref="#normalize-non-finite-values">normalize non-finite values</a> for the given value.
1241
-
<li><p>If the given value is a <code><ahref="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, and the <codetitle="">y</code> dictionary member is not present, abort these steps.
1242
-
<li><p>If the given value is a <code><ahref="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, let <var>y</var> be the value of the <codetitle="">y</code> dictionary member.
1243
-
Otherwise, let <var>y</var> be the given value.</li>
1309
+
<li><p>Let <var>y</var> be the given value.
1310
+
<li><p><ahref="#normalize-non-finite-values">Normalize non-finite values</a> for <var>y</var>.
1244
1311
<li><p>If the element is the root element and the <codeclass="external" data-anolis-spec="dom"><ahref="https://dom.spec.whatwg.org/#document">Document</a></code> is in
1245
1312
<aclass="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, terminate these steps.</li>
1246
1313
<li><p>If the element is the root element invoke
1247
1314
<codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> with <codetitle="dom-Window-scrollX"><ahref="#dom-window-scrollx">scrollX</a></code> as first
1248
-
argument and <var>y</var> as second, and, if the given value is a <code><ahref="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, the given value as the third argument.</li>
1315
+
argument and <var>y</var> as second argument, and terminate these steps.</li>
1249
1316
<li><p>If the element is <ahref="#the-html-body-element">the HTML <codetitle="">body</code> element</a>,
1250
1317
the <codeclass="external" data-anolis-spec="dom"><ahref="https://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, and the element
1251
1318
does not have an associated <ahref="#scrolling-box">scrolling box</a>, invoke
1252
1319
<codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> with
1253
1320
<codetitle="dom-Window-scrollX"><ahref="#dom-window-scrollx">scrollX</a></code> as first
1254
-
argument and <var>y</var> as second, and, if the given value is a <code><ahref="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, the given value as the third argument, and
1321
+
argument and <var>y</var> as second argument, and
1255
1322
terminate these steps.</li>
1256
1323
<li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a>, the element has no associated <ahref="#scrolling-box">scrolling box</a>, or the element has no
1257
1324
overflow, terminate these steps.</li>
1258
1325
<li><p><ahref="#scroll-an-element" title="scroll an element">Scroll the element</a> to
1259
-
<codetitle="dom-Element-scrollLeft"><ahref="#dom-element-scrollleft">scrollLeft</a></code>,<var>y</var>, with the scroll behavior being the value of the <codetitle="">behavior</code> dictionary
1260
-
member if the given value is a <code><ahref="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, or <codetitle="">auto</code> otherwise.
1326
+
<codetitle="dom-Element-scrollLeft"><ahref="#dom-element-scrollleft">scrollLeft</a></code>,<var>y</var>, with the scroll behavior being <codetitle="">auto</code>.
1261
1327
</ol>
1262
1328
1263
1329
<p>The <dfnid="dom-element-scrollleft" title="dom-Element-scrollLeft"><code>scrollLeft</code></dfn> attribute, on getting, must return the result of running these steps:</p>
<p>When setting the <codetitle="dom-Element-scrollLeft"><ahref="#dom-element-scrollleft">scrollLeft</a></code> attribute these steps must be run:</p>
1279
1345
<ol>
1280
-
<li><p>If the given value is not a <code><ahref="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code> object, <ahref="#normalize-non-finite-values">normalize non-finite values</a> for the given value.
1281
-
<li><p>If the given value is a <code><ahref="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code> object, and the <codetitle="">x</code> dictionary member is not present, abort these steps.
1282
-
<li><p>If the given value is a <code><ahref="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code> object, let <var>x</var> be the value of the <codetitle="">x</code> dictionary member.
1283
-
Otherwise, let <var>x</var> be the given value.</li>
1346
+
<li><p>Let <var>x</var> be the given value.
1347
+
<li><p><ahref="#normalize-non-finite-values">Normalize non-finite values</a> for <var>x</var>.
1284
1348
<li><p>If the element is the root element and the <codeclass="external" data-anolis-spec="dom"><ahref="https://dom.spec.whatwg.org/#document">Document</a></code> is in
1285
1349
<aclass="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, terminate these steps.</li>
1286
1350
<li><p>If the element is the root element invoke
1287
1351
<codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> with
1288
-
<var>x</var> as first argument and <codetitle="dom-Window-scrollY"><ahref="#dom-window-scrolly">scrollY</a></code> as second, and, if the given value is a <code><ahref="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code>
1289
-
object, the given value as the third argument.</li>
1352
+
<var>x</var> as first argument and <codetitle="dom-Window-scrollY"><ahref="#dom-window-scrolly">scrollY</a></code> as second argument, and terminate these steps.</li>
1290
1353
<li><p>If the element is <ahref="#the-html-body-element">the HTML <codetitle="">body</code> element</a>,
1291
1354
the <codeclass="external" data-anolis-spec="dom"><ahref="https://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, and the element
1292
1355
does not have an associated <ahref="#scrolling-box">scrolling box</a>, invoke
1293
1356
<codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> with
1294
1357
<var>x</var> as first argument and
1295
-
<codetitle="dom-Window-scrollY"><ahref="#dom-window-scrolly">scrollY</a></code> as second, and, if the given value is a <code><ahref="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code> object, the given value as the third
1358
+
<codetitle="dom-Window-scrollY"><ahref="#dom-window-scrolly">scrollY</a></code> as second
1296
1359
argument, and terminate these steps.</li>
1297
1360
<li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a>, the element has no associated <ahref="#scrolling-box">scrolling box</a>, or the element has no
1298
1361
overflow, terminate these steps.</li>
1299
1362
<li><p><ahref="#scroll-an-element" title="Scroll an element">Scroll the element</a> to
1300
-
<var>x</var>,<codetitle="dom-Element-scrollTop"><ahref="#dom-element-scrolltop">scrollTop</a></code>, with the scroll behavior being the value of the <codetitle="">behavior</code> dictionary
1301
-
member if the given value is a <code><ahref="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code> object, or <codetitle="">auto</code> otherwise.
1363
+
<var>x</var>,<codetitle="dom-Element-scrollTop"><ahref="#dom-element-scrolltop">scrollTop</a></code>, with the scroll behavior being <codetitle="">auto</code>.
1302
1364
</ol>
1303
1365
1304
1366
<p>The <dfnid="dom-element-scrollwidth" title="dom-Element-scrollWidth"><code>scrollWidth</code></dfn> attribute must return the result of running these steps:</p>
0 commit comments