Bug 32933
Summary: | WebKit hang while snapshoting this page | ||
---|---|---|---|
Product: | WebKit | Reporter: | String <tiansjun> |
Component: | Printing | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows Vista | ||
URL: | http://blog.oup.com/2009/11/unfriend/ |
String
URL: http://blog.oup.com/2009/11/unfriend/
I try to capture the webpage after loading but it hangs and CPU runs to 100%. It works well for most other pages.
This is my codes in QtWebKit(r50477 + Qt4.6.0 + GCC4.4.0).
// set the viewport size to the whole webpage size
m_webview->page()->setViewportSize ( tmpSize );
//disable scrollbar
m_webview->page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal,Qt::ScrollBarAlwaysOff);
m_webview->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwaysOff);
//paint webpage into image
QImage im ( tmpSize , QImage::Format_RGB888); //QImage::Format_RGB32
QPainter painter ( & im );
m_webview->page()->mainFrame()->render ( & painter );
The tree i have tracked:
.....QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer layer, const QRegion &clip)
...........WebCore::FrameView::paintContents(GraphicsContext* p, const IntRect& rect)
................contentRenderer->layer()->paint(p, rect, m_paintRestriction, eltRenderer); //void RenderLayer::paint
......................void RenderLayer::paintLayer(....)
...........................void RenderBlock::paint(PaintInfo& paintInfo, int tx, int ty)
...............................void RenderBlock::paintObject(PaintInfo& paintInfo, int tx, int ty)
....................................paintBoxDecorations(paintInfo, tx, ty); //hang here now....
I am not familiar with the WebKit rendering codes. It is too hard for me now. Please help to fix this bug. Thanks.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
String
Safari 4.0.4 for Win hangs(or load OK but hangs while refreshing) while loading this page. Arora 0.10.0 and Chrome 4.0.0249.30 finish loading soon.
String
Sorry, it seems a bug of Qt 4.6. Program hangs on QPainter::fillRect while invoking GraphicsContext::fillRect(FloatRect(0, 0, 1019, 44364), Color(-1)));
Any one can help to report this bug to Qt community? Thanks.