[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 16:01:39 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fc192e9ae8cc6af9f1392edd2d4a394f5b3dd91b
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 17 22:57:43 2010 +0000

    2010-11-17  Andreas Kling  <kling at webkit.org>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            ScrollView: Decouple actualVisibleContentRect from visibleContentRect
    
            Added actualVisibleContentRect() which will return the override provided
            by setActualVisibleContentRect() or fall back to visibleContentRect()
            if no override has been set.
    
            This is similar to what the iPhone does.
    
            * platform/ScrollView.cpp:
            (WebCore::ScrollView::visibleContentRect):
            * platform/ScrollView.h:
            (WebCore::ScrollView::actualVisibleContentRect):
            (WebCore::ScrollView::setActualVisibleContentRect): IntRect -> const IntRect&
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72248 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 287c7c3..229599e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-17  Andreas Kling  <kling at webkit.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        ScrollView: Decouple actualVisibleContentRect from visibleContentRect
+
+        Added actualVisibleContentRect() which will return the override provided
+        by setActualVisibleContentRect() or fall back to visibleContentRect()
+        if no override has been set.
+
+        This is similar to what the iPhone does.
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::visibleContentRect):
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::actualVisibleContentRect):
+        (WebCore::ScrollView::setActualVisibleContentRect): IntRect -> const IntRect&
+
 2010-11-17  Tony Chang  <tony at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index 5b8ff55..342a344 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -210,9 +210,6 @@ IntRect ScrollView::visibleContentRect(bool includeScrollbars) const
     if (paintsEntireContents())
         return IntRect(IntPoint(0, 0), contentsSize());
 
-    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 506dbf3..8186b77 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -126,10 +126,12 @@ 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. 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.
+    // included.
+    // In the situation the client is responsible for the scrolling (ie. with a tiled backing store) it is possible to use
+    // the actualVisibleContentRect instead, though this must be updated manually, e.g after panning ends.
     IntRect visibleContentRect(bool includeScrollbars = false) const;
-    void setActualVisibleContentRect(IntRect actualVisibleContentRect) { m_actualVisibleContentRect = actualVisibleContentRect; }
+    IntRect actualVisibleContentRect() const { return m_actualVisibleContentRect.isEmpty() ? visibleContentRect() : m_actualVisibleContentRect; }
+    void setActualVisibleContentRect(const IntRect& actualVisibleContentRect) { m_actualVisibleContentRect = actualVisibleContentRect; }
     int visibleWidth() const { return visibleContentRect().width(); }
     int visibleHeight() const { return visibleContentRect().height(); }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list