[Qt][WK2] Merge setVisibleContentsRect with setFixedVisibleContentRect
authoryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2012 14:42:47 +0000 (14:42 +0000)
committeryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2012 14:42:47 +0000 (14:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82289

Reviewed by Kenneth Rohde Christiansen.

As we scroll, we constantly send 2 messages. Those 2 messages can be merged into one.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
* UIProcess/WebPageProxy.cpp:
(WebKit):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setVisibleContentsRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112265 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp

index 8080bd6..670307d 100644 (file)
@@ -1,3 +1,22 @@
+2012-03-27  Yael Aharon  <yael.aharon@nokia.com>
+
+        [Qt][WK2] Merge setVisibleContentsRect with setFixedVisibleContentRect
+        https://bugs.webkit.org/show_bug.cgi?id=82289
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        As we scroll, we constantly send 2 messages. Those 2 messages can be merged into one.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit):
+        * UIProcess/WebPageProxy.h:
+        (WebPageProxy):
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
+        (WebKit::LayerTreeHostQt::setVisibleContentsRect):
+
 2012-03-27  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [SOUP] Implement missing methods in CookieJarSoup
index 486578d..7d5bd57 100644 (file)
@@ -642,7 +642,6 @@ void QQuickWebViewFlickablePrivate::_q_contentViewportChanged(const QPointF& tra
     float scale = pageView->contentsScale();
 
     drawingArea->setVisibleContentsRect(visibleRect, scale, trajectoryVector);
-    webPageProxy->setFixedVisibleContentRect(visibleRect);
 }
 
 void QQuickWebViewFlickablePrivate::_q_suspend()
index 2966a78..f30eeab 100644 (file)
@@ -844,14 +844,6 @@ void WebPageProxy::executeEditCommand(const String& commandName)
 }
     
 #if USE(TILED_BACKING_STORE)
-void WebPageProxy::setFixedVisibleContentRect(const IntRect& rect)
-{
-    if (!isValid())
-        return;
-
-    process()->send(Messages::WebPage::SetFixedVisibleContentRect(rect), m_pageID);
-}
-
 void WebPageProxy::setViewportSize(const IntSize& size)
 {
     if (!isValid())
index 0cae2f7..b409f04 100644 (file)
@@ -378,7 +378,6 @@ public:
     PlatformWidget viewWidget();
 #endif
 #if USE(TILED_BACKING_STORE)
-    void setFixedVisibleContentRect(const WebCore::IntRect&);
     void setViewportSize(const WebCore::IntSize&);
 #endif
 
index 84a1e05..1935fe3 100644 (file)
@@ -105,7 +105,6 @@ messages -> WebPage {
     ResumeActiveDOMObjectsAndAnimations()
 
 #if USE(TILED_BACKING_STORE)
-    SetFixedVisibleContentRect(WebCore::IntRect rect)
     SetViewportSize(WebCore::IntSize size)
 #endif
 
index c096c88..ca74f11 100644 (file)
@@ -443,6 +443,8 @@ void LayerTreeHostQt::setVisibleContentsRect(const IntRect& rect, float scale, c
     }
 
     scheduleLayerFlush();
+    if (m_webPage->useFixedLayout())
+        m_webPage->setFixedVisibleContentRect(rect);
 }
 
 void LayerTreeHostQt::renderNextFrame()