diff options
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index 9a63e85..5c65112 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -39,6 +39,7 @@ #include "WindowFeatures.h" #include "DatabaseTracker.h" #include "SecurityOrigin.h" +#include "QWebPageClient.h" #include "qwebpage.h" #include "qwebpage_p.h" @@ -308,12 +309,11 @@ void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, boo { // No double buffer, so only update the QWidget if content changed. if (contentChanged) { - // Only do implicit paints for QWebView's - if (QWebView* view = qobject_cast<QWebView*>(m_webPage->view())) { + if (platformPageClient()) { QRect rect(windowRect); rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize())); if (!rect.isEmpty()) - view->update(rect); + platformPageClient()->update(rect); } emit m_webPage->repaintRequested(windowRect); } @@ -324,9 +324,8 @@ void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, boo void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect&) { - // Only do implicit paints for QWebView's - if (QWebView* view = qobject_cast<QWebView*>(m_webPage->view())) - view->scroll(delta.width(), delta.height(), scrollViewRect); + if (platformPageClient()) + platformPageClient()->scroll(delta.width(), delta.height(), scrollViewRect); emit m_webPage->scrollRequested(delta.width(), delta.height(), scrollViewRect); } @@ -342,9 +341,9 @@ IntPoint ChromeClientQt::screenToWindow(const IntPoint& point) const return point; } -PlatformWidget ChromeClientQt::platformWindow() const +PlatformPageClient ChromeClientQt::platformPageClient() const { - return m_webPage->view(); + return m_webPage->d->client; } void ChromeClientQt::contentsSizeChanged(Frame* frame, const IntSize& size) const |