Coordinated Graphics: Handle scrolling correctly.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 16:33:39 +0000 (16:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2013 16:33:39 +0000 (16:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111406

Patch by Huang Dongsung <luxtella@company100.net> on 2013-03-08
Reviewed by Simon Fraser.

Coordinated Graphics deals with fast scrolling and slow scrolling in the same
routine, so WebChromeClient::invalidateContentsForSlowScroll() should call
DrawingArea:scroll().

When CoordinatedLayerTreeHost::scrollNonCompositedContents() is called, we
should call scheduleLayerFlush() to notify to UI Process. In addition, when we
don't use fixed layout, we should call setNonCompositedContentsNeedDisplay() to
update non composited contents.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::invalidateContentsForSlowScroll):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp

index 389086b..8bca4c0 100644 (file)
@@ -1,3 +1,24 @@
+2013-03-08  Huang Dongsung  <luxtella@company100.net>
+
+        Coordinated Graphics: Handle scrolling correctly.
+        https://bugs.webkit.org/show_bug.cgi?id=111406
+
+        Reviewed by Simon Fraser.
+
+        Coordinated Graphics deals with fast scrolling and slow scrolling in the same
+        routine, so WebChromeClient::invalidateContentsForSlowScroll() should call
+        DrawingArea:scroll().
+
+        When CoordinatedLayerTreeHost::scrollNonCompositedContents() is called, we
+        should call scheduleLayerFlush() to notify to UI Process. In addition, when we
+        don't use fixed layout, we should call setNonCompositedContentsNeedDisplay() to
+        update non composited contents.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+        (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
+
 2013-03-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
 
         [WK2][EFL] Remove EwkView::setImageData()
index 29fcc3f..fb0e7c7 100644 (file)
@@ -415,7 +415,11 @@ void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool)
     }
 
     m_page->pageDidScroll();
+#if USE(COORDINATED_GRAPHICS)
+    m_page->drawingArea()->scroll(rect, IntSize());
+#else
     m_page->drawingArea()->setNeedsDisplayInRect(rect);
+#endif
 }
 
 void WebChromeClient::scroll(const IntSize& scrollDelta, const IntRect& scrollRect, const IntRect& clipRect)
index ccf8ee0..4692cc8 100644 (file)
@@ -200,7 +200,10 @@ void CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect(const W
 
 void CoordinatedLayerTreeHost::scrollNonCompositedContents(const WebCore::IntRect&)
 {
-    // Do nothing because we scroll using TiledBackingStore.
+    if (!m_webPage->useFixedLayout())
+        setNonCompositedContentsNeedDisplay();
+
+    scheduleLayerFlush();
 }
 
 void CoordinatedLayerTreeHost::forceRepaint()