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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Created 4 years, 2 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/ScrollingCoordinatorTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp b/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
index d6af90b93c2f8fbe084e48e38286cc1b4d3ff0e6..22f118015e43509d299352137d605688acc7c817 100644
--- a/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
@@ -210,8 +210,8 @@ TEST_F(ScrollingCoordinatorTest, fastFractionalScrollingDiv) {
WebLayer* webScrollLayer =
compositedLayerMapping->scrollingContentsLayer()->platformLayer();
ASSERT_TRUE(webScrollLayer);
- ASSERT_NEAR(1.2, webScrollLayer->scrollPositionDouble().x, 0.01);
- ASSERT_NEAR(1.2, webScrollLayer->scrollPositionDouble().y, 0.01);
+ ASSERT_NEAR(1.2f, webScrollLayer->scrollOffset().width, 0.01f);
+ ASSERT_NEAR(1.2f, webScrollLayer->scrollOffset().height, 0.01f);
RuntimeEnabledFeatures::setFractionalScrollOffsetsEnabled(
origFractionalOffsetsEnabled);
@@ -603,7 +603,7 @@ TEST_F(ScrollingCoordinatorTest, rtlIframe) {
int expectedScrollPosition =
958 +
(innerFrameView->verticalScrollbar()->isOverlayScrollbar() ? 0 : 15);
- ASSERT_EQ(expectedScrollPosition, webScrollLayer->scrollPositionDouble().x);
+ ASSERT_EQ(expectedScrollPosition, webScrollLayer->scrollOffset().width);
}
TEST_F(ScrollingCoordinatorTest, setupScrollbarLayerShouldNotCrash) {

Powered by Google App Engine
This is Rietveld 408576698