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

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

Issue 1163433003: Remove WebViewImpl helper methods for setting scroll offset. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed outerViewport to layoutViewport Created 5 years, 7 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 | « Source/web/tests/TopControlsTest.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index 734ce639400cbeb75c5082067e45bd6c757bc177..8fb12ccf6801050fdfda693a3160fbb0b3e3f54c 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -2186,7 +2186,7 @@ protected:
{
webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, viewportSize.height));
webViewHelper.webViewImpl()->setPageScaleFactor(initialPageScaleFactor);
- webViewHelper.webViewImpl()->setMainFrameScrollOffset(WebPoint(scrollOffset.width, scrollOffset.height));
+ webViewHelper.webViewImpl()->mainFrame()->setScrollOffset(scrollOffset);
webViewHelper.webViewImpl()->layout();
const WebSize expectedScrollOffset = webViewHelper.webViewImpl()->mainFrame()->scrollOffset();
webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, viewportSize.height * 0.8f));
@@ -2346,7 +2346,7 @@ TEST_F(WebFrameTest, updateOverlayScrollbarLayers)
void setScaleAndScrollAndLayout(WebViewImpl* webView, WebPoint scroll, float scale)
{
webView->setPageScaleFactor(scale);
- webView->setMainFrameScrollOffset(WebPoint(scroll.x, scroll.y));
+ webView->mainFrame()->setScrollOffset(WebSize(scroll.x, scroll.y));
webView->layout();
}
@@ -4710,7 +4710,7 @@ TEST_F(WebFrameTest, DisambiguationPopupPinchViewport)
webViewHelper.webView()->resize(WebSize(100, 200));
// Scroll main frame to the bottom of the document
- webViewImpl->setMainFrameScrollOffset(WebPoint(0, 400));
+ webViewImpl->mainFrame()->setScrollOffset(WebSize(0, 400));
EXPECT_POINT_EQ(IntPoint(0, 400), frame->view()->scrollPosition());
webViewImpl->setPageScaleFactor(2.0);
@@ -6143,7 +6143,7 @@ TEST_F(WebFrameTest, FrameViewScrollAccountsForTopControls)
webView->setPageScaleFactor(2.0f);
webView->layout();
- webView->setMainFrameScrollOffset(WebPoint(0, 2000));
+ webView->mainFrame()->setScrollOffset(WebSize(0, 2000));
EXPECT_POINT_EQ(IntPoint(0, 1900), IntPoint(frameView->scrollOffset()));
// Simulate the top controls showing by 20px, thus shrinking the viewport
@@ -6153,7 +6153,7 @@ TEST_F(WebFrameTest, FrameViewScrollAccountsForTopControls)
// Show more, make sure the scroll actually gets clamped.
webView->applyViewportDeltas(WebFloatSize(), WebFloatSize(), WebFloatSize(), 1.0f, 20.0f / topControlsHeight);
- webView->setMainFrameScrollOffset(WebPoint(0, 2000));
+ webView->mainFrame()->setScrollOffset(WebSize(0, 2000));
EXPECT_POINT_EQ(IntPoint(0, 1940), IntPoint(frameView->scrollOffset()));
// Hide until there's 10px showing.
« no previous file with comments | « Source/web/tests/TopControlsTest.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698