Index: Source/platform/scroll/ScrollView.h |
diff --git a/Source/platform/scroll/ScrollView.h b/Source/platform/scroll/ScrollView.h |
index 7037943e28c5cf21607bd158156281e82bf45aa7..906830d7c9224a532a3f86fe96f48b8e3cbfdd8b 100644 |
--- a/Source/platform/scroll/ScrollView.h |
+++ b/Source/platform/scroll/ScrollView.h |
@@ -120,8 +120,8 @@ public: |
// included. |
virtual IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) const OVERRIDE; |
IntSize visibleSize() const { return visibleContentRect().size(); } |
- virtual int visibleWidth() const OVERRIDE { return visibleContentRect().width(); } |
- virtual int visibleHeight() const OVERRIDE { return visibleContentRect().height(); } |
+ virtual int visibleWidth() const OVERRIDE FINAL { return visibleContentRect().width(); } |
+ virtual int visibleHeight() const OVERRIDE FINAL { return visibleContentRect().height(); } |
// visibleContentRect().size() is computed from unscaledVisibleContentSize() divided by the value of visibleContentScaleFactor. |
// For the main frame, visibleContentScaleFactor is equal to the page's pageScaleFactor; it's 1 otherwise. |
@@ -281,12 +281,21 @@ protected: |
virtual bool isVerticalDocument() const { return true; } |
virtual bool isFlippedDocument() const { return false; } |
+ enum ComputeScrollbarExistenceOption { |
+ Lazy, |
+ AttemptToRemoveScrollbarsInCriticalCase |
+ }; |
+ void computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool& newHasVerticalScrollbar, ComputeScrollbarExistenceOption = Lazy) const; |
+ void updateScrollbarGeometry(); |
+ |
// Called to update the scrollbars to accurately reflect the state of the view. |
void updateScrollbars(const IntSize& desiredOffset); |
IntSize excludeScrollbars(const IntSize&) const; |
private: |
+ bool adjustScrollbarExistence(ComputeScrollbarExistenceOption = Lazy); |
+ |
RefPtr<Scrollbar> m_horizontalScrollbar; |
RefPtr<Scrollbar> m_verticalScrollbar; |
ScrollbarMode m_horizontalScrollbarMode; |
@@ -306,7 +315,6 @@ private: |
bool m_scrollbarsSuppressed; |
bool m_inUpdateScrollbars; |
- unsigned m_updateScrollbarsPass; |
IntPoint m_panScrollIconPoint; |
bool m_drawPanScrollIcon; |