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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index 660cfc6..3627283 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -167,6 +167,9 @@ public:
IntPoint scrollPosition() const { return visibleContentRect().location(); }
IntSize scrollOffset() const { return visibleContentRect().location() - IntPoint(); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes.
IntPoint maximumScrollPosition() const; // The maximum position we can be scrolled to.
+ IntPoint minimumScrollPosition() const; // The minimum position we can be scrolled to.
+ // Adjust the pass in scroll position within the minimum and maximum positions.
+ IntPoint adjustScrollPositionWithinRange(const IntPoint&) const;
int scrollX() const { return scrollPosition().x(); }
int scrollY() const { return scrollPosition().y(); }
@@ -286,6 +289,10 @@ protected:
// Scroll the content by invalidating everything.
virtual void scrollContentsSlowPath(const IntRect& updateRect);
+ void setScrollOriginX(int);
+ int scrollOriginX() { return m_scrollOriginX; }
+ void updateScrollbars();
+
private:
RefPtr<Scrollbar> m_horizontalScrollbar;
RefPtr<Scrollbar> m_verticalScrollbar;
@@ -321,6 +328,11 @@ private:
bool m_paintsEntireContents;
bool m_delegatesScrolling;
+ // m_scrollOriginX is 0 for LTR page. And it is negative of left layout
+ // overflow for RTL page. It is mainly used to set the horizontal scrollbar
+ // position for RTL page.
+ int m_scrollOriginX;
+
void init();
void destroy();
@@ -348,6 +360,8 @@ private:
void platformSetScrollbarsSuppressed(bool repaintOnUnsuppress);
void platformRepaintContentRectangle(const IntRect&, bool now);
bool platformIsOffscreen() const;
+
+ void platformSetScrollOriginX(int);
#if PLATFORM(ANDROID)
int platformActualWidth() const;