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

RE: [css3-regions][css3-gcpm] Thoughts on Plan A and Plan B

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Sat, 18 Feb 2012 00:14:14 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, David Hyatt <hyatt@apple.com>
CC: Dimitri Glazkov <dglazkov@google.com>, "www-style@w3.org Style" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F0178290342A785@TK5EX14MBXC295.redmond.corp.microsoft.com>

[Tab Atkins Jr.:]
> On Wed, Feb 15, 2012 at 12:12 PM, David Hyatt <hyatt@apple.com> wrote:
> > On Feb 15, 2012, at 1:59 PM, David Hyatt wrote:
> >> I think using explicit elements or shadow elements is the worst of the
> solutions I listed. While I put it on the list for completeness, it's not
> my preferred choice. I'd be careful about pushing a shadow DOM agenda with
> this feature, as I don't think it's a particularly good fit. There is
> value to being able to create anonymous boxes in CSS without backing them
> with DOM elements.
> >
> > Just to expand on this point, in WebKit, a column in CSS multi-column
> > is super lightweight. It has no unique renderer. It has no DOM
> > element. It doesn't take up any memory at all. When columns have
> > uniform widths and heights, you can do crazy fast hit testing,
> > selection, painting, etc., because knowing what column you're in is
> > just math. Typically you don't even need to store individual column
> > rects
> >
> > CSS Regions are full of similar potential optimizations. They can have
> uniform widths, uniform heights, not use any unique styling, etc.
> >
> > If you look at an 800 page textbook that has on average 3-4 regions per
> page, making shadow DOM elements for all those regions from a performance
> perspective starts looking pretty stupid. Do you really want 2400 extra
> DOM nodes in your document, shadow or otherwise, just to handle a textbook
> that uses no more than 10 different types of pages that each have simple
> 2-3 column layouts with a figure or two? No way.
> >
> > We need to avoid falling into the more heavyweight DOM if at all
> possible. Anonymous boxes can be optimized away, handled however we want,
> etc. DOM elements can't. They bring along too  much baggage. Let's keep
> performance and memory use in mind here and not make the mistake of
> requiring the DOM for simple page templates.
> I agree.
> I think there's interesting ground to cover in making CSS-created boxes
> respond to DOM events, but it's a broader topic than Regions.
> I've had times where I've wanted this for ::before, for example.  As you
> say, this isn't something you want for *every* such box, but if you could
> explicitly inform the OM that you want to listen to events from a
> particular box, that should be doable.
> We should find some editors to work on this, if it's interesting.
> Sylvain?
Once I've put a real dent in the things I'm supposed to be editing now, 
then maybe :)

Received on Saturday, 18 February 2012 00:15:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:56 UTC