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 term <dfnid="scrolling-area">scrolling area</dfn> refers to a box of a <ahref="#viewport">viewport</a> or an element that has the following edges, depending on the
270
273
<ahref="#viewport">viewport</a>'s or element's scrolling box's <ahref="#overflow-directions">overflow directions</a>.
271
274
272
-
<dlclass="switch">
273
-
<dt>If the <ahref="#overflow-directions">overflow directions</a> are rightward and downward
274
-
<dd>
275
-
<dl>
276
-
<dt>top edge
277
-
<dd><p>The element's top <ahref="#padding-edge">padding edge</a>.
278
-
<dt>right edge
279
-
<dd><p>The right-most edge of the element's right <ahref="#padding-edge">padding edge</a> and the right <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
280
-
excluding boxes that have an ancestor of element as their containing block.
281
-
<dt>bottom edge
282
-
<dd><p>The bottom-most edge of the element's bottom <ahref="#padding-edge">padding edge</a> and the bottom <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
283
-
excluding boxes that have an ancestor of element as their containing block.
284
-
<dt>left edge
285
-
<dd><p>The element's left <ahref="#padding-edge">padding edge</a>.
286
-
</dl>
287
-
<dt>If the <ahref="#overflow-directions">overflow directions</a> are leftward and downward
288
-
<dd>
289
-
<dl>
290
-
<dt>top edge
291
-
<dd><p>The element's top <ahref="#padding-edge">padding edge</a>.
292
-
<dt>right edge
293
-
<dd><p>The element's right <ahref="#padding-edge">padding edge</a>.
294
-
<dt>bottom edge
295
-
<dd><p>The bottom-most edge of the element's bottom <ahref="#padding-edge">padding edge</a> and the bottom <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
296
-
excluding boxes that have an ancestor of element as their containing block.
297
-
<dt>left edge
298
-
<dd><p>The left-most edge of the element's left <ahref="#padding-edge">padding edge</a> and the left <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
299
-
excluding boxes that have an ancestor of element as their containing block.
300
-
</dl>
301
-
<dt>If the <ahref="#overflow-directions">overflow directions</a> are leftward and upward
302
-
<dd>
303
-
<dl>
304
-
<dt>top edge
305
-
<dd><p>The top-most edge of the element's top <ahref="#padding-edge">padding edge</a> and the top <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
306
-
excluding boxes that have an ancestor of element as their containing block.
307
-
<dt>right edge
308
-
<dd><p>The element's right <ahref="#padding-edge">padding edge</a>.
<dd><p>The left-most edge of the element's left <ahref="#padding-edge">padding edge</a> and the left <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
313
-
excluding boxes that have an ancestor of element as their containing block.
314
-
</dl>
315
-
<dt>If the <ahref="#overflow-directions">overflow directions</a> are rightward and upward
316
-
<dd>
317
-
<dl>
318
-
<dt>top edge
319
-
<dd><p>The top-most edge of the element's top <ahref="#padding-edge">padding edge</a> and the top <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
320
-
excluding boxes that have an ancestor of element as their containing block.
321
-
<dt>right edge
322
-
<dd><p>The right-most edge of the element's right <ahref="#padding-edge">padding edge</a> and the right <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
323
-
excluding boxes that have an ancestor of element as their containing block.
<dd><p>The element's left <ahref="#padding-edge">padding edge</a>.
328
-
</dl>
329
-
</dl>
330
-
331
-
<p>The term <dfnid="document-content">document content</dfn> refers to the area on the
332
-
<ahref="#canvas">canvas</a> that is rendered upon, excluding content on negative
333
-
axis.</p>
275
+
<table>
276
+
<tr>
277
+
<th>If the <ahref="#overflow-directions">overflow directions</a> are…
278
+
<th>For a <ahref="#viewport">viewport</a>
279
+
<th>For an element
280
+
<tr>
281
+
<td>rightward and downward
282
+
<td>
283
+
<dl>
284
+
<dt>top edge
285
+
<dd><p>The top edge of the <ahref="#initial-containing-block">initial containing block</a>.
286
+
<dt>right edge
287
+
<dd><p>The right-most edge of the right edge of the <ahref="#initial-containing-block">initial containing block</a> and the right <ahref="#margin-edge">margin edge</a> of the
288
+
<ahref="#viewport">viewport</a>'s all descendant boxes.
289
+
<dt>bottom edge
290
+
<dd><p>The bottom-most edge of the bottom edge of the <ahref="#initial-containing-block">initial containing block</a> and the bottom <ahref="#margin-edge">margin edge</a> of the
291
+
<ahref="#viewport">viewport</a>'s all descendant boxes.
292
+
<dt>left edge
293
+
<dd><p>The left edge of the <ahref="#initial-containing-block">initial containing block</a>.
294
+
</dl>
295
+
<td>
296
+
<dl>
297
+
<dt>top edge
298
+
<dd><p>The element's top <ahref="#padding-edge">padding edge</a>.
299
+
<dt>right edge
300
+
<dd><p>The right-most edge of the element's right <ahref="#padding-edge">padding edge</a> and the right <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
301
+
excluding boxes that have an ancestor of element as their containing block.
302
+
<dt>bottom edge
303
+
<dd><p>The bottom-most edge of the element's bottom <ahref="#padding-edge">padding edge</a> and the bottom <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
304
+
excluding boxes that have an ancestor of element as their containing block.
305
+
<dt>left edge
306
+
<dd><p>The element's left <ahref="#padding-edge">padding edge</a>.
307
+
</dl>
308
+
<tr>
309
+
<td>leftward and downward
310
+
<td>
311
+
<dl>
312
+
<dt>top edge
313
+
<dd><p>The top edge of the <ahref="#initial-containing-block">initial containing block</a>.
314
+
<dt>right edge
315
+
<dd><p>The right edge of the <ahref="#initial-containing-block">initial containing block</a>.
316
+
<dt>bottom edge
317
+
<dd><p>The bottom-most edge of the bottom edge of the <ahref="#initial-containing-block">initial containing block</a> and the bottom <ahref="#margin-edge">margin edge</a> of the
318
+
<ahref="#viewport">viewport</a>'s all descendant boxes.
319
+
<dt>left edge
320
+
<dd><p>The left-most edge of the left edge of the <ahref="#initial-containing-block">initial containing block</a> and the left <ahref="#margin-edge">margin edge</a> of the
321
+
<ahref="#viewport">viewport</a>'s all descendant boxes.
322
+
</dl>
323
+
<td>
324
+
<dl>
325
+
<dt>top edge
326
+
<dd><p>The element's top <ahref="#padding-edge">padding edge</a>.
327
+
<dt>right edge
328
+
<dd><p>The element's right <ahref="#padding-edge">padding edge</a>.
329
+
<dt>bottom edge
330
+
<dd><p>The bottom-most edge of the element's bottom <ahref="#padding-edge">padding edge</a> and the bottom <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
331
+
excluding boxes that have an ancestor of element as their containing block.
332
+
<dt>left edge
333
+
<dd><p>The left-most edge of the element's left <ahref="#padding-edge">padding edge</a> and the left <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
334
+
excluding boxes that have an ancestor of element as their containing block.
335
+
</dl>
336
+
<tr>
337
+
<td>leftward and upward
338
+
<td>
339
+
<dl>
340
+
<dt>top edge
341
+
<dd><p>The top-most edge of the top edge of the <ahref="#initial-containing-block">initial containing block</a> and the top <ahref="#margin-edge">margin edge</a> of the
342
+
<ahref="#viewport">viewport</a>'s all descendant boxes.
343
+
<dt>right edge
344
+
<dd><p>The right edge of the <ahref="#initial-containing-block">initial containing block</a>.
345
+
<dt>bottom edge
346
+
<dd><p>The bottom edge of the <ahref="#initial-containing-block">initial containing block</a>.
347
+
<dt>left edge
348
+
<dd><p>The left-most edge of the left edge of the <ahref="#initial-containing-block">initial containing block</a> and the left <ahref="#margin-edge">margin edge</a> of the
349
+
<ahref="#viewport">viewport</a>'s all descendant boxes.
350
+
</dl>
351
+
<td>
352
+
<dl>
353
+
<dt>top edge
354
+
<dd><p>The top-most edge of the element's top <ahref="#padding-edge">padding edge</a> and the top <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
355
+
excluding boxes that have an ancestor of element as their containing block.
356
+
<dt>right edge
357
+
<dd><p>The element's right <ahref="#padding-edge">padding edge</a>.
<dd><p>The left-most edge of the element's left <ahref="#padding-edge">padding edge</a> and the left <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
362
+
excluding boxes that have an ancestor of element as their containing block.
363
+
</dl>
364
+
<tr>
365
+
<td>rightward and upward
366
+
<td>
367
+
<dl>
368
+
<dt>top edge
369
+
<dd><p>The top-most edge of the top edge of the <ahref="#initial-containing-block">initial containing block</a> and the top <ahref="#margin-edge">margin edge</a> of the
370
+
<ahref="#viewport">viewport</a>'s all descendant boxes.
371
+
<dt>right edge
372
+
<dd><p>The right-most edge of the right edge of the <ahref="#initial-containing-block">initial containing block</a> and the right <ahref="#margin-edge">margin edge</a> of the
373
+
<ahref="#viewport">viewport</a>'s all descendant boxes.
374
+
<dt>bottom edge
375
+
<dd><p>The bottom edge of the <ahref="#initial-containing-block">initial containing block</a>.
376
+
<dt>left edge
377
+
<dd><p>The left edge of the <ahref="#initial-containing-block">initial containing block</a>.
378
+
</dl>
379
+
<td>
380
+
<dl>
381
+
<dt>top edge
382
+
<dd><p>The top-most edge of the element's top <ahref="#padding-edge">padding edge</a> and the top <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
383
+
excluding boxes that have an ancestor of element as their containing block.
384
+
<dt>right edge
385
+
<dd><p>The right-most edge of the element's right <ahref="#padding-edge">padding edge</a> and the right <ahref="#margin-edge">margin edge</a> of the element's all descendant boxes,
386
+
excluding boxes that have an ancestor of element as their containing block.
height excluding the size of a rendered scroll bar (if any))).</li>
506
565
<li><p>Let <vartitle="">position</var> be the scroll position the <ahref="#viewport">viewport</a> would have by aligning the x-coordinate <vartitle="">x</var> of the
507
-
<ahref="#document-content">document content</a> with the left of the <ahref="#viewport">viewport</a> and aligning the y-coordinate <vartitle="">y</var> of the<ahref="#document-content">document content</a>
508
-
with the top of the <ahref="#viewport">viewport</a>.
566
+
<ahref="#viewport">viewport</a><ahref="#scrolling-area">scrolling area</a> with the left of the <ahref="#viewport">viewport</a> and aligning the y-coordinate <vartitle="">y</var> of the
567
+
<ahref="#viewport">viewport</a><ahref="#scrolling-area">scrolling area</a>with the top of the <ahref="#viewport">viewport</a>.
509
568
<li><p>If <vartitle="">position</var> is the same as the <ahref="#viewport">viewport</a>'s current scroll position, and the <ahref="#viewport">viewport</a> does not have an ongoing
510
569
<ahref="#concept-smooth-scroll" title="concept-smooth-scroll">smooth scroll</a>, abort these steps.
511
570
<li><p>Let <vartitle="">task</var> be these steps:
0 commit comments