[webkit-dev] paged media update?

David Hyatt hyatt at apple.com
Wed May 16 12:25:20 PDT 2012


The difficulty with implementing paged media right now is that I'm beginning work on re-architecting pagination to unify columns, pages and regions. You can see the beginnings of this with the new multi-column classes that have been added to the tree.

The basic idea is that multi-column layout is being separated from RenderBlock and moved to a subclass, RenderMultiColumnBlock. Similar to how regions work, the content is represented by a flow thread and by regions that the flow thread is placed into. In order to avoid creating thousands of regions for columns, I've introduced the concept of a "region set", i.e., RenderMultiColumnSet.

Pages ultimately need to be rebuilt to work the same way, i.e., to have a RenderPageFlowThread and a RenderPageSet. Once we have actual renderers that represent these objects, it will be a lot easier to make real boxes for things like margins, headers, footers, etc. The idea is that a set represents a contiguous run of objects that can all be rendered identically. If you're forced to have a different kind of object, e.g., a page with a different width/height or different style, then you break up the RenderPageSet and have multiple sets for each (this is similar to how regions work by default, although I hope to apply the same optimization to regions eventually as well if runs of same width/height regions are detected that are also siblings in the render tree).

dave



More information about the webkit-dev mailing list