Skip to content

Commit 3583eb1

Browse files
committed
CSSOM editorial changes
1 parent 31af81b commit 3583eb1

2 files changed

Lines changed: 145 additions & 86 deletions

File tree

css3-regions/Overview.html

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ <h2 class="no-num no-toc" id=table-of-contents>Table of contents</h2>
402402
</ul>
403403

404404
<li><a href="#cssom_view_and_css_regions"><span class=secno>6.
405-
</span>CSSOM view and CSS regions</a>
405+
</span>CSSOM</a>
406406
<ul class=toc>
407407
<li><a href="#the-namedflow-interface"><span class=secno>6.1. </span>The
408408
NamedFlow interface</a>
@@ -413,8 +413,8 @@ <h2 class="no-num no-toc" id=table-of-contents>Table of contents</h2>
413413
<li><a href="#region-flow-layout-events"><span class=secno>6.3.
414414
</span>Region flow layout events</a>
415415

416-
<li><a href="#cssomview-and-regions"><span class=secno>6.4. </span>CSS
417-
OM View and CSS Regions</a>
416+
<li><a href="#cssomview-and-regions"><span class=secno>6.4.
417+
</span>Clarifications on pre-existing APIs</a>
418418
<ul class=toc>
419419
<li><a
420420
href="#cssomview-getclientrects-and-getboundingclientrect"><span
@@ -1886,8 +1886,7 @@ <h3 id=processing-model><span class=secno>5.1. </span>Processing model</h3>
18861886
flow fragment content, or a combination of the two, then the ::before
18871887
and/or ::after content overflows.
18881888

1889-
<h2 id="cssom_view_and_css_regions"><span class=secno>6. </span>CSSOM view
1890-
and CSS regions</h2>
1889+
<h2 id="cssom_view_and_css_regions"><span class=secno>6. </span>CSSOM</h2>
18911890

18921891
<div class=issue-marker data-bug_id=15679 data-bug_status=NEW> <a
18931892
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15679">Bug-15679</a>
@@ -1957,7 +1956,7 @@ <h3 id=the-namedflow-interface><span class=secno>6.1. </span>The NamedFlow
19571956
<code>CREATED-REFERENCED</code> states. The list may include <a
19581957
href="#named-flow0">named flows</a> that are in the
19591958
<code>REFERENCED</code> state. The list may also include <a
1960-
href="#named-flow0">named flows</a>that are in the STALE state.
1959+
href="#named-flow0">named flows</a> that are in the STALE state.
19611960

19621961
<p>The <dfn id=document-getflowbyname><code
19631962
class=idl>getFlowByName</code></dfn> method on the <a
@@ -2055,14 +2054,16 @@ <h3 id=the-namedflow-interface><span class=secno>6.1. </span>The NamedFlow
20552054
class=idl>NamedFlow</code></a> instance.
20562055

20572056
<p>The <dfn id=dom-named-flow-overset><code class=idl>overset</code></dfn>
2058-
attribute returns true if the <a href="#named-flow0">named flow</a> does
2059-
not fully fit in the associated regions. Otherwise, it returns false.
2057+
attribute returns true if there are <a href="#named-flow0">named flow</a>
2058+
fragments that do not fit in the associated region chain. The attribute
2059+
also returns true if there is no associated region chain. Otherwise, it
2060+
returns false.
20602061

20612062
<p>The <dfn id=dom-named-flow-get-regions><code
20622063
class=idl>getRegions()</code></dfn> method returns the sequence of regions
20632064
in the <span>region chain</span> associated with the <a
20642065
href="#named-flow0">named flow</a>. Note that the returned values is a
2065-
static sequence.
2066+
static sequence in document order.
20662067

20672068
<p>The <dfn
20682069
id=dom-named-flow-first-empty-region-index>firstEmptyRegionIndex</dfn> is
@@ -2076,8 +2077,8 @@ <h3 id=the-namedflow-interface><span class=secno>6.1. </span>The NamedFlow
20762077
is <code>-1</code>. If there are no regions in the <span>region
20772078
chain</span>, the value is <code>-1</code> as well.
20782079

2079-
<p>The <dfn id=dom-named-flow-get-content>getContent()</dfn> methods
2080-
returns an ordered collection of nodes that constitute the <a
2080+
<p>The <dfn id=dom-named-flow-get-content>getContent()</dfn> method returns
2081+
an ordered collection of nodes that constitute the <a
20812082
href="#named-flow0">named flow</a>. The returned list is a static snapshot
20822083
of the <a href="#named-flow0">named flow</a> content at the time the
20832084
method is invoked. This list contains the elements that were moved to the
@@ -2088,7 +2089,8 @@ <h3 id=the-namedflow-interface><span class=secno>6.1. </span>The NamedFlow
20882089
<p>The <dfn
20892090
id=dom-named-flow-get-regions-by-content>getRegionsByContent()</dfn>
20902091
method returns the sequence of regions that contain at least part of the
2091-
target content node. Note that the returned values is a static sequence.
2092+
target content node. Note that the returned values is a static sequence in
2093+
document order.
20922094

20932095
<p>The <a href="#dom-named-flow"><code class=idl>NamedFlow</code></a>
20942096
interface can be used for different purposes. For example, the <a
@@ -2180,15 +2182,16 @@ <h3 id=the-region-interface><span class=secno>6.2. </span>The Region
21802182

21812183
<p>The <dfn id=dom-region-getregionflowranges>getRegionFlowRanges</dfn>
21822184
method returns an array of <a
2183-
href="http://www.w3.org/TR/dom/#interface-range"> Range</a> instances
2185+
href="http://www.w3.org/TR/dom/#interface-range">Range</a> instances
21842186
corresponding to fragment from the <a href="#named-flow0">named flow</a>
2185-
that is laid out in the region. If the region does not received any
2186-
fragment because it is too small to accommodate any, the method returns a
2187-
single <code class=idl>Range</code> where the <code>startContainer</code>
2188-
and <code>startOffset</code> have the same values as the
2189-
<code>endContainer</code> and <code>endOffset</code>. In that situation,
2190-
if the region is the first in the <span>region chain</span>, the
2191-
<code>startContainer</code> is the first <code>Node</code> in the <a
2187+
that is laid out in the region. If the region has not received a fragment
2188+
because it is too small to accommodate any, the method returns a single
2189+
<code class=idl>Range</code> where the <code>startContainer</code> and
2190+
<code>startOffset</code> have the same values as the
2191+
<code>endContainer</code> and <code>endOffset</code> and therefore the
2192+
collapsed attribute on the <code class=idl>Range</code> is true. In that
2193+
situation, if the region is the first in the <span>region chain</span>,
2194+
the <code>startContainer</code> is the first <code>Node</code> in the <a
21922195
href="#named-flow0">named flow</a> and the <code>startOffset</code> is
21932196
zero. If the region is the last region in the region chain (but not the
21942197
first and only one), the <code>startContainer</code> and
@@ -2281,8 +2284,8 @@ <h3 id=region-flow-layout-events><span class=secno>6.3. </span>Region flow
22812284
</ul>
22822285
</table>
22832286

2284-
<h3 id=cssomview-and-regions><span class=secno>6.4. </span>CSS OM View and
2285-
CSS Regions</h3>
2287+
<h3 id=cssomview-and-regions><span class=secno>6.4. </span>Clarifications
2288+
on pre-existing APIs</h3>
22862289

22872290
<h4 id=cssomview-getclientrects-and-getboundingclientrect><span
22882291
class=secno>6.4.1. </span><code class=idl>getClientRects()</code> and
@@ -2293,13 +2296,13 @@ <h4 id=cssomview-getclientrects-and-getboundingclientrect><span
22932296
element (<code class=idl>getBoundingClientRect()</code>) and its generated
22942297
boxes (<code class=idl>getClientRects()</code>).
22952298

2296-
<p>This definition applies to CSS regions and the multiple boxes generated
2297-
for an element flowing through multiple regions. The <code
2299+
<p>This definition applies to the (possibly) multiple boxes generated for
2300+
an element in a named flow flowing through a region chain. The <code
22982301
class=idl>getClientRects()</code> method returns the list of boxes
2299-
generated for each of the element fragment laid out different regions. The
2300-
<code>getBoundingClientRect()</code> method operates as specified in the
2301-
<a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a> as well
2302-
and is computed from the set of rectangles returned by <code
2302+
generated for each of the element fragments laid out in different regions.
2303+
The <code>getBoundingClientRect()</code> method operates as specified in
2304+
the <a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a> as
2305+
well and is computed from the set of rectangles returned by <code
23032306
class=idl>getClientRects()</code>.
23042307

23052308
<h4 id=cssomview-offset-attributes><span class=secno>6.4.2. </span><code

css3-regions/Overview.src.html

Lines changed: 114 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,7 @@ <h3 id="processing-model">Processing model</h3>
17171717
or a combination of the two,
17181718
then the ::before and/or ::after content overflows.</p>
17191719

1720-
<h2 id="cssom_view_and_css_regions">CSSOM view and CSS regions</h2>
1720+
<h2 id="cssom_view_and_css_regions">CSSOM</h2>
17211721

17221722
<div class="issue-marker" data-bug_id="15679" data-bug_status="NEW">
17231723
<a href=
@@ -1776,7 +1776,7 @@ <h3 id="the-namedflow-interface">The NamedFlow interface</h3>
17761776
that are currently in the <code>CREATED</code> and <code>CREATED-REFERENCED</code> states.
17771777
The list may include <span>named flows</span>
17781778
that are in the <code>REFERENCED</code> state. The list
1779-
may also include <span>named flows</span>that are in the STALE state.</p>
1779+
may also include <span>named flows</span> that are in the STALE state.</p>
17801780

17811781
<p>The <dfn id="document-getflowbyname"><code class="idl">getFlowByName</code></dfn> method on the <a href=
17821782
"http://www.w3.org/TR/dom/#interface-document"><code class=
@@ -1838,41 +1838,66 @@ <h3 id="the-namedflow-interface">The NamedFlow interface</h3>
18381838
<p>The <dfn id="dom-named-flow-name"><code class="idl">name</code></dfn> attribute
18391839
returns the name of the <code class="idl">NamedFlow</code> instance.</p>
18401840

1841-
<p>The <dfn id="dom-named-flow-overset"><code class=
1842-
"idl">overset</code></dfn> attribute returns true if the <span>named flow</span> does not
1843-
fully fit in the associated regions. Otherwise, it returns false. </p>
1844-
1845-
<p>The <dfn id="dom-named-flow-get-regions"><code class="idl">getRegions()</code></dfn>
1846-
method returns the sequence of regions in the <span>region chain</span> associated
1847-
with the <span>named flow</span>. Note that the returned values is a static sequence.</p>
1848-
1849-
<p>The <dfn id="dom-named-flow-first-empty-region-index">firstEmptyRegionIndex</dfn> is the index
1850-
of the first region in the region chain with the <code>regionOverset</code> attribute
1851-
set to <code>empty</code>. If all regions have the <code>regionOverset</code> attribute
1852-
set to <code>fit</code> or <code>overset</code>, the value for
1853-
<code>firstEmptyRegionIndex</code> is <code>-1</code>. If there are no regions in the
1854-
<span>region chain</span>, the value is <code>-1</code> as well. </p>
1841+
<p>The <dfn id="dom-named-flow-overset"><code class= "idl">overset</code></dfn>
1842+
attribute returns true
1843+
if there are <span>named flow</span> fragments
1844+
that do not fit in the associated region chain.
1845+
The attribute also returns true
1846+
if there is no associated region chain.
1847+
Otherwise, it returns false. </p>
1848+
1849+
<p>The <dfn id="dom-named-flow-get-regions"><code class="idl">getRegions()</code></dfn>
1850+
method returns the sequence
1851+
of regions in the <span>region chain</span>
1852+
associated with the <span>named flow</span>.
1853+
Note that the returned values
1854+
is a static sequence
1855+
in document order.</p>
1856+
1857+
<p>The <dfn id="dom-named-flow-first-empty-region-index">firstEmptyRegionIndex</dfn>
1858+
is the index of the first region
1859+
in the region chain with the <code>regionOverset</code> attribute
1860+
set to <code>empty</code>.
1861+
If all regions have the <code>regionOverset</code> attribute
1862+
set to <code>fit</code> or <code>overset</code>,
1863+
the value for <code>firstEmptyRegionIndex</code> is <code>-1</code>.
1864+
If there are no regions in the <span>region chain</span>,
1865+
the value is <code>-1</code> as well. </p>
18551866

1856-
<p>The <dfn id="dom-named-flow-get-content">getContent()</dfn> methods returns
1857-
an ordered collection of nodes that constitute the <span>named flow</span>. The returned list
1858-
is a static snapshot of the <span>named flow</span> content at the time the method is invoked.
1859-
This list contains the elements that were moved to the <span>named flow</span> but not their
1860-
descendants (unless the descendants are themselves moved to the <span>named flow</span>).
1867+
<p>The <dfn id="dom-named-flow-get-content">getContent()</dfn>
1868+
method returns an ordered collection
1869+
of nodes that constitute the <span>named flow</span>.
1870+
The returned list is a static snapshot
1871+
of the <span>named flow</span> content
1872+
at the time the method is invoked.
1873+
This list contains the elements
1874+
that were moved to the <span>named flow</span>
1875+
but not their descendants
1876+
(unless the descendants are themselves
1877+
moved to the <span>named flow</span>).
18611878
</p>
18621879

1863-
<p>The <dfn id="dom-named-flow-get-regions-by-content">getRegionsByContent()</dfn> method returns the
1864-
sequence of regions that contain at least part of the target content node.
1865-
Note that the returned values is a static sequence.</p>
1880+
<p>The <dfn id="dom-named-flow-get-regions-by-content">getRegionsByContent()</dfn>
1881+
method returns the sequence of regions
1882+
that contain at least part
1883+
of the target content node.
1884+
Note that the returned values
1885+
is a static sequence
1886+
in document order.</p>
18661887

1867-
<p>The <code class="idl">NamedFlow</code> interface can be used for different purposes.
1868-
For example, the <code>getRegionsByContent()</code> method can help navigate by bookmark:
1869-
a script can find the <span>region</span>s that display a particular anchor and bring them
1870-
to view.</p>
1871-
1872-
<p>Likewise, the interface allows authors to check if all content has been fitted into
1873-
existing regions. If it has, the <code>overset</code> attribute would be false.</p>
1874-
1875-
1888+
<p>The <code class="idl">NamedFlow</code> interface
1889+
can be used for different purposes.
1890+
For example, the <code>getRegionsByContent()</code> method
1891+
can help navigate by bookmark:
1892+
a script can find the <span>region</span>s
1893+
that display a particular anchor
1894+
and bring them to view.</p>
1895+
1896+
<p>Likewise, the interface allows authors
1897+
to check if all content has been fitted
1898+
into existing regions.
1899+
If it has, the <code>overset</code> attribute
1900+
would be false.</p>
18761901

18771902
<h3 id="the-region-interface">The Region interface</h3>
18781903

@@ -1936,22 +1961,41 @@ <h3 id="the-region-interface">The Region interface</h3>
19361961
<p>The <dfn id="dom-region-flowfrom">flowFrom</dfn> attribute returns the name of the
19371962
<span>named flow</span> this region is associated with.</p>
19381963

1939-
<p>The <dfn id="dom-region-getregionflowranges">getRegionFlowRanges</dfn> method returns
1940-
an array of <a href=
1941-
"http://www.w3.org/TR/dom/#interface-range">
1942-
Range</a> instances corresponding to fragment from the <span>named flow</span> that
1943-
is laid out in the region. If the region does not received any fragment because it is
1944-
too small to accommodate any, the method returns a single <code class="idl">Range</code> where the
1945-
<code>startContainer</code> and <code>startOffset</code> have the same values as the
1946-
<code>endContainer</code> and <code>endOffset</code>. In that situation,
1947-
if the region is the first in the
1948-
<span>region chain</span>, the <code>startContainer</code> is the first
1949-
<code>Node</code> in the <span>named flow</span> and the <code>startOffset</code> is
1950-
zero. If the region is the last region in the region chain (but not the first and only one),
1951-
the <code>startContainer</code> and <code>startOffset</code> are the same values as the
1952-
<code>endContainer</code> and <code>endOffset</code> on the previous region in the
1953-
<span>region chain</span>. The method returns null if the
1954-
<span>region</span> object is not (or no longer) a region.</p>
1964+
<p>The <dfn id="dom-region-getregionflowranges">getRegionFlowRanges</dfn> method
1965+
returns an array of <a href= "http://www.w3.org/TR/dom/#interface-range">Range</a>
1966+
instances corresponding to fragment
1967+
from the <span>named flow</span>
1968+
that is laid out in the region.
1969+
If the region has not received a fragment
1970+
because it is too small to accommodate any,
1971+
the method returns a single <code class="idl">Range</code>
1972+
where the <code>startContainer</code>
1973+
and <code>startOffset</code>
1974+
have the same values as
1975+
the <code>endContainer</code>
1976+
and <code>endOffset</code>
1977+
and therefore the collapsed attribute
1978+
on the <code class="idl">Range</code> is true.
1979+
In that situation,
1980+
if the region is the first
1981+
in the <span>region chain</span>,
1982+
the <code>startContainer</code>
1983+
is the first <code>Node</code>
1984+
in the <span>named flow</span>
1985+
and the <code>startOffset</code> is zero.
1986+
If the region is the last region
1987+
in the region chain
1988+
(but not the first and only one),
1989+
the <code>startContainer</code>
1990+
and <code>startOffset</code>
1991+
are the same values as
1992+
the <code>endContainer</code>
1993+
and <code>endOffset</code>
1994+
on the previous region
1995+
in the <span>region chain</span>.
1996+
The method returns null
1997+
if the <span>region</span> object
1998+
is not (or no longer) a region.</p>
19551999

19562000
<div class="note">
19572001
<p>A <code class="idl">Region</code> instance may represent and
@@ -1994,19 +2038,31 @@ <h3 id="region-flow-layout-events">Region flow layout events</h3>
19942038
</tr>
19952039
</tbody></table>
19962040

1997-
<h3 id="cssomview-and-regions">CSS OM View and CSS Regions</h3>
2041+
<h3 id="cssomview-and-regions">Clarifications on pre-existing APIs</h3>
19982042

19992043

20002044
<h4 id="cssomview-getclientrects-and-getboundingclientrect"><code class="idl">getClientRects()</code> and <code>getBoundingClientRects()</code></h4>
20012045

2002-
<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>).
2003-
2004-
<p>This definition applies to CSS regions and the multiple boxes generated for an element flowing
2005-
through multiple regions. The <code class="idl">getClientRects()</code> method returns the list
2006-
of boxes generated for each of the element fragment laid out different regions.
2007-
The <code>getBoundingClientRect()</code> method operates as specified in the
2008-
<a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a> as well and is computed
2009-
from the set of rectangles returned by <code class="idl">getClientRects()</code>.</p>
2046+
<p>The <a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a>
2047+
defines how user agents compute
2048+
the bounding client rectangle
2049+
for an element (<code class="idl">getBoundingClientRect()</code>)
2050+
and its generated boxes (<code class="idl">getClientRects()</code>).</p>
2051+
2052+
<p>This definition applies to
2053+
the (possibly) multiple boxes
2054+
generated for an element in a named flow
2055+
flowing through a region chain.
2056+
The <code class="idl">getClientRects()</code> method
2057+
returns the list of boxes generated
2058+
for each of the element fragments
2059+
laid out in different regions.
2060+
The <code>getBoundingClientRect()</code> method
2061+
operates as specified in the
2062+
<a href="http://www.w3.org/TR/cssom-view/">CSSOM View Module</a>
2063+
as well and is computed
2064+
from the set of rectangles
2065+
returned by <code class="idl">getClientRects()</code>.</p>
20102066

20112067
<h4 id="cssomview-offset-attributes"><code class="idl">offsetTop</code>, <code class="idl">offsetLeft</code>,
20122068
<code class="idl">offsetWidth</code> and <code class="idl">offsetWidth</code></h4>

0 commit comments

Comments
 (0)