| Index: third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| index 86cf80e8070dd6f73f33da24254bd968f524a3f7..f87023aa35025ec6f0f16be36e3b2acbf07a7e01 100644
|
| --- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| @@ -1472,8 +1472,9 @@ TEST_F(WebViewTest, HistoryResetScrollAndScaleState) {
|
| LocalFrame* mainFrameLocal = toLocalFrame(webViewImpl->page()->mainFrame());
|
| mainFrameLocal->loader().saveScrollState();
|
| EXPECT_EQ(2.0f, mainFrameLocal->loader().currentItem()->pageScaleFactor());
|
| - EXPECT_EQ(94, mainFrameLocal->loader().currentItem()->scrollPoint().x());
|
| - EXPECT_EQ(111, mainFrameLocal->loader().currentItem()->scrollPoint().y());
|
| + EXPECT_EQ(94, mainFrameLocal->loader().currentItem()->scrollOffset().width());
|
| + EXPECT_EQ(111,
|
| + mainFrameLocal->loader().currentItem()->scrollOffset().height());
|
|
|
| // Confirm that resetting the page state resets the saved scroll position.
|
| webViewImpl->resetScrollAndScaleState();
|
| @@ -1481,8 +1482,8 @@ TEST_F(WebViewTest, HistoryResetScrollAndScaleState) {
|
| EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().width);
|
| EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
|
| EXPECT_EQ(1.0f, mainFrameLocal->loader().currentItem()->pageScaleFactor());
|
| - EXPECT_EQ(0, mainFrameLocal->loader().currentItem()->scrollPoint().x());
|
| - EXPECT_EQ(0, mainFrameLocal->loader().currentItem()->scrollPoint().y());
|
| + EXPECT_EQ(0, mainFrameLocal->loader().currentItem()->scrollOffset().width());
|
| + EXPECT_EQ(0, mainFrameLocal->loader().currentItem()->scrollOffset().height());
|
| }
|
|
|
| TEST_F(WebViewTest, BackForwardRestoreScroll) {
|
| @@ -1568,9 +1569,10 @@ TEST_F(WebViewTest, FullscreenResetScrollAndScaleFullscreenStyles) {
|
|
|
| // Sanity-check. There should be no scrolling possible.
|
| ASSERT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
|
| - ASSERT_EQ(
|
| - 0,
|
| - webViewImpl->mainFrameImpl()->frameView()->maximumScrollPosition().y());
|
| + ASSERT_EQ(0, webViewImpl->mainFrameImpl()
|
| + ->frameView()
|
| + ->maximumScrollOffset()
|
| + .height());
|
|
|
| // Confirm that after exiting and doing a layout, the scroll and scale
|
| // parameters are reset. The page sets display: none on overflowing elements
|
| @@ -1607,9 +1609,10 @@ TEST_F(WebViewTest, FullscreenResetScrollAndScaleExitAndReenter) {
|
|
|
| // Sanity-check. There should be no scrolling possible.
|
| ASSERT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
|
| - ASSERT_EQ(
|
| - 0,
|
| - webViewImpl->mainFrameImpl()->frameView()->maximumScrollPosition().y());
|
| + ASSERT_EQ(0, webViewImpl->mainFrameImpl()
|
| + ->frameView()
|
| + ->maximumScrollOffset()
|
| + .height());
|
|
|
| // Exit and, without performing a layout, reenter fullscreen again. We
|
| // shouldn't try to restore the scroll and scale values when we layout to
|
| @@ -1622,9 +1625,10 @@ TEST_F(WebViewTest, FullscreenResetScrollAndScaleExitAndReenter) {
|
|
|
| // Sanity-check. There should be no scrolling possible.
|
| ASSERT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
|
| - ASSERT_EQ(
|
| - 0,
|
| - webViewImpl->mainFrameImpl()->frameView()->maximumScrollPosition().y());
|
| + ASSERT_EQ(0, webViewImpl->mainFrameImpl()
|
| + ->frameView()
|
| + ->maximumScrollOffset()
|
| + .height());
|
|
|
| // When we exit now, we should restore the original scroll value.
|
| webViewImpl->exitFullscreenForElement(element);
|
| @@ -4047,8 +4051,8 @@ TEST_F(WebViewTest, ViewportOverrideAdaptsToScaleAndScroll) {
|
| // Initial transform takes current page scale and scroll position into
|
| // account.
|
| webViewImpl->setPageScaleFactor(1.5f);
|
| - frameView->setScrollPosition(DoublePoint(100, 150), ProgrammaticScroll,
|
| - ScrollBehaviorInstant);
|
| + frameView->setScrollOffset(ScrollOffset(100, 150), ProgrammaticScroll,
|
| + ScrollBehaviorInstant);
|
| devToolsEmulator->forceViewport(WebFloatPoint(50, 55), 2.f);
|
| expectedMatrix.makeIdentity()
|
| .scale(2.f)
|
| @@ -4062,8 +4066,8 @@ TEST_F(WebViewTest, ViewportOverrideAdaptsToScaleAndScroll) {
|
| *devToolsEmulator->visibleContentRectForPainting());
|
|
|
| // Transform adapts to scroll changes.
|
| - frameView->setScrollPosition(DoublePoint(50, 55), ProgrammaticScroll,
|
| - ScrollBehaviorInstant);
|
| + frameView->setScrollOffset(ScrollOffset(50, 55), ProgrammaticScroll,
|
| + ScrollBehaviorInstant);
|
| expectedMatrix.makeIdentity()
|
| .scale(2.f)
|
| .translate(-50, -55)
|
|
|