The WebKit Open Source Project

Printing

Overview

Welcome to the printing project page. Printing in WebKit is closely tied to the layout and rendering code. When you print in WebKit, the existing render tree is converted into a new render tree with print styles applied. That new render tree then gets a layout. The big flaw in WebKit's printing architecture right now is that page breaks are determined at a simulated "paint" time rather than during layout itself. This means that at best all you can hope to do is try to find an optimal position for a break without altering the layout of the Web document at all.

Get Involved

Rework Printing
Printing needs to be reworked so that render objects know how to split themselves across breaks. This allows two separate formatting contexts (like two adjacent table cells) to still have their contents both break cleanly across a page. This work is also important for future technology like CSS3 multi-column support. The code that splits render objects across pages could obviously be leveraged to also split render objects across column breaks as well.