| Index: third_party/WebKit/Source/core/frame/VisualViewport.h
|
| diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.h b/third_party/WebKit/Source/core/frame/VisualViewport.h
|
| index 654bf4b64a4b6c161f99659ce924e1b679a76033..f2a965abc4f57b9a46bef7272f1e7e2ff194dd29 100644
|
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.h
|
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.h
|
| @@ -33,8 +33,8 @@
|
|
|
| #include "core/CoreExport.h"
|
| #include "core/events/Event.h"
|
| -#include "platform/geometry/FloatPoint.h"
|
| #include "platform/geometry/FloatRect.h"
|
| +#include "platform/geometry/FloatSize.h"
|
| #include "platform/geometry/IntSize.h"
|
| #include "platform/graphics/GraphicsLayerClient.h"
|
| #include "platform/scroll/ScrollableArea.h"
|
| @@ -93,9 +93,7 @@ class CORE_EXPORT VisualViewport final
|
| // coordinates are in partial CSS pixels.
|
| void setLocation(const FloatPoint&);
|
| // FIXME: This should be called moveBy
|
| - void move(const FloatPoint&);
|
| - void move(const FloatSize&);
|
| - FloatPoint location() const { return m_offset; }
|
| + void move(const ScrollOffset&);
|
|
|
| // Sets the size of the inner viewport when unscaled in CSS pixels.
|
| void setSize(const IntSize&);
|
| @@ -128,7 +126,6 @@ class CORE_EXPORT VisualViewport final
|
| FloatRect visibleRect() const;
|
|
|
| // The viewport rect relative to the document origin, in partial CSS pixels.
|
| - // FIXME: This should be a DoubleRect since scroll offsets are now doubles.
|
| FloatRect visibleRectInDocument() const;
|
|
|
| // Convert the given rect in the main FrameView's coordinates into a rect
|
| @@ -166,14 +163,10 @@ class CORE_EXPORT VisualViewport final
|
|
|
| // ScrollableArea implementation
|
| HostWindow* getHostWindow() const override;
|
| - DoubleRect visibleContentRectDouble(
|
| - IncludeScrollbarsInRect = ExcludeScrollbars) const override;
|
| - IntRect visibleContentRect(
|
| - IncludeScrollbarsInRect = ExcludeScrollbars) const override;
|
| bool shouldUseIntegerScrollOffset() const override;
|
| - void setScrollPosition(const DoublePoint&,
|
| - ScrollType,
|
| - ScrollBehavior = ScrollBehaviorInstant) override;
|
| + void setScrollOffset(const ScrollOffset&,
|
| + ScrollType,
|
| + ScrollBehavior = ScrollBehaviorInstant) override;
|
| LayoutRect visualRectForScrollbarParts() const override {
|
| ASSERT_NOT_REACHED();
|
| return LayoutRect();
|
| @@ -182,11 +175,11 @@ class CORE_EXPORT VisualViewport final
|
| int scrollSize(ScrollbarOrientation) const override;
|
| bool isScrollCornerVisible() const override { return false; }
|
| IntRect scrollCornerRect() const override { return IntRect(); }
|
| - IntPoint scrollPosition() const override { return flooredIntPoint(m_offset); }
|
| - DoublePoint scrollPositionDouble() const override { return m_offset; }
|
| - IntPoint minimumScrollPosition() const override;
|
| - IntPoint maximumScrollPosition() const override;
|
| - DoublePoint maximumScrollPositionDouble() const override;
|
| + IntSize scrollOffsetInt() const override { return flooredIntSize(m_offset); }
|
| + ScrollOffset scrollOffset() const override { return m_offset; }
|
| + IntSize minimumScrollOffsetInt() const override;
|
| + IntSize maximumScrollOffsetInt() const override;
|
| + ScrollOffset maximumScrollOffset() const override;
|
| int visibleHeight() const override { return visibleRect().height(); }
|
| int visibleWidth() const override { return visibleRect().width(); }
|
| IntSize contentsSize() const override;
|
| @@ -196,7 +189,7 @@ class CORE_EXPORT VisualViewport final
|
| bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; }
|
| bool scrollAnimatorEnabled() const override;
|
| void scrollControlWasSetNeedsPaintInvalidation() override {}
|
| - void setScrollOffset(const DoublePoint&, ScrollType) override;
|
| + void updateScrollOffset(const ScrollOffset&, ScrollType) override;
|
| GraphicsLayer* layerForContainer() const override;
|
| GraphicsLayer* layerForScrolling() const override;
|
| GraphicsLayer* layerForHorizontalScrollbar() const override;
|
| @@ -245,7 +238,6 @@ class CORE_EXPORT VisualViewport final
|
| String debugName(const GraphicsLayer*) const override;
|
|
|
| void setupScrollbar(WebScrollbar::Orientation);
|
| - FloatPoint clampOffsetToBoundaries(const FloatPoint&);
|
|
|
| void notifyRootFrameViewport() const;
|
|
|
| @@ -268,7 +260,7 @@ class CORE_EXPORT VisualViewport final
|
| std::unique_ptr<WebScrollbarLayer> m_webOverlayScrollbarVertical;
|
|
|
| // Offset of the visual viewport from the main frame's origin, in CSS pixels.
|
| - FloatPoint m_offset;
|
| + ScrollOffset m_offset;
|
| float m_scale;
|
| IntSize m_size;
|
| float m_topControlsAdjustment;
|
|
|