summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/ScrollView.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/ScrollView.h')
-rw-r--r--WebCore/platform/ScrollView.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index 7fb5d8e..d6b08b2 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -127,7 +127,11 @@ 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 use
+ // the actualVisibleContentRect instead, though this must be updated manually, e.g after panning ends.
IntRect visibleContentRect(bool includeScrollbars = false) const;
+ 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(); }
@@ -294,6 +298,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;