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

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

From: Dimitri Glazkov <dglazkov@google.com>
Date: Wed, 15 Feb 2012 13:24:04 -0800
Message-ID: <CADh5Ky2u6379tP9XjHG7XXUA3dU-PD-0Xu57Tz6-tNZWy9UBWQ@mail.gmail.com>
To: David Hyatt <hyatt@apple.com>
Cc: Sylvain Galineau <sylvaing@microsoft.com>, "www-style@w3.org Style" <www-style@w3.org>
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.

Gotcha. I understand the motivation.

FWIW, I am very interested in exploring a format for describing box
tree-only (anonymous boxes) structures and a method for adorning a DOM
element with them. At the same time, I worried about the intersection
of this thing and the web components -- primarily, making sure that
the two jive.

:DG<
>
> dave
> (hyatt@apple.com)
>
>
Received on Wednesday, 15 February 2012 21:24:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT