[webkit-dev] Duplicate page: Implementing Print Preview

Sverrir Á. Berg sverrir at chromium.org
Wed May 27 09:53:21 PDT 2009

Hi all,
I'm working on Google Chrome and trying to come up with a way to implement
print preview.  To be able to display it in a separate tab we need to be
able to duplicate the current page in memory so the user can continue to
interact with the original page.  Javacript, animations etc should continue
on the original page but be frozen in the print preview version.
What I've tried so far is to select everything on the page
(Frame::selection()->SelectAll()) and Frame::GetSelection(true) but the HTML
does not fully describe the page and this has the downside of modifying the
users selection on the page.
I've poked around in WebKit a bit and as far as I can tell the document,
rendertree and the views are fairly integrated and not easy to take a
snapshot of the full state of the document.  I would appreciate any insights
on this though since I might have missed something obvious.

If nothing existing can be reused then adding this functionality should
benefit all ports.  But again I need your insights on how this can be done
(if at all).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090527/a3043ed3/attachment.html>

More information about the webkit-dev mailing list