<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16391</bug_id>
          
          <creation_ts>2012-03-15 20:43:22 +0000</creation_ts>
          <short_desc>regionLayoutUpdate needs to be async</short_desc>
          <delta_ts>2012-10-18 21:45:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>Regions</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>cssom</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Alan Stearns">stearns</assigned_to>
          <cc>adamk</cc>
    
    <cc>bugs</cc>
    
    <cc>eoconnor</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mihnea</cc>
    
    <cc>mjs</cc>
    
    <cc>ojan</cc>
    
    <cc>rafaelw</cc>
    
    <cc>stearns</cc>
    
    <cc>vhardy</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65625</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-03-15 20:43:22 +0000</bug_when>
    <thetext>http://dev.w3.org/csswg/css3-regions/#region-flow-layout-events
&quot;Region Event Targets dispatch regionLayoutUpdate events when there is a possible layout change of their named flow segment.&quot;

The spec needs to explicitly state the timing at which this event needs to be fired. Given that most implementations can&apos;t fire synchronous events during or immediately after the layout (since layout itself happens lazily when needed rather than when the value is changed), I suspect we need to use end-of-task or end-of-micro-task as the specific timing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65627</commentid>
    <comment_count>1</comment_count>
    <who name="Alan Stearns">stearns</who>
    <bug_when>2012-03-15 21:02:38 +0000</bug_when>
    <thetext>Ryosuke also suggested to make the document the target for this event, with the named flow as an event property. This would remove any issues with deferring events that are meant to bubble up the DOM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65628</commentid>
    <comment_count>2</comment_count>
    <who name="Vincent Hardy">vhardy</who>
    <bug_when>2012-03-15 21:11:45 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; http://dev.w3.org/csswg/css3-regions/#region-flow-layout-events
&gt; &quot;Region Event Targets dispatch regionLayoutUpdate events when there is a
&gt; possible layout change of their named flow segment.&quot;
&gt; 
&gt; The spec needs to explicitly state the timing at which this event needs to be
&gt; fired. Given that most implementations can&apos;t fire synchronous events during or
&gt; immediately after the layout (since layout itself happens lazily when needed
&gt; rather than when the value is changed), I suspect we need to use end-of-task or
&gt; end-of-micro-task as the specific timing.

I have a question:

The event description already says it is an Async. event. What other type of statement would you like to see in the specification prose?

Thanks,
-v</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66724</commentid>
    <comment_count>3</comment_count>
    <who name="Alan Stearns">stearns</who>
    <bug_when>2012-04-14 21:27:37 +0000</bug_when>
    <thetext>We say that it&apos;s an async event, but we haven&apos;t specified when to fire it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68904</commentid>
    <comment_count>4</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2012-06-11 04:23:31 +0000</bug_when>
    <thetext>Rafael or Adam can probably expand on the advantages/disadvantages of firing this at end of microtask versus end of task. I think in many cases end of microtask might avoid flicker you would get with end of task, but I&apos;m not sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71952</commentid>
    <comment_count>5</comment_count>
    <who name="Alan Stearns">stearns</who>
    <bug_when>2012-08-08 23:50:30 +0000</bug_when>
    <thetext>Another detail is whether to restrict the event trigger to more coarse layout changes. At the moment the spec says that the event triggers when there is a &quot;possible layout change.&quot; Alex has expressed an interpretation of this as &quot;something has changed either in parameters of regions or in content that made layout do non-zero work.&quot;

A more restrictive trigger could be something like &quot;the regionOverset property has changed somewhere in the region chain.&quot; This would result in fewer events fired, but could miss some subtle changes that a script might want to respond to.

A use case for the less restrictive trigger is updating dictionary-style headers or footers that list the first and last word displayed on a page. There could be a layout change that affects this presentational data that does not meet the more restrictive trigger.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75328</commentid>
    <comment_count>6</comment_count>
    <who name="Alan Stearns">stearns</who>
    <bug_when>2012-10-04 23:25:05 +0000</bug_when>
    <thetext>I defined the timing as &quot;when MutationObservers are invoked&quot;

https://dvcs.w3.org/hg/csswg/rev/d5407e5d40c8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76615</commentid>
    <comment_count>7</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-10-18 21:24:14 +0000</bug_when>
    <thetext>I don&apos;t understand why microtasks are used for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76622</commentid>
    <comment_count>8</comment_count>
    <who name="Alan Stearns">stearns</who>
    <bug_when>2012-10-18 21:45:55 +0000</bug_when>
    <thetext>Rafael started a webapps thread on the subject:

http://lists.w3.org/Archives/Public/public-webapps/2012OctDec/0227.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>