Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
index ccba4beeec25ef232aec53c0f2e2af67505ac7c3..b384736b8b0b4c6278ade442dcf9cc0d944e620d 100644 |
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp |
@@ -6761,15 +6761,14 @@ TEST_F(WebFrameTest, CompositorScrollIsUserScrollLongPage) { |
WebLocalFrameImpl* frameImpl = webViewHelper.webView()->mainFrameImpl(); |
DocumentLoader::InitialScrollState& initialScrollState = |
frameImpl->frame()->loader().documentLoader()->initialScrollState(); |
- GraphicsLayer* frameViewLayer = frameImpl->frameView()->layerForScrolling(); |
EXPECT_FALSE(client.wasFrameScrolled()); |
EXPECT_FALSE(initialScrollState.wasScrolledByUser); |
+ auto* scrollableArea = frameImpl->frameView()->layoutViewportScrollableArea(); |
+ |
// Do a compositor scroll, verify that this is counted as a user scroll. |
- frameViewLayer->platformLayer()->setScrollPositionDouble( |
- WebDoublePoint(0, 1)); |
- frameViewLayer->didScroll(); |
+ scrollableArea->didScroll(gfx::ScrollOffset(0, 1)); |
webViewHelper.webView()->applyViewportDeltas(WebFloatSize(), WebFloatSize(), |
WebFloatSize(), 1.7f, 0); |
EXPECT_TRUE(client.wasFrameScrolled()); |
@@ -6779,9 +6778,7 @@ TEST_F(WebFrameTest, CompositorScrollIsUserScrollLongPage) { |
initialScrollState.wasScrolledByUser = false; |
// The page scale 1.0f and scroll. |
- frameViewLayer->platformLayer()->setScrollPositionDouble( |
- WebDoublePoint(0, 2)); |
- frameViewLayer->didScroll(); |
+ scrollableArea->didScroll(gfx::ScrollOffset(0, 2)); |
webViewHelper.webView()->applyViewportDeltas(WebFloatSize(), WebFloatSize(), |
WebFloatSize(), 1.0f, 0); |
EXPECT_TRUE(client.wasFrameScrolled()); |
@@ -6790,7 +6787,7 @@ TEST_F(WebFrameTest, CompositorScrollIsUserScrollLongPage) { |
initialScrollState.wasScrolledByUser = false; |
// No scroll event if there is no scroll delta. |
- frameViewLayer->didScroll(); |
+ scrollableArea->didScroll(gfx::ScrollOffset(0, 2)); |
webViewHelper.webView()->applyViewportDeltas(WebFloatSize(), WebFloatSize(), |
WebFloatSize(), 1.0f, 0); |
EXPECT_FALSE(client.wasFrameScrolled()); |
@@ -6798,9 +6795,7 @@ TEST_F(WebFrameTest, CompositorScrollIsUserScrollLongPage) { |
client.reset(); |
// Non zero page scale and scroll. |
- frameViewLayer->platformLayer()->setScrollPositionDouble( |
- WebDoublePoint(9, 15)); |
- frameViewLayer->didScroll(); |
+ scrollableArea->didScroll(gfx::ScrollOffset(9, 15)); |
webViewHelper.webView()->applyViewportDeltas(WebFloatSize(), WebFloatSize(), |
WebFloatSize(), 0.6f, 0); |
EXPECT_TRUE(client.wasFrameScrolled()); |