Skip to content

Commit 0c653f4

Browse files
author
Simon Pieters
committed
[cssom-view] Make 'scrolling area' aware of right-to-left
1 parent 1b7bbc7 commit 0c653f4

2 files changed

Lines changed: 34 additions & 8 deletions

File tree

cssom-view/Overview.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,26 @@ <h2 id="terminology"><span class="secno">3 </span>Terminology</h2>
249249
<dt>top edge
250250
<dd><p>The element's top <a href="#padding-edge">padding edge</a>.
251251
<dt>right edge
252-
<dd><p>The right-most edge of the element's right <a href="#padding-edge">padding edge</a> and the right <a href="#margin-edge">margin edge</a> of the element's all descendant boxes,
253-
excluding boxes that have an ancestor of element as their containing block.
252+
<dd>
253+
<dl class="switch">
254+
<dt>If the element can have overflow to the right
255+
<dd><p>The right-most edge of the element's right <a href="#padding-edge">padding edge</a> and the right <a href="#margin-edge">margin edge</a> of the element's all descendant boxes,
256+
excluding boxes that have an ancestor of element as their containing block.
257+
<dt>If the element can have overflow to the left (under right-to-left conditions)
258+
<dd><p>The element's right <a href="#padding-edge">padding edge</a>.
259+
</dl>
254260
<dt>bottom edge
255261
<dd><p>The bottom-most edge of the element's bottom <a href="#padding-edge">padding edge</a> and the bottom <a href="#margin-edge">margin edge</a> of the element's all descendant boxes,
256262
excluding boxes that have an ancestor of element as their containing block.
257263
<dt>left edge
258-
<dd><p>The element's left <a href="#padding-edge">padding edge</a>.
264+
<dd>
265+
<dl class="switch">
266+
<dt>If the element can have overflow to the right
267+
<dd><p>The element's left <a href="#padding-edge">padding edge</a>.
268+
<dt>If the element can have overflow to the left (under right-to-left conditions)
269+
<dd><p>The left-most edge of the element's left <a href="#padding-edge">padding edge</a> and the left <a href="#margin-edge">margin edge</a> of the element's all descendant boxes,
270+
excluding boxes that have an ancestor of element as their containing block.
271+
</dl>
259272
</dl>
260273

261274
<p>The term <dfn id="document-content">document content</dfn> refers to the area on the
@@ -396,7 +409,7 @@ <h2 id="extensions-to-the-window-interface"><span class="secno">5 </span>Extensi
396409
<p>When the <dfn id="dom-window-scroll" title="dom-Window-scroll"><code>scroll(<var title="">x</var>, <var title="">y</var>, <var title="">options</var>)</code></dfn> method is invoked these steps must be run:</p>
397410
<ol>
398411
<li><p>If there is no <a href="#viewport">viewport</a>, abort these steps.
399-
<dl>
412+
<dl class="switch">
400413
<dt>If <a href="#document-content">document content</a> can have overflow to the right
401414
<dd><p>Let <var title="">x</var> be max(0, min(<var title="">x</var>,
402415
<a href="#scrolling-area">scrolling area</a> width - <a href="#padding-edge">padding edge</a>

cssom-view/Overview.src.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,26 @@ <h2>Terminology</h2>
219219
<dt>top edge
220220
<dd><p>The element's top <span>padding edge</span>.
221221
<dt>right edge
222-
<dd><p>The right-most edge of the element's right <span>padding edge</span> and the right <span>margin edge</span> of the element's all descendant boxes,
223-
excluding boxes that have an ancestor of element as their containing block.
222+
<dd>
223+
<dl class=switch>
224+
<dt>If the element can have overflow to the right
225+
<dd><p>The right-most edge of the element's right <span>padding edge</span> and the right <span>margin edge</span> of the element's all descendant boxes,
226+
excluding boxes that have an ancestor of element as their containing block.
227+
<dt>If the element can have overflow to the left (under right-to-left conditions)
228+
<dd><p>The element's right <span>padding edge</span>.
229+
</dl>
224230
<dt>bottom edge
225231
<dd><p>The bottom-most edge of the element's bottom <span>padding edge</span> and the bottom <span>margin edge</span> of the element's all descendant boxes,
226232
excluding boxes that have an ancestor of element as their containing block.
227233
<dt>left edge
228-
<dd><p>The element's left <span>padding edge</span>.
234+
<dd>
235+
<dl class=switch>
236+
<dt>If the element can have overflow to the right
237+
<dd><p>The element's left <span>padding edge</span>.
238+
<dt>If the element can have overflow to the left (under right-to-left conditions)
239+
<dd><p>The left-most edge of the element's left <span>padding edge</span> and the left <span>margin edge</span> of the element's all descendant boxes,
240+
excluding boxes that have an ancestor of element as their containing block.
241+
</dl>
229242
</dl>
230243

231244
<p>The term <dfn>document content</dfn> refers to the area on the
@@ -366,7 +379,7 @@ <h2>Extensions to the <code title>Window</code> Interface</h2>
366379
<p>When the <dfn title=dom-Window-scroll><code>scroll(<var title>x</var>, <var title>y</var>, <var title>options</var>)</code></dfn> method is invoked these steps must be run:</p>
367380
<ol>
368381
<li><p>If there is no <span>viewport</span>, abort these steps.
369-
<dl>
382+
<dl class=switch>
370383
<dt>If <span>document content</span> can have overflow to the right
371384
<dd><p>Let <var title>x</var> be max(0, min(<var title>x</var>,
372385
<span>scrolling area</span> width - <span>padding edge</span>

0 commit comments

Comments
 (0)