Skip to content

Commit 4c2c2dd

Browse files
committed
Added section about getClientRects(), getBoundingClientRect(), offsetWidth, offsetHeight, offsetTop and offsetLeft
--HG-- extra : rebase_source : a9761d3044d92f816ce84f7895fe714fe18f3442
1 parent 0a97988 commit 4c2c2dd

2 files changed

Lines changed: 76 additions & 15 deletions

File tree

css3-regions/Overview.html

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,20 @@ <h2 class="no-num no-toc" id=table-of-contents>Table of contents</h2>
425425

426426
<li><a href="#region-flow-layout-events"><span class=secno>7.3.
427427
</span>Region flow layout events</a>
428+
429+
<li><a href="#cssomview-and-regions"><span class=secno>7.4. </span>CSS
430+
OM View and CSS Regions</a>
431+
<ul class=toc>
432+
<li><a
433+
href="#cssomview-getclientrects-and-getboundingclientrect"><span
434+
class=secno>7.4.1. </span><code class=idl>getClientRects()</code> and
435+
<code>getBoundingClientRects()</code></a>
436+
437+
<li><a href="#cssomview-offset-attributes"><span class=secno>7.4.2.
438+
</span><code class=idl>offsetTop</code>, <code
439+
class=idl>offsetLeft</code>, <code class=idl>offsetWidth</code> and
440+
<code class=idl>offsetWidth</code></a>
441+
</ul>
428442
</ul>
429443

430444
<li><a href="#relation-to-other-specifications"><span class=secno>8.
@@ -1921,14 +1935,6 @@ <h2 id="cssom_view_and_css_regions"><span class=secno>7. </span>CSSOM view
19211935
be needed to accommodate for the additional space required to fit the
19221936
larger text or some regions may need to be removed for smaller text.
19231937

1924-
<div class=note><span class=note-prefix>Note </span>
1925-
<p>Since an element may be split into multiple regions, invoking <code
1926-
class=idl><a
1927-
href="http://www.w3.org/TR/cssom-view/#dom-element-getclientrects">getClientRects</a></code>
1928-
on it must return the list of rectangles for the element in all the
1929-
regions it is part of.</p>
1930-
</div>
1931-
19321938
<h3 id=the-namedflow-interface><span class=secno>7.1. </span>The NamedFlow
19331939
interface</h3>
19341940

@@ -2305,6 +2311,40 @@ <h3 id=region-flow-layout-events><span class=secno>7.3. </span>Region flow
23052311
</ul>
23062312
</table>
23072313

2314+
<h3 id=cssomview-and-regions><span class=secno>7.4. </span>CSS OM View and
2315+
CSS Regions</h3>
2316+
2317+
<h4 id=cssomview-getclientrects-and-getboundingclientrect><span
2318+
class=secno>7.4.1. </span><code class=idl>getClientRects()</code> and
2319+
<code>getBoundingClientRects()</code></h4>
2320+
2321+
<p>The <a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a>
2322+
defines how user agents compute the bounding client rectangle for an
2323+
element (<code class=idl>getBoundingClientRect()</code>) and its generated
2324+
boxes (<code class=idl>getClientRects()</code>).
2325+
2326+
<p>This definition applies to CSS regions and the multiple boxes generated
2327+
for an element flowing through multiple regions. The <code
2328+
class=idl>getClientRects()</code> method returns the list of boxes
2329+
generated for each of the element fragment laid out different regions. The
2330+
<code>getBoundingClientRect()</code> method operates as specified in the
2331+
<a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a> as well
2332+
and is computed from the set of rectangles returned by <code
2333+
class=idl>getClientRects()</code>.
2334+
2335+
<h4 id=cssomview-offset-attributes><span class=secno>7.4.2. </span><code
2336+
class=idl>offsetTop</code>, <code class=idl>offsetLeft</code>, <code
2337+
class=idl>offsetWidth</code> and <code class=idl>offsetWidth</code></h4>
2338+
2339+
<p>The computation of the <a
2340+
href="http://dev.w3.org/csswg/cssom-view/#offset-attributes">offset
2341+
attributes</a> for elements laid out in a <span>named flow follow the <a
2342+
href="http://dev.w3.org/csswg/cssom-view/#offset-attribute">specification</a>.
2343+
For the purpose of the algorithm, the <em>first CSS layout box</em>
2344+
associated with an element laid out in a <a href="#named-flow0">named
2345+
flow</a> is the box generated for the first region the element is laid out
2346+
into.</span>
2347+
23082348
<h2 id=relation-to-other-specifications><span class=secno>8.
23092349
</span>Relation to other specifications</h2>
23102350

@@ -2464,6 +2504,9 @@ <h3 id="changes_from_June_09_2011"><span class=secno>11.1. </span>Changes
24642504
class=css>::before</code>&rsquo; element (for a example) to a named flow
24652505
does not seem useful and causes specification and implementation
24662506
complexity.
2507+
2508+
<li>Added section about getClientRects(), getBoundingClientRect(),
2509+
offsetWidth, offsetHeight, offsetTop and offsetLeft.
24672510
</ul>
24682511

24692512
<h3 id="changes_from_June_09_2011"><span class=secno>11.2. </span>Changes

css3-regions/Overview.src.html

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,13 +1675,6 @@ <h2 id="cssom_view_and_css_regions">CSSOM view and CSS regions</h2>
16751675
regions may be needed to accommodate for the additional space required to
16761676
fit the larger text or some regions may need to be removed for smaller text.</p>
16771677

1678-
<div class="note"><span class="note-prefix">Note </span>
1679-
<p>Since an element may be split into multiple regions, invoking
1680-
<code class="idl"><a href=
1681-
"http://www.w3.org/TR/cssom-view/#dom-element-getclientrects">getClientRects</a></code>
1682-
on it must return the list of rectangles for the element in all the
1683-
regions it is part of.</p>
1684-
</div>
16851678
<h3 id="the-namedflow-interface">The NamedFlow interface</h3>
16861679

16871680
<p>A <span>named flow</span> is created when it becomes referenced by the
@@ -1963,6 +1956,29 @@ <h3 id="region-flow-layout-events">Region flow layout events</h3>
19631956
</tr>
19641957
</tbody></table>
19651958

1959+
<h3 id="cssomview-and-regions">CSS OM View and CSS Regions</h3>
1960+
1961+
1962+
<h4 id="cssomview-getclientrects-and-getboundingclientrect"><code class="idl">getClientRects()</code> and <code>getBoundingClientRects()</code></h4>
1963+
1964+
<p>The <a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a> defines how user agents compute the bounding client rectangle for an element (<code class="idl">getBoundingClientRect()</code>) and its generated boxes (<code class="idl">getClientRects()</code>).
1965+
1966+
<p>This definition applies to CSS regions and the multiple boxes generated for an element flowing
1967+
through multiple regions. The <code class="idl">getClientRects()</code> method returns the list
1968+
of boxes generated for each of the element fragment laid out different regions.
1969+
The <code>getBoundingClientRect()</code> method operates as specified in the
1970+
<a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a> as well and is computed
1971+
from the set of rectangles returned by <code class="idl">getClientRects()</code>.</p>
1972+
1973+
<h4 id="cssomview-offset-attributes"><code class="idl">offsetTop</code>, <code class="idl">offsetLeft</code>,
1974+
<code class="idl">offsetWidth</code> and <code class="idl">offsetWidth</code></h4>
1975+
1976+
<p>The computation of the <a href="http://dev.w3.org/csswg/cssom-view/#offset-attributes">offset attributes</a>
1977+
for elements laid out in a <span>named flow</code> follow the <a href="http://dev.w3.org/csswg/cssom-view/#offset-attribute">specification</a>. For the purpose of the
1978+
algorithm, the <em>first CSS layout box</em> associated
1979+
with an element laid out in a <span>named flow</span> is the box generated for the first region
1980+
the element is laid out into.</p>
1981+
19661982
<h2 id="relation-to-other-specifications">Relation to other
19671983
specifications</h2>
19681984

@@ -2046,6 +2062,8 @@ <h3 id="changes_from_June_09_2011">Changes from <a href="http://www.w3.org/TR/20
20462062
<li>Changed paragraph on pseudo-elements to disallow 'flow-into' on all pseudo-elements because
20472063
moving a '::before' element (for a example) to a named flow does not seem useful and causes specification
20482064
and implementation complexity.</li>
2065+
<li>Added section about getClientRects(), getBoundingClientRect(), offsetWidth, offsetHeight, offsetTop and
2066+
offsetLeft.</li>
20492067
</ul>
20502068

20512069

0 commit comments

Comments
 (0)