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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2680953002: Remove GraphicsLayer::didScroll and directly call ScrollableArea::didScroll (Closed)
Patch Set: Remove unneeded tests from parent patch Created 3 years, 10 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/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 8dbb764e02a91c94300c067140e9bc8f9270da32..323c5446e52615cd889c4cdd39b449f7dbedc1b6 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -6769,7 +6769,8 @@ TEST_F(WebFrameTest, CompositorScrollIsUserScrollLongPage) {
// Do a compositor scroll, verify that this is counted as a user scroll.
frameViewLayer->platformLayer()->setScrollPositionDouble(
WebDoublePoint(0, 1));
- frameViewLayer->didScroll();
+ auto* scrollableArea = frameImpl->frameView()->layoutViewportScrollableArea();
+ scrollableArea->didScroll(gfx::ScrollOffset(0, 1));
webViewHelper.webView()->applyViewportDeltas(WebFloatSize(), WebFloatSize(),
WebFloatSize(), 1.7f, 0);
EXPECT_TRUE(client.wasFrameScrolled());
@@ -6781,7 +6782,7 @@ TEST_F(WebFrameTest, CompositorScrollIsUserScrollLongPage) {
// 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 +6791,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());
@@ -6800,7 +6801,7 @@ TEST_F(WebFrameTest, CompositorScrollIsUserScrollLongPage) {
// 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());

Powered by Google App Engine
This is Rietveld 408576698