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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.h

Issue 2454913003: MainFrame scrollbars should work with RFV instead of FV (Closed)
Patch Set: Fix VisualViewportTest Created 4 years, 1 month 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
Index: third_party/WebKit/Source/platform/scroll/ScrollableArea.h
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
index 2de87e1c4717c03d7d404e07f1f2173a8066f0e4..c6235e86395128d1cd42dd6b96851e54bc7ace61 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
@@ -109,8 +109,8 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
void mouseEnteredContentArea() const;
void mouseExitedContentArea() const;
void mouseMovedInContentArea() const;
- void mouseEnteredScrollbar(Scrollbar&) const;
- void mouseExitedScrollbar(Scrollbar&) const;
+ virtual void mouseEnteredScrollbar(Scrollbar&) const;
+ virtual void mouseExitedScrollbar(Scrollbar&) const;
void contentAreaDidShow() const;
void contentAreaDidHide() const;
@@ -121,10 +121,10 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
virtual void contentsResized();
- bool hasOverlayScrollbars() const;
+ virtual bool hasOverlayScrollbars() const;
void setScrollbarOverlayColorTheme(ScrollbarOverlayColorTheme);
void recalculateScrollbarOverlayColorTheme(Color);
- ScrollbarOverlayColorTheme getScrollbarOverlayColorTheme() const {
+ virtual ScrollbarOverlayColorTheme getScrollbarOverlayColorTheme() const {
return static_cast<ScrollbarOverlayColorTheme>(
m_scrollbarOverlayColorTheme);
}
@@ -165,10 +165,10 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
virtual bool isActive() const = 0;
virtual int scrollSize(ScrollbarOrientation) const = 0;
- void setScrollbarNeedsPaintInvalidation(ScrollbarOrientation);
+ virtual void setScrollbarNeedsPaintInvalidation(ScrollbarOrientation);
virtual bool isScrollCornerVisible() const = 0;
virtual IntRect scrollCornerRect() const = 0;
- void setScrollCornerNeedsPaintInvalidation();
+ virtual void setScrollCornerNeedsPaintInvalidation();
virtual void getTickmarks(Vector<IntRect>&) const {}
// Convert points and rects between the scrollbar and its containing Widget.
@@ -198,6 +198,10 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
virtual Scrollbar* horizontalScrollbar() const { return nullptr; }
virtual Scrollbar* verticalScrollbar() const { return nullptr; }
+ // Called to update the scrollbars to accurately reflect the state of the
+ // view.
+ virtual void updateScrollbars(){};
+
// scrollPosition is the location of the top/left of the scroll viewport in
// the coordinate system defined by the top/left of the overflow rect.
// scrollOffset is the offset of the scroll viewport from its position when
@@ -219,6 +223,9 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
virtual ScrollOffset maximumScrollOffset() const {
return ScrollOffset(maximumScrollOffsetInt());
}
+ virtual ScrollOffset scrollAnimatorDesiredTargetOffset() const {
+ return scrollAnimator().desiredTargetOffset();
+ }
virtual IntRect visibleContentRect(
IncludeScrollbarsInRect = ExcludeScrollbars) const;

Powered by Google App Engine
This is Rietveld 408576698