Skip to content

Commit d3ff3a7

Browse files
committed
Modified region layout event to be dispatched on NamedFlow instead of region as before. Was requested by Issue 15938 and required in the general effort to have the DOM APIs work with non-element regions
--HG-- extra : rebase_source : 4c504e1d7050a9f1fee5de434a8564c8d4c526da
1 parent 490cb2c commit d3ff3a7

2 files changed

Lines changed: 50 additions & 13 deletions

File tree

css3-regions/Overview.html

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,12 +2073,15 @@ <h3 id=the-namedflow-interface><span class=secno>7.1. </span>The NamedFlow
20732073
</div>
20742074

20752075
<pre class=idl>
2076-
interface <a href="#dom-namedflow">NamedFlow</a> {
2076+
interface <a
2077+
href="#dom-namedflow">NamedFlow</a> implements <a
2078+
href="http://www.w3.org/TR/dom/#interface-eventtarget">EventTarget</a> {
20772079
readonly attribute DOMString name;
20782080
readonly attribute boolean <a
20792081
href="#dom-namedflow-overset">overset</a>;
20802082
sequence&lt;<a
20812083
href="#region-interface">Region</a>&gt; getRegions();
2084+
readonly attribute integer emptyRegionsIndex;
20822085
<a
20832086
href="http://www.w3.org/TR/dom/#interface-nodelist">NodeList</a> getContent();
20842087
sequence&lt;<a
@@ -2100,6 +2103,16 @@ <h3 id=the-namedflow-interface><span class=secno>7.1. </span>The NamedFlow
21002103
href="#named-flow0">named flow</a>. Note that the returned values is a
21012104
static sequence.
21022105

2106+
<p>The <dfn id=dom-namedflow-unusedregionindex>emptyRegionsIndex</dfn> is
2107+
the index of the first region in the region sequence with the <a
2108+
href="#dom-region-regionoverset"><code>regionOverset</code></a> attribute
2109+
set to <code>empty</code>. If all regions have the <a
2110+
href="#dom-region-regionoverset"><code>regionOverset</code></a> attribute
2111+
set to <code>fit</code> or <a
2112+
href="#dom-namedflow-overset"><code>overset</code></a>, the value for <a
2113+
href="#dom-namedflow-unusedregionindex"><code>emptyRegionsIndex</code></a>
2114+
is <code>-1</code>.
2115+
21032116
<p>The <dfn id=dom-namedflow-getcontent>getContent()</dfn> methods returns
21042117
an ordered collection of nodes that constitute the named flow. The
21052118
returned list is a static snapshot of the named flow content at the time
@@ -2239,9 +2252,10 @@ <h3 id=region-flow-layout-events><span class=secno>7.3. </span>Region flow
22392252
</div>
22402253
</div>
22412254

2242-
<p>Region <a href="">Event Targets</a> dispatch <code
2255+
<p><a href="#dom-namedflow"><code class=idl>NamedFlow</code></a> objects
2256+
are <a href="">Event Targets</a> which dispatch <code
22432257
class=idl>regionLayoutUpdate</code> events when there is a possible layout
2244-
change of their named flow segment.
2258+
change of their named flow segment. Note how the event is asynchronous.
22452259

22462260
<table border=0 cellpadding=2 cellspacing=0 class=event-desc
22472261
summary="This table contains information about the semantics of the given event type">
@@ -2255,8 +2269,8 @@ <h3 id=region-flow-layout-events><span class=secno>7.3. </span>Region flow
22552269
<th>Interface
22562270

22572271
<td><code><a
2258-
href="http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-UIEvent">UIEvent</a></code>(see
2259-
<a href="#DOM-LEVEL-3-EVENTS"
2272+
href="http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-UIEvent">UIEvent</a></code>
2273+
(see <a href="#DOM-LEVEL-3-EVENTS"
22602274
rel=biblioentry>[DOM-LEVEL-3-EVENTS]<!--{{!DOM-LEVEL-3-EVENTS}}--></a>)
22612275

22622276
<tr class="assert must">
@@ -2272,7 +2286,7 @@ <h3 id=region-flow-layout-events><span class=secno>7.3. </span>Region flow
22722286
<tr class="assert must">
22732287
<th>Target
22742288

2275-
<td><code>Element</code>
2289+
<td><a href="#dom-namedflow"><code class=idl>NamedFlow</code></a>
22762290

22772291
<tr class="assert must">
22782292
<th>Cancelable
@@ -2289,7 +2303,8 @@ <h3 id=region-flow-layout-events><span class=secno>7.3. </span>Region flow
22892303

22902304
<td>
22912305
<ul>
2292-
<li><code class=attribute-name>Event.target</code>: region whose
2306+
<li><code class=attribute-name>Event.target</code>: <a
2307+
href="#dom-namedflow"><code class=idl>NamedFlow</code></a> whose
22932308
layout may have changed
22942309
</ul>
22952310
</table>
@@ -2439,6 +2454,13 @@ <h3 id="changes_from_June_09_2011"><span class=secno>11.1. </span>Changes
24392454
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16286">Issue
24402455
16286</a>)
24412456
</ul>
2457+
2458+
<li>Modified region layout event to be dispatched on <a
2459+
href="#dom-namedflow"><code>NamedFlow</code></a> instead of region as
2460+
before. Was requested by <a
2461+
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15938">Issue
2462+
15938</a> and required in the general effort to have the DOM APIs work
2463+
with non-element regions.
24422464
</ul>
24432465

24442466
<h3 id="changes_from_June_09_2011"><span class=secno>11.2. </span>Changes
@@ -2936,6 +2958,9 @@ <h2 class=no-num id=index>Index</h2>
29362958
<li>current-region, <a href="#current-region"
29372959
title=current-region><strong>2.3.</strong></a>
29382960

2961+
<li>emptyRegionsIndex, <a href="#dom-namedflow-unusedregionindex"
2962+
title=emptyRegionsIndex><strong>7.1.</strong></a>
2963+
29392964
<li>flowFrom, <a href="#dom-region-flowfrom"
29402965
title=flowFrom><strong>7.2.</strong></a>
29412966

css3-regions/Overview.src.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,10 +1798,11 @@ <h3 id="the-namedflow-interface">The NamedFlow interface</h3>
17981798
</div>
17991799

18001800
<pre class="idl">
1801-
interface <a href="#dom-namedflow">NamedFlow</a> {
1801+
interface <a href="#dom-namedflow">NamedFlow</a> implements <a href="http://www.w3.org/TR/dom/#interface-eventtarget">EventTarget</a> {
18021802
readonly attribute DOMString name;
18031803
readonly attribute boolean <a href="#dom-namedflow-overset">overset</a>;
18041804
sequence&lt;<a href="#region-interface">Region</a>&gt; getRegions();
1805+
readonly attribute integer emptyRegionsIndex;
18051806
<a href="http://www.w3.org/TR/dom/#interface-nodelist">NodeList</a> getContent();
18061807
sequence&lt;<a href="#region-interface">Region</a>&gt; getRegionsByContent(<a href="http://www.w3.org/TR/dom/#interface-node">Node</a> node);
18071808
};</pre>
@@ -1817,6 +1818,12 @@ <h3 id="the-namedflow-interface">The NamedFlow interface</h3>
18171818
method returns the sequence of regions in the <span>region chain</span> associated
18181819
with the <span>named flow</span>. Note that the returned values is a static sequence.</p>
18191820

1821+
<p>The <dfn id="dom-namedflow-unusedregionindex">emptyRegionsIndex</dfn> is the index
1822+
of the first region in the region sequence with the <code>regionOverset</code> attribute
1823+
set to <code>empty</code>. If all regions have the <code>regionOverset</code> attribute
1824+
set to <code>fit</code> or <code>overset</code>, the value for
1825+
<code>emptyRegionsIndex</code> is <code>-1</code>.</p>
1826+
18201827
<p>The <dfn id="dom-namedflow-getcontent">getContent()</dfn> methods returns
18211828
an ordered collection of nodes that constitute the named flow. The returned list
18221829
is a static snapshot of the named flow content at the time the method is invoked.
@@ -1935,22 +1942,24 @@ <h3 id="region-flow-layout-events">Region flow layout events</h3>
19351942
</div>
19361943
</div>
19371944

1938-
<p>Region <a href="">Event Targets</a>
1939-
dispatch <code class="idl">regionLayoutUpdate</code> events when there is a possible layout change of their named flow segment.</p>
1945+
<p><a href="#dom-namedflow"><code class="idl">NamedFlow</code></a> objects are
1946+
<a href="">Event Targets</a> which
1947+
dispatch <code class="idl">regionLayoutUpdate</code> events when there is a possible layout change of their named flow segment. Note how the event is asynchronous.</p>
19401948

19411949
<table class="event-desc" border="0" summary="This table contains information about the semantics of the given event type" cellpadding="2" cellspacing="0">
19421950
<tbody><tr class="assert must"><th>Type</th>
19431951
<td class="eventname"><strong><code>regionLayoutUpdate</code></strong></td></tr>
1944-
<tr class="assert must"><th>Interface</th> <td><code><a href="http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-UIEvent">UIEvent</a></code>(see [[!DOM-LEVEL-3-EVENTS]])</td></tr>
1952+
<tr class="assert must"><th>Interface</th> <td><code><a href="http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-UIEvent">UIEvent</a></code> (see [[!DOM-LEVEL-3-EVENTS]])</td></tr>
19451953
<tr class="assert must"><th>Sync / Async</th> <td>Async</td></tr>
19461954
<tr class="assert must"><th>Bubbles</th> <td>Yes</td></tr>
1947-
<tr class="assert must"><th>Target</th> <td><code>Element</code></td></tr>
1955+
<tr class="assert must"><th>Target</th> <td><a href="#dom-namedflow"><code class="idl">NamedFlow</code></a></td></tr>
19481956
<tr class="assert must"><th>Cancelable</th> <td>Yes</td></tr>
19491957
<tr class="assert must"><th>Default action</th> <td>none</td></tr>
19501958
<tr class="assert must"><th>Context info</th>
19511959
<td>
19521960
<ul>
1953-
<li><code class="attribute-name">Event.target</code>: region whose layout may have changed</li>
1961+
<li><code class="attribute-name">Event.target</code>:
1962+
<a href="#dom-namedflow"><code class="idl">NamedFlow</code></a> whose layout may have changed</li>
19541963
</ul>
19551964
</td>
19561965
</tr>
@@ -2033,6 +2042,9 @@ <h3 id="changes_from_June_09_2011">Changes from <a href="http://www.w3.org/TR/20
20332042

20342043
</ul>
20352044
</li>
2045+
<li>Modified region layout event to be dispatched on <code>NamedFlow</code> instead of region
2046+
as before. Was requested by <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15938">Issue 15938</a>
2047+
and required in the general effort to have the DOM APIs work with non-element regions.</li>
20362048
</ul>
20372049

20382050

0 commit comments

Comments
 (0)