[Webkit-unassigned] [Bug 26352] Remove void QWebFrame::renderContents(...)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 24 07:00:40 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=26352
--- Comment #10 from Adam Treat <treat at kde.org> 2009-07-24 07:00:39 PDT ---
(From update of attachment 33431)
> +void tst_QWebFrame::render()
> +{
> + QString html("<html>" \
> + "<head><style>" \
> + "body, iframe { margin: 0px; border: none; }" \
> + "</style></head>" \
> + "<body><iframe width='100px' height='100px'/></body>" \
> + "</html>");
> +
> + QWebPage page;
> + page.mainFrame()->setHtml(html);
> +
> + QList<QWebFrame*> frames = page.mainFrame()->childFrames();
> + QWebFrame *frame = frames.at(0);
> + QString innerHtml("<body style='margin: 0px;'><img src='qrc:/image.png'/></body>");
> + frame->setHtml(innerHtml);
> +
> + QPicture picture;
> +
> + // render clipping to Viewport
> + frame->setClipRenderToViewport(true);
> + QPainter painter1(&picture);
> + frame->render(&painter1);
> + painter1.end();
> +
> + QSize size = page.mainFrame()->contentsSize();
> + page.setViewportSize(size);
> + QCOMPARE(size.width(), image.boundingRect().width()); // 100px
> + QCOMPARE(size.height(), image.boundingRect().height()); // 100px
Where is this 'image' variable at? Do you mean 'picture' here? Will this fail
to compile?
--
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