summaryrefslogtreecommitdiffstats
path: root/WebKit/qt/WebCoreSupport
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/qt/WebCoreSupport')
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp6
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp25
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.cpp19
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.h5
4 files changed, 29 insertions, 26 deletions
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 1c475b3..bcb07ee 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -571,8 +571,12 @@ bool ChromeClientQt::allowsAcceleratedCompositing() const
#if ENABLE(TILED_BACKING_STORE)
IntRect ChromeClientQt::visibleRectForTiledBackingStore() const
{
- if (!platformPageClient())
+ if (!platformPageClient() || !m_webPage)
return IntRect();
+
+ if (!platformPageClient()->viewResizesToContentsEnabled())
+ return QRect(m_webPage->mainFrame()->scrollPosition(), m_webPage->mainFrame()->geometry().size());
+
return enclosingIntRect(FloatRect(platformPageClient()->graphicsItemVisibleRect()));
}
#endif
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 6e59a20..9d335b8 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -604,27 +604,6 @@ void QWEBKIT_EXPORT qt_dump_resource_load_callbacks(bool b)
DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(b);
}
-void QWEBKIT_EXPORT qt_dump_resource_load_callbacks_path(const QString& path)
-{
- DumpRenderTreeSupportQt::dumpResourceLoadCallbacksPath(path);
-}
-
-void QWEBKIT_EXPORT qt_set_will_send_request_returns_null_on_redirect(bool b)
-{
- DumpRenderTreeSupportQt::setWillSendRequestReturnsNullOnRedirect(b);
-
-}
-
-void QWEBKIT_EXPORT qt_set_will_send_request_returns_null(bool b)
-{
- DumpRenderTreeSupportQt::setWillSendRequestReturnsNull(b);
-}
-
-void QWEBKIT_EXPORT qt_set_will_send_request_clear_headers(const QStringList& headers)
-{
- DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(headers);
-}
-
void QWEBKIT_EXPORT qt_dump_editing_callbacks(bool b)
{
DumpRenderTreeSupportQt::dumpEditingCallbacks(b);
@@ -635,7 +614,3 @@ void QWEBKIT_EXPORT qt_dump_set_accepts_editing(bool b)
DumpRenderTreeSupportQt::dumpSetAcceptsEditing(b);
}
-void QWEBKIT_EXPORT qt_dump_notification(bool b)
-{
- DumpRenderTreeSupportQt::dumpNotification(b);
-}
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
index e19f44f..4ccf34a 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
@@ -132,6 +132,8 @@ void PageClientQGraphicsWidget::update(const QRect& dirtyRect)
overlay->update(QRectF(dirtyRect));
#if USE(ACCELERATED_COMPOSITING)
syncLayers();
+ // This might be a slow-scroll. We ensure that the compositing layers are in the right position.
+ updateCompositingScrollPosition();
#endif
}
@@ -288,6 +290,23 @@ QRect PageClientQGraphicsWidget::geometryRelativeToOwnerWidget() const
return graphicsView->mapFromScene(view->boundingRect()).boundingRect();
}
+#if ENABLE(TILED_BACKING_STORE)
+QRectF PageClientQGraphicsWidget::graphicsItemVisibleRect() const
+{
+ if (!view->scene())
+ return QRectF();
+
+ QList<QGraphicsView*> views = view->scene()->views();
+ if (views.isEmpty())
+ return QRectF();
+
+ QGraphicsView* graphicsView = views.at(0);
+ int xOffset = graphicsView->horizontalScrollBar()->value();
+ int yOffset = graphicsView->verticalScrollBar()->value();
+ return view->mapRectFromScene(QRectF(QPointF(xOffset, yOffset), graphicsView->viewport()->size()));
+}
+#endif
+
QObject* PageClientQGraphicsWidget::pluginParent() const
{
return view;
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.h b/WebKit/qt/WebCoreSupport/PageClientQt.h
index 9341b19..6dab4e1 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.h
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.h
@@ -76,6 +76,8 @@ public:
virtual QObject* pluginParent() const;
virtual QStyle* style() const;
+
+ virtual bool viewResizesToContentsEnabled() const { return false; }
QWidget* view;
};
@@ -161,10 +163,13 @@ public:
virtual QStyle* style() const;
+ virtual bool viewResizesToContentsEnabled() const { return viewResizesToContents; }
+
void createOrDeleteOverlay();
#if ENABLE(TILED_BACKING_STORE)
void updateTiledBackingStoreScale();
+ virtual QRectF graphicsItemVisibleRect() const;
#endif
#if USE(ACCELERATED_COMPOSITING)