[Webkit-unassigned] [Bug 28045] New: Unable to correctly paint the page if widget is not displayed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 6 05:26:32 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28045
Summary: Unable to correctly paint the page if widget is not
displayed
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: WebKit Gtk
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: luka.napotnik at gmail.com
Hello.
I have two WebKit sourcetrees. One that shows a simple Gtk+ window and
displays the page. Besides that the page gets painted onto a cairo
source which I save to a PNG image. The image correctly shows the
page.
The other source tree is the same as the first but now I don't show
the Gtk+ window. Again I paint the page to a cairo surface and save it
to a PNG image. But the problem is that the page now doesn't have
layout nor any styles even when I called layoutIfNeeded() just before
paint(). I paint the page using:
------------------------------------------------
if (m_frame->contentRenderer()) {
m_frame->view()->layoutIfNeededRecursive();
m_frame->view()->paint(&ctx, pageRect);
}
------------------------------------------------
The output only shows unstyled text and even javascript sources. I
think there' s some condition that if the view is not visible then
some methods are not called. I browsed the loader/ sources a bit but
don't have a clue what could it be. Any ideas?
Here's a detailed description of my work:
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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list