[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

andersca at apple.com andersca at apple.com
Sun Feb 20 23:13:08 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 7e17fdb5fb157ef27219a59907e05298cdd74ebd
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 19 01:30:56 2011 +0000

    2011-01-18  Anders Carlsson  <andersca at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Make PageClientImpl::scrollView do hardware blitting
            https://bugs.webkit.org/show_bug.cgi?id=52689
    
            * UIProcess/API/mac/PageClientImpl.mm:
            (WebKit::PageClientImpl::scrollView):
            Clip the scroll rect and scroll the view.
    
            * UIProcess/DrawingAreaProxyImpl.cpp:
            (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
            Scroll before painting.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76086 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index fabe766..bce8a6c 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,5 +1,20 @@
 2011-01-18  Anders Carlsson  <andersca at apple.com>
 
+        Reviewed by Dan Bernstein.
+
+        Make PageClientImpl::scrollView do hardware blitting
+        https://bugs.webkit.org/show_bug.cgi?id=52689
+
+        * UIProcess/API/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::scrollView):
+        Clip the scroll rect and scroll the view.
+
+        * UIProcess/DrawingAreaProxyImpl.cpp:
+        (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
+        Scroll before painting.
+
+2011-01-18  Anders Carlsson  <andersca at apple.com>
+
         Reviewed by Darin Adler.
 
         Artifacts when scrolling with new drawing area
diff --git a/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm b/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
index ad7e73a..5c00aff 100644
--- a/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
+++ b/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
@@ -135,8 +135,10 @@ void PageClientImpl::displayView()
 
 void PageClientImpl::scrollView(const IntRect& scrollRect, const IntSize& scrollOffset)
 {
-    // FIXME: Actually scroll the view contents.
-    setViewNeedsDisplay(scrollRect);
+    NSRect clippedScrollRect = NSIntersectionRect(scrollRect, NSOffsetRect(scrollRect, -scrollOffset.width(), -scrollOffset.height()));
+
+    [m_wkView translateRectsNeedingDisplayInRect:clippedScrollRect by:scrollOffset];
+    [m_wkView scrollRect:clippedScrollRect by:scrollOffset];
 }
 
 IntSize PageClientImpl::viewSize()
diff --git a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
index d34bc0e..386c069 100644
--- a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
+++ b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
@@ -117,13 +117,16 @@ void DrawingAreaProxyImpl::incorporateUpdate(const UpdateInfo& updateInfo)
 
     m_backingStore->incorporateUpdate(updateInfo);
 
+    bool shouldScroll = !updateInfo.scrollRect.isEmpty();
+
+    if (shouldScroll)
+        m_webPageProxy->scrollView(updateInfo.scrollRect, updateInfo.scrollOffset);
+    
     for (size_t i = 0; i < updateInfo.updateRects.size(); ++i)
         m_webPageProxy->setViewNeedsDisplay(updateInfo.updateRects[i]);
 
-    if (!updateInfo.scrollRect.isEmpty()) {
-        m_webPageProxy->scrollView(updateInfo.scrollRect, updateInfo.scrollOffset);
+    if (shouldScroll)
         m_webPageProxy->displayView();
-    }
 }
 
 void DrawingAreaProxyImpl::sendSetSize()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list