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

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

Issue 2144303002: Made layout viewport scroll updates from compositor work like ordinary layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rootScrollerOnCompositor
Patch Set: Initialize ScrollUpdateInfo's layer id in constructor Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
index bf4f4cd7a8e304fbc1b3e88d314a9f6d99ee7a7c..949d3e1bf55d685c1b700d3fd6f314fc2ab5c18a 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -524,7 +524,8 @@ TEST_P(ParameterizedVisualViewportTest, TestFractionalScrollOffsetIsNotOverwritt
FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView();
frameView.layoutViewportScrollableArea()->setScrollPosition(DoublePoint(0, 10.5), ProgrammaticScroll);
- webViewImpl()->applyViewportDeltas(WebFloatSize(), WebFloatSize(10, 20), WebFloatSize(), 1, 0);
+ frameView.layoutViewportScrollableArea()->ScrollableArea::setScrollPosition(
+ DoublePoint(10, 30.5), CompositorScroll);
EXPECT_EQ(30.5, frameView.layoutViewportScrollableArea()->scrollPositionDouble().y());
@@ -1176,37 +1177,6 @@ TEST_P(ParameterizedVisualViewportTest, ScrollIntoViewFractionalOffset)
EXPECT_POINT_EQ(FloatPoint(250.5f, 100.5f), visualViewport.location());
}
-// Top controls can make an unscrollable page temporarily scrollable, causing
-// a scroll clamp when the page is resized. Make sure this bug is fixed.
-// crbug.com/437620
-TEST_F(VisualViewportTest, TestResizeDoesntChangeScrollOffset)
-{
- RuntimeEnabledFeatures::setInertTopControlsEnabled(false);
- initializeWithAndroidSettings();
- webViewImpl()->resizeWithTopControls(IntSize(980, 650), 20, false);
-
- navigateTo("about:blank");
-
- VisualViewport& visualViewport = frame()->page()->frameHost().visualViewport();
- FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView();
-
- // Outer viewport isn't scrollable
- EXPECT_SIZE_EQ(IntSize(980, 650), frameView.visibleContentRect().size());
-
- visualViewport.setScale(2);
- visualViewport.move(FloatPoint(0, 40));
-
- // Simulate bringing down the top controls by 20px but counterscrolling the outer viewport.
- webViewImpl()->applyViewportDeltas(WebFloatSize(), WebFloatSize(0, 20), WebFloatSize(), 1, 1);
-
- EXPECT_EQ(20, frameView.layoutViewportScrollableArea()->scrollPosition().y());
-
- webViewImpl()->resizeWithTopControls(WebSize(980, 630), 20, true);
-
- EXPECT_EQ(0, frameView.layoutViewportScrollableArea()->scrollPosition().y());
- EXPECT_EQ(60, visualViewport.location().y());
-}
-
static IntPoint expectedMaxFrameViewScrollOffset(VisualViewport& visualViewport, FrameView& frameView)
{
float aspectRatio = visualViewport.visibleRect().width() / visualViewport.visibleRect().height();
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698