W3C home > Mailing lists > Public > www-style@w3.org > December 2012

Re: [css3-regions] different events, speed boost when using many regions

From: Alan Stearns <stearns@adobe.com>
Date: Tue, 18 Dec 2012 10:30:27 -0800
To: "www-style@w3.org" <www-style@w3.org>
CC: Johannes Wilm <johannes.wilm@sourcefabric.org>
Message-ID: <CCF5EF21.1B209%stearns@adobe.com>
On 12/18/12 8:45 AM, "Johannes Wilm" <johannes.wilm@sourcefabric.org>
wrote:

>
>
>
>Hey,
>I am currently working on http://BookJS.net where we use CSS Regions to
>make book layout. I've been working on this since July, and it relied on
>the Webkit implementation of CSS Regions to make everything work.
>
>
>You can find a current demo of a very simple editor which reflows text
>and footnotes here: http://sourcefabric.github.com/BookJS/test.html
>
>
>Now when documents get longer, things slow down considerably. An
>important reason for that is that I have to listen to the
>regionlayoutupdate event and then check for everything else manually --
>have footnoted moved to another page, do new pages need to
> be added (or removed), etc. .
>
>
>It would therefore be nice to instead have several different events:
>
>
>-- One event for when a certain node moved from one region to another.

My team has discussed splitting the event into two different events,
basically into the two you describe below. I'm interested in getting a
better idea of what you mean by the event above.

For your footnote example, you would be adding an event listener to the
footnote markers and firing the event when the footnote marker changed
regions? If that's what you're getting at, it might be good to generalize
the idea to a change in fragmentation, or even a change to the box tree.

If we only had the two events below, then your footnote management would
still need to use the second event and check all of the footnote markers
for a change in their containing regions.

>-- One event for when new regions are needed or two many (change on
>firstEmptyRegionIndex and/or overset)
>-- One event if there is any change to the contents of a given flow, the
>way the current regionlayoutupdate event works.
>
>
>-- 
>Johannes Wilm
>Booktype Developer
>+1 520 399 8880
>
>
Received on Tuesday, 18 December 2012 18:31:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT