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

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

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 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
Index: Source/core/frame/FrameView.h
diff --git a/Source/core/frame/FrameView.h b/Source/core/frame/FrameView.h
index bd953b0327053f4d434f1eabc9b14cfa70ccd00c..57e6b64883218dc4b639ad8410cbeab0b790c35c 100644
--- a/Source/core/frame/FrameView.h
+++ b/Source/core/frame/FrameView.h
@@ -170,7 +170,7 @@ public:
IntSize inputEventsOffsetForEmulation() const;
void setInputEventsTransformForEmulation(const IntSize&, float);
- virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBehaviorInstant) override;
+ virtual void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = ScrollBehaviorInstant) override;
FloatSize elasticOverscroll() const { return m_elasticOverscroll; }
void setElasticOverscroll(const FloatSize&);
@@ -351,8 +351,6 @@ public:
virtual GraphicsLayer* layerForVerticalScrollbar() const override;
virtual GraphicsLayer* layerForScrollCorner() const override;
virtual int scrollSize(ScrollbarOrientation) const override;
- virtual void setScrollOffset(const IntPoint&) override;
- virtual void setScrollOffset(const DoublePoint&) override;
virtual bool isScrollCornerVisible() const override;
virtual bool userInputScrollable(ScrollbarOrientation) const override;
virtual bool shouldPlaceVerticalScrollbarOnLeft() const override;
@@ -438,12 +436,6 @@ public:
void cacheCurrentScrollPosition() { m_cachedScrollPosition = scrollPositionDouble(); }
DoublePoint cachedScrollPosition() const { return m_cachedScrollPosition; }
- // Functions for scrolling the view.
- void scrollBy(const DoubleSize& s, ScrollBehavior behavior = ScrollBehaviorInstant)
- {
- return setScrollPosition(scrollPositionDouble() + s, behavior);
- }
-
// Scroll the actual contents of the view (either blitting or invalidating as needed).
void scrollContents(const IntSize& scrollDelta);
@@ -613,6 +605,9 @@ protected:
private:
explicit FrameView(LocalFrame*);
+ virtual void setScrollOffset(const IntPoint&, ScrollType) override;
+ virtual void setScrollOffset(const DoublePoint&, ScrollType) override;
+
void updateLayoutAndStyleForPaintingInternal();
void invalidateTreeIfNeededRecursive();
void scrollContentsIfNeededRecursive();

Powered by Google App Engine
This is Rietveld 408576698