[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 15:43:54 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7f1b0a431f53c810e3ba64482e21f5e49f324123
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 11 12:38:58 2010 +0000

    2010-11-11  Kenneth Rohde Christiansen  <kenneth at webkit.org>
    
            Reviewed by Andreas Kling.
    
            Make it possible to override the visibleContentRect in the case the
            client is handling the scrolling. This is similar to what the iPhone does.
    
            * platform/ScrollView.cpp:
            (WebCore::ScrollView::visibleContentRect):
            * platform/ScrollView.h:
            (WebCore::ScrollView::setActualVisibleContentRect):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71804 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5ba2c9b..97dea01 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-11  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        Make it possible to override the visibleContentRect in the case the
+        client is handling the scrolling. This is similar to what the iPhone does.
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::visibleContentRect):
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::setActualVisibleContentRect):
+
 2010-11-11  Andreas Kling  <kling at webkit.org>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index b1c9615..bd75b83 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -206,6 +206,10 @@ IntRect ScrollView::visibleContentRect(bool includeScrollbars) const
 {
     if (platformWidget())
         return platformVisibleContentRect(includeScrollbars);
+
+    if (!m_actualVisibleContentRect.isEmpty())
+        return m_actualVisibleContentRect;
+
     return IntRect(IntPoint(m_scrollOffset.width(), m_scrollOffset.height()),
                    IntSize(max(0, width() - (verticalScrollbar() && !includeScrollbars ? verticalScrollbar()->width() : 0)), 
                            max(0, height() - (horizontalScrollbar() && !includeScrollbars ? horizontalScrollbar()->height() : 0))));
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index 22e487d..506dbf3 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -126,8 +126,10 @@ public:
 
     // The visible content rect has a location that is the scrolled offset of the document. The width and height are the viewport width
     // and height. By default the scrollbars themselves are excluded from this rectangle, but an optional boolean argument allows them to be
-    // included.
+    // included. In the situation the client is responsible for the scrolling (ie. with a tiled backing store) it is possible to
+    // override the current visibleContentRect by using setActualVisibleContentRect, for instance when a pan ends.
     IntRect visibleContentRect(bool includeScrollbars = false) const;
+    void setActualVisibleContentRect(IntRect actualVisibleContentRect) { m_actualVisibleContentRect = actualVisibleContentRect; }
     int visibleWidth() const { return visibleContentRect().width(); }
     int visibleHeight() const { return visibleContentRect().height(); }
 
@@ -287,6 +289,7 @@ private:
     // whether it is safe to blit on scroll.
     bool m_canBlitOnScroll;
 
+    IntRect m_actualVisibleContentRect;
     IntSize m_scrollOffset; // FIXME: Would rather store this as a position, but we will wait to make this change until more code is shared.
     IntSize m_fixedLayoutSize;
     IntSize m_contentsSize;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list