[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 14:16:21 PDT 2010


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





--- Comment #6 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2010-07-13 14:16:21 PST ---
(In reply to comment #5)
> (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?

you might be getting the QWebElement from an existing view, so in that case you do not want to change the viewport, unless you would somewhat clone the element.

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