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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md 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 ca416c778653e32a6b278778fe5bcace0080027d..54d69c5fea50a6e9bcf3baa63f2afe2aa6cc7ef1 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 setScrollOffset(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);
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/frame/RootFrameViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698