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

Tue, 27 Mar 2012 13:46:26 -0700

author
Vincent Hardy <vhardy@adobe.com>
date
Tue, 27 Mar 2012 13:46:26 -0700
changeset 5264
614c5fe1f9ad
parent 5263
94339d989399
child 5265
327214c30980

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

css3-regions/Overview.html file | annotate | diff | comparison | revisions
css3-regions/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/css3-regions/Overview.html	Tue Mar 27 13:48:11 2012 -0700
     1.2 +++ b/css3-regions/Overview.html	Tue Mar 27 13:46:26 2012 -0700
     1.3 @@ -2073,12 +2073,15 @@
     1.4    </div>
     1.5  
     1.6    <pre class=idl>
     1.7 -interface <a href="#dom-namedflow">NamedFlow</a> {
     1.8 +interface <a
     1.9 +   href="#dom-namedflow">NamedFlow</a> implements <a
    1.10 +   href="http://www.w3.org/TR/dom/#interface-eventtarget">EventTarget</a> {
    1.11    readonly attribute DOMString name;
    1.12    readonly attribute boolean <a
    1.13     href="#dom-namedflow-overset">overset</a>;
    1.14    sequence&lt;<a
    1.15     href="#region-interface">Region</a>&gt; getRegions();
    1.16 +  readonly attribute integer emptyRegionsIndex;
    1.17    <a
    1.18     href="http://www.w3.org/TR/dom/#interface-nodelist">NodeList</a> getContent();
    1.19    sequence&lt;<a
    1.20 @@ -2100,6 +2103,16 @@
    1.21     href="#named-flow0">named flow</a>. Note that the returned values is a
    1.22     static sequence.
    1.23  
    1.24 +  <p>The <dfn id=dom-namedflow-unusedregionindex>emptyRegionsIndex</dfn> is
    1.25 +   the index of the first region in the region sequence with the <a
    1.26 +   href="#dom-region-regionoverset"><code>regionOverset</code></a> attribute
    1.27 +   set to <code>empty</code>. If all regions have the <a
    1.28 +   href="#dom-region-regionoverset"><code>regionOverset</code></a> attribute
    1.29 +   set to <code>fit</code> or <a
    1.30 +   href="#dom-namedflow-overset"><code>overset</code></a>, the value for <a
    1.31 +   href="#dom-namedflow-unusedregionindex"><code>emptyRegionsIndex</code></a>
    1.32 +   is <code>-1</code>.
    1.33 +
    1.34    <p>The <dfn id=dom-namedflow-getcontent>getContent()</dfn> methods returns
    1.35     an ordered collection of nodes that constitute the named flow. The
    1.36     returned list is a static snapshot of the named flow content at the time
    1.37 @@ -2239,9 +2252,10 @@
    1.38     </div>
    1.39    </div>
    1.40  
    1.41 -  <p>Region <a href="">Event Targets</a> dispatch <code
    1.42 +  <p><a href="#dom-namedflow"><code class=idl>NamedFlow</code></a> objects
    1.43 +   are <a href="">Event Targets</a> which dispatch <code
    1.44     class=idl>regionLayoutUpdate</code> events when there is a possible layout
    1.45 -   change of their named flow segment.
    1.46 +   change of their named flow segment. Note how the event is asynchronous.
    1.47  
    1.48    <table border=0 cellpadding=2 cellspacing=0 class=event-desc
    1.49     summary="This table contains information about the semantics of the given event type">
    1.50 @@ -2255,8 +2269,8 @@
    1.51       <th>Interface
    1.52  
    1.53       <td><code><a
    1.54 -      href="http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-UIEvent">UIEvent</a></code>(see
    1.55 -      <a href="#DOM-LEVEL-3-EVENTS"
    1.56 +      href="http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-UIEvent">UIEvent</a></code>
    1.57 +      (see <a href="#DOM-LEVEL-3-EVENTS"
    1.58        rel=biblioentry>[DOM-LEVEL-3-EVENTS]<!--{{!DOM-LEVEL-3-EVENTS}}--></a>)
    1.59  
    1.60      <tr class="assert must">
    1.61 @@ -2272,7 +2286,7 @@
    1.62      <tr class="assert must">
    1.63       <th>Target
    1.64  
    1.65 -     <td><code>Element</code>
    1.66 +     <td><a href="#dom-namedflow"><code class=idl>NamedFlow</code></a>
    1.67  
    1.68      <tr class="assert must">
    1.69       <th>Cancelable
    1.70 @@ -2289,7 +2303,8 @@
    1.71  
    1.72       <td>
    1.73        <ul>
    1.74 -       <li><code class=attribute-name>Event.target</code>: region whose
    1.75 +       <li><code class=attribute-name>Event.target</code>: <a
    1.76 +        href="#dom-namedflow"><code class=idl>NamedFlow</code></a> whose
    1.77          layout may have changed
    1.78        </ul>
    1.79    </table>
    1.80 @@ -2439,6 +2454,13 @@
    1.81        href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16286">Issue
    1.82        16286</a>)
    1.83      </ul>
    1.84 +
    1.85 +   <li>Modified region layout event to be dispatched on <a
    1.86 +    href="#dom-namedflow"><code>NamedFlow</code></a> instead of region as
    1.87 +    before. Was requested by <a
    1.88 +    href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15938">Issue
    1.89 +    15938</a> and required in the general effort to have the DOM APIs work
    1.90 +    with non-element regions.
    1.91    </ul>
    1.92  
    1.93    <h3 id="changes_from_June_09_2011"><span class=secno>11.2. </span>Changes
    1.94 @@ -2936,6 +2958,9 @@
    1.95     <li>current-region, <a href="#current-region"
    1.96      title=current-region><strong>2.3.</strong></a>
    1.97  
    1.98 +   <li>emptyRegionsIndex, <a href="#dom-namedflow-unusedregionindex"
    1.99 +    title=emptyRegionsIndex><strong>7.1.</strong></a>
   1.100 +
   1.101     <li>flowFrom, <a href="#dom-region-flowfrom"
   1.102      title=flowFrom><strong>7.2.</strong></a>
   1.103  
     2.1 --- a/css3-regions/Overview.src.html	Tue Mar 27 13:48:11 2012 -0700
     2.2 +++ b/css3-regions/Overview.src.html	Tue Mar 27 13:46:26 2012 -0700
     2.3 @@ -1798,10 +1798,11 @@
     2.4      </div>
     2.5      
     2.6      <pre class="idl">
     2.7 -interface <a href="#dom-namedflow">NamedFlow</a> {
     2.8 +interface <a href="#dom-namedflow">NamedFlow</a> implements <a href="http://www.w3.org/TR/dom/#interface-eventtarget">EventTarget</a> {
     2.9    readonly attribute DOMString name;
    2.10    readonly attribute boolean <a href="#dom-namedflow-overset">overset</a>;
    2.11    sequence&lt;<a href="#region-interface">Region</a>&gt; getRegions();
    2.12 +  readonly attribute integer emptyRegionsIndex;
    2.13    <a href="http://www.w3.org/TR/dom/#interface-nodelist">NodeList</a> getContent();
    2.14    sequence&lt;<a href="#region-interface">Region</a>&gt; getRegionsByContent(<a href="http://www.w3.org/TR/dom/#interface-node">Node</a> node);
    2.15  };</pre>
    2.16 @@ -1817,6 +1818,12 @@
    2.17      method returns the sequence of regions in the <span>region chain</span> associated
    2.18      with the <span>named flow</span>. Note that the returned values is a static sequence.</p>
    2.19      
    2.20 +    <p>The <dfn id="dom-namedflow-unusedregionindex">emptyRegionsIndex</dfn> is the index
    2.21 +        of the first region in the region sequence with the <code>regionOverset</code> attribute
    2.22 +        set to <code>empty</code>. If all regions have the <code>regionOverset</code> attribute
    2.23 +        set to <code>fit</code> or <code>overset</code>, the value for 
    2.24 +        <code>emptyRegionsIndex</code> is <code>-1</code>.</p>
    2.25 +        
    2.26      <p>The <dfn id="dom-namedflow-getcontent">getContent()</dfn> methods returns 
    2.27          an ordered collection of nodes that constitute the named flow. The returned list
    2.28          is a static snapshot of the named flow content at the time the method is invoked.
    2.29 @@ -1935,22 +1942,24 @@
    2.30          </div>
    2.31      </div>
    2.32      
    2.33 -    <p>Region <a href="">Event Targets</a> 
    2.34 -    dispatch <code class="idl">regionLayoutUpdate</code> events when there is a possible layout change of their named flow segment.</p>
    2.35 +    <p><a href="#dom-namedflow"><code class="idl">NamedFlow</code></a> objects are
    2.36 +     <a href="">Event Targets</a> which
    2.37 +    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>
    2.38      
    2.39      <table class="event-desc" border="0" summary="This table contains information about the semantics of the given event type" cellpadding="2" cellspacing="0">
    2.40                  <tbody><tr class="assert must"><th>Type</th>
    2.41                  <td class="eventname"><strong><code>regionLayoutUpdate</code></strong></td></tr>
    2.42 -                <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>
    2.43 +                <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>
    2.44                  <tr class="assert must"><th>Sync / Async</th> <td>Async</td></tr>
    2.45                  <tr class="assert must"><th>Bubbles</th> <td>Yes</td></tr>
    2.46 -                <tr class="assert must"><th>Target</th> <td><code>Element</code></td></tr>
    2.47 +                <tr class="assert must"><th>Target</th> <td><a href="#dom-namedflow"><code class="idl">NamedFlow</code></a></td></tr>
    2.48                  <tr class="assert must"><th>Cancelable</th> <td>Yes</td></tr>
    2.49                  <tr class="assert must"><th>Default action</th> <td>none</td></tr>
    2.50                  <tr class="assert must"><th>Context info</th>
    2.51                    <td>
    2.52                      <ul>
    2.53 -                      <li><code class="attribute-name">Event.target</code>: region whose layout may have changed</li>
    2.54 +                      <li><code class="attribute-name">Event.target</code>: 
    2.55 +                          <a href="#dom-namedflow"><code class="idl">NamedFlow</code></a> whose layout may have changed</li>
    2.56                      </ul>
    2.57                     </td>
    2.58                   </tr>
    2.59 @@ -2033,6 +2042,9 @@
    2.60                  
    2.61              </ul>
    2.62          </li>
    2.63 +        <li>Modified region layout event to be dispatched on <code>NamedFlow</code> instead of region 
    2.64 +            as before. Was requested by <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15938">Issue 15938</a>
    2.65 +            and required in the general effort to have the DOM APIs work with non-element regions.</li>
    2.66      </ul>
    2.67      
    2.68  

mercurial