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

Unified Diff: third_party/WebKit/Source/core/frame/RootFrameViewport.h

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/frame/RootFrameViewport.h
diff --git a/third_party/WebKit/Source/core/frame/RootFrameViewport.h b/third_party/WebKit/Source/core/frame/RootFrameViewport.h
index 6a647aa4e9a84c28fa2e9c1f23f7a47aee661391..4e439ee98ae3b9f10eeaef722d6b9739dc3003f4 100644
--- a/third_party/WebKit/Source/core/frame/RootFrameViewport.h
+++ b/third_party/WebKit/Source/core/frame/RootFrameViewport.h
@@ -47,22 +47,20 @@ class CORE_EXPORT RootFrameViewport final
LayoutRect rootContentsToLayoutViewportContents(FrameView& rootFrameView,
const LayoutRect&) const;
- void restoreToAnchor(const DoublePoint&);
+ void restoreToAnchor(const ScrollOffset&);
// Callback whenever the visual viewport changes scroll position or scale.
void didUpdateVisualViewport();
// ScrollableArea Implementation
bool isRootFrameViewport() const override { return true; }
- void setScrollPosition(const DoublePoint&,
- ScrollType,
- ScrollBehavior = ScrollBehaviorInstant) override;
+ void setScrollOffset(const ScrollOffset&,
+ ScrollType,
+ ScrollBehavior = ScrollBehaviorInstant) override;
LayoutRect scrollIntoView(const LayoutRect& rectInContent,
const ScrollAlignment& alignX,
const ScrollAlignment& alignY,
ScrollType = ProgrammaticScroll) override;
- DoubleRect visibleContentRectDouble(
- IncludeScrollbarsInRect = ExcludeScrollbars) const override;
IntRect visibleContentRect(
IncludeScrollbarsInRect = ExcludeScrollbars) const override;
bool shouldUseIntegerScrollOffset() const override;
@@ -74,12 +72,12 @@ class CORE_EXPORT RootFrameViewport final
int scrollSize(ScrollbarOrientation) const override;
bool isScrollCornerVisible() const override;
IntRect scrollCornerRect() const override;
- void updateScrollPosition(const DoublePoint&, ScrollType) override;
- IntPoint scrollPosition() const override;
- DoublePoint scrollPositionDouble() const override;
- IntPoint minimumScrollPosition() const override;
- IntPoint maximumScrollPosition() const override;
- DoublePoint maximumScrollPositionDouble() const override;
+ void updateScrollOffset(const ScrollOffset&, ScrollType) override;
+ IntSize scrollOffsetInt() const override;
+ ScrollOffset scrollOffset() const override;
+ IntSize minimumScrollOffsetInt() const override;
+ IntSize maximumScrollOffsetInt() const override;
+ ScrollOffset maximumScrollOffset() const override;
IntSize contentsSize() const override;
bool scrollbarsCanBeActive() const override;
IntRect scrollableAreaBoundingBox() const override;
@@ -108,9 +106,9 @@ class CORE_EXPORT RootFrameViewport final
enum ViewportToScrollFirst { VisualViewport, LayoutViewport };
- DoublePoint scrollOffsetFromScrollAnimators() const;
+ ScrollOffset scrollOffsetFromScrollAnimators() const;
- void distributeScrollBetweenViewports(const DoublePoint&,
+ void distributeScrollBetweenViewports(const ScrollOffset&,
ScrollType,
ScrollBehavior,
ViewportToScrollFirst);

Powered by Google App Engine
This is Rietveld 408576698