| Index: third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp
|
| index 89bd506d83926764001d7f1f13959dd0defa49b6..f8c07de75bb1911cf232af397fd862a3a4a9446f 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp
|
| @@ -178,24 +178,23 @@ class FakeScrollableArea : public GarbageCollectedFinalized<FakeScrollableArea>,
|
| bool userInputScrollable(ScrollbarOrientation) const override { return true; }
|
| bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; }
|
| int pageStep(ScrollbarOrientation) const override { return 0; }
|
| - IntPoint minimumScrollPosition() const override { return IntPoint(); }
|
| - IntPoint maximumScrollPosition() const override {
|
| - return IntPoint(contentsSize().width() - visibleWidth(),
|
| - contentsSize().height() - visibleHeight());
|
| + IntSize minimumScrollOffsetInt() const override { return IntSize(); }
|
| + IntSize maximumScrollOffsetInt() const override {
|
| + return contentsSize() - IntSize(visibleWidth(), visibleHeight());
|
| }
|
|
|
| - void setScrollOffset(const DoublePoint& offset, ScrollType) override {
|
| - m_scrollPosition = offset;
|
| + void updateScrollOffset(const ScrollOffset& offset, ScrollType) override {
|
| + m_scrollOffset = offset;
|
| }
|
| - DoublePoint scrollPositionDouble() const override { return m_scrollPosition; }
|
| - IntPoint scrollPosition() const override {
|
| - return flooredIntPoint(m_scrollPosition);
|
| + ScrollOffset scrollOffset() const override { return m_scrollOffset; }
|
| + IntSize scrollOffsetInt() const override {
|
| + return flooredIntSize(m_scrollOffset);
|
| }
|
|
|
| DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::trace(visitor); }
|
|
|
| private:
|
| - DoublePoint m_scrollPosition;
|
| + ScrollOffset m_scrollOffset;
|
| };
|
|
|
| TEST_F(GraphicsLayerTest, applyScrollToScrollableArea) {
|
| @@ -206,8 +205,8 @@ TEST_F(GraphicsLayerTest, applyScrollToScrollableArea) {
|
| m_platformLayer->setScrollPositionDouble(scrollPosition);
|
| m_graphicsLayer->didScroll();
|
|
|
| - EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x());
|
| - EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y());
|
| + EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollOffset().width());
|
| + EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollOffset().height());
|
| }
|
|
|
| } // namespace blink
|
|
|