[Webkit-unassigned] [Bug 38044] QWebFrame::render() clips content right of 640 pixels wide when rendering to a QImage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 13 13:52:47 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38044


Robert Hogan <robert at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kenneth at webkit.org,
                   |                            |robert at webkit.org




--- Comment #5 from Robert Hogan <robert at webkit.org>  2010-07-13 13:52:47 PST ---
(In reply to comment #4)
> Seems like a bad bug for use cases where Webkit is embedded.

QWebFrame::render() clips to the frameRect() of the frame. In the absence of content to update the size of the rect you will need to update it first with the expected size of the image. So in your example you need to do:

  webView.page()->setViewportSize(QSize(maxWidth, 480));

QWebFrame::render() could remove the need for this step and check the viewport() of the painter and adjust the frame->view() as follows:

        WebCore::FrameView* view = frame->view();
        view->setFrameRect(QRect(QPoint(0, 0), painter.viewport()));
        view->adjustViewSize();

Simon/Kenneth, what do you think?

-- 
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