Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: Source/core/frame/PinchViewport.h

Issue 640063002: Hide scrollbars when their dimensions are not scrollable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/frame/PinchViewport.cpp » ('j') | Source/core/frame/PinchViewport.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/PinchViewport.h
diff --git a/Source/core/frame/PinchViewport.h b/Source/core/frame/PinchViewport.h
index 4ab3a0246d63e1fb369b94916424311e8128b66a..827d28ae7be852409b79892b42143c5f1ccb2370 100644
--- a/Source/core/frame/PinchViewport.h
+++ b/Source/core/frame/PinchViewport.h
@@ -118,6 +118,12 @@ public:
// scroll extents of the viewport within the document.
IntPoint clampDocumentOffsetAtScale(const IntPoint& offset, float scale);
+ void adjustScrollbarExistence();
+
+ // Used in tests
+ virtual GraphicsLayer* layerForHorizontalScrollbar() const override;
+ virtual GraphicsLayer* layerForVerticalScrollbar() const override;
+
private:
// ScrollableArea implementation
virtual bool isActive() const override { return false; }
@@ -139,8 +145,6 @@ private:
virtual void setScrollOffset(const IntPoint&) override;
virtual GraphicsLayer* layerForContainer() const override;
virtual GraphicsLayer* layerForScrolling() const override;
- virtual GraphicsLayer* layerForHorizontalScrollbar() const override;
- virtual GraphicsLayer* layerForVerticalScrollbar() const override;
// GraphicsLayerClient implementation.
virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTime) override;
@@ -167,6 +171,9 @@ private:
FloatPoint m_offset;
float m_scale;
IntSize m_size;
+
+ bool m_hasHorizontalScrollbar;
+ bool m_hasVerticalScrollbar;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/frame/PinchViewport.cpp » ('j') | Source/core/frame/PinchViewport.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698