[Webkit-unassigned] [Bug 28781] Add QWebFrame::renderElement to API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Oct 10 06:27:56 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28781
--- Comment #22 from Holger Freyther <zecke at selfish.org> 2009-10-10 06:27:56 PDT ---
(From update of attachment 40970)
> +void QWebElement::render(QPainter *painter)
coding style violation.
> + Frame* frame = doc->frame();
> + if ( !frame || !frame->view() || !frame->contentRenderer())
coding style violation.
> + FrameView* view = frame->view();
you need a null check here.
> + view->setNodeToDraw(NULL);
do not use NULL in C++ code.
> + QWebPage page;
> + QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
> + page.mainFrame()->setHtml(html);
> +
> + QTest::qWait(200);
> + QCOMPARE(loadSpy.count(), 1);
Please use the waitForSignal to make this test more robust.
> +
> + QList<QWebElement> imgs = page.mainFrame()->findAllElements("img");
> + QCOMPARE(imgs.count(), 1);
> +
> + QImage resource(":/image.png");
> + QRect imageRect(0, 0, resource.width(), resource.height());
do you load resource only for width/height?
--
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