[webkit-help] Offscreen rendering using webkit gtk+ port

Luka Napotnik luka.napotnik at gmail.com
Thu Jul 30 10:51:02 PDT 2009


I've been working on an offscreen hack for webkit for a while now. While
I managed to paint the pages on a cairo surface using the clutter
offscreen functions in WebKit rev. 38000, the code is now old and I
would like to migrate to the latest revisions.

The problem is that my patches don't work anymore.

My current patch works like this: the WebCore functions
RenderView::layout() and FrameView::layoutTimerFired() emit an
"update-request" event to the Gtk+ WebKitWebView widget which I added
and then forces the whole render tree to layout and calls
paintContents() to get the page on the cairo surface. This worked well
but still got some unnecessary "update-request" calls.

But with the latest code I suspect some methods are not called and I get
an unformatted (no style, no layout) image on the cairo surface. And
this is useless because the pages aren't rendered correctly.

I've browsed the source and tried to backtrace the original method call
that triggers whenever the page needs a repaint (modifications to the
DOM tree, javascript events) but failed. The problem is more complex
because there's no widget on the screen so I can't use some obvious
methods or the "expose-event" of the Gtk+ port.

Any help would be appreciated.


More information about the webkit-help mailing list