W3C home > Mailing lists > Public > www-style@w3.org > October 2010

Re: Positioned Layout proposal

From: Shelby Moore <shelby@coolpage.com>
Date: Wed, 20 Oct 2010 14:33:44 -0400
Message-ID: <7f6e9a20231f4b640fbb156ddaa8b51a.squirrel@sm.webmail.pair.com>
To: "Boris Zbarsky" <bzbarsky@MIT.EDU>
Cc: "www-style list" <www-style@w3.org>
> On 10/20/10 1:38 PM, Shelby Moore wrote:
>> The pagination algorithm tests the containing block for intersection
>> with
>> the page boundary, then it flags the constraint and re-runs the layout
>> (which calls the various constraint algorithms).  This repeats until
>> there
>> are no more intersections.
> Uh... in general, you never got to "no more interesections".  So I'm not
> sure what you're talking about here.

I will uncompact what I meant for the generalized algorithm (this is just
off top of my head, I've never looked at browser layout code).

1) Run layout with the page rectangle as global constraint available to
all methods. The methods make local decisions about their position and
extent, e.g. the inline flow algorithm wraps (depending on wrapping style
etc) to the Min( viewport, container ) where container might be 'auto'.
The local decisions may cause their parents to clip.

2) Enumerate top-down hierarchy (i.e. box model) for paginate each
container box (margins excluded), and flag any parents which need to be

3) If any were flagged, go back to step #1.

In subsequent calls to step #1, the container will not longer be auto, but
rather constrained so that it does not intersect the clip boundary.

I am skipping the complication of prioritizing no clip in the horizontal
direction, and using that constraint to push content to next page for
paged media.

The point being that none of the above depends on how the container boxes
were positioned and sized.

>> You optimize this for incremental updates, by making special case rules
>> about how certain constructs can change layout when changed, e.g.
>> identifying propogation boundaries, but you still need the generalized
>> algorithm above for those cases that your special case optimizer can't
>> handle.
>> Am I far off base?
> Dunno.  The one pagination setup in a browser that I'm very familiar
> with works nothing like this; the second one I've sort of looked at
> doesn't seem to either.

I guess there are many ways to skin a cat.

Sounds like an area I will enjoy experimenting and become more expert in.
Received on Wednesday, 20 October 2010 18:34:11 UTC

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