diff options
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 75a23d9..7a25646 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -127,7 +127,7 @@ public: #endif void updateResizesToContentsForPage(); - QRectF graphicsItemVisibleRect() const; + virtual QRectF graphicsItemVisibleRect() const; #if ENABLE(TILED_BACKING_STORE) void updateTiledBackingStoreScale(); #endif @@ -597,12 +597,7 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* #if ENABLE(TILED_BACKING_STORE) if (WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore()) { // FIXME: We should set the backing store viewport earlier than in paint - if (d->resizesToContents) - backingStore->viewportChanged(WebCore::IntRect(d->graphicsItemVisibleRect())); - else { - QRectF visibleRect(d->page->mainFrame()->scrollPosition(), d->page->mainFrame()->geometry().size()); - backingStore->viewportChanged(WebCore::IntRect(visibleRect)); - } + backingStore->adjustVisibleRect(); // QWebFrame::render is a public API, bypass it for tiled rendering so behavior does not need to change. WebCore::GraphicsContext context(painter); page()->mainFrame()->d->renderFromTiledBackingStore(&context, option->exposedRect.toAlignedRect()); |