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

Unified Diff: third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp

Issue 2015523004: Don't explicitly initialize LayoutUnit to 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Go through the subdirs of core/layout/ too. Created 4 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
Index: third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp b/third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp
index 7c03b795357f003b092eab2558f5002b96cb771d..16266d3b97fb408ee2fbec9f287f161d88745d05 100644
--- a/third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp
+++ b/third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp
@@ -231,8 +231,8 @@ TEST_F(VisualRectMappingTest, ContainerOverflowScroll)
"</div>");
LayoutBlock* container = toLayoutBlock(getLayoutObjectByElementId("container"));
- EXPECT_EQ(LayoutUnit(0), container->scrollTop());
- EXPECT_EQ(LayoutUnit(0), container->scrollLeft());
+ EXPECT_EQ(LayoutUnit(), container->scrollTop());
+ EXPECT_EQ(LayoutUnit(), container->scrollLeft());
container->setScrollTop(LayoutUnit(7));
container->setScrollLeft(LayoutUnit(8));
document().view()->updateAllLifecyclePhases();
@@ -287,7 +287,7 @@ TEST_F(VisualRectMappingTest, ContainerFlippedWritingModeAndOverflowScroll)
"</div>");
LayoutBlock* container = toLayoutBlock(getLayoutObjectByElementId("container"));
- EXPECT_EQ(LayoutUnit(0), container->scrollTop());
+ EXPECT_EQ(LayoutUnit(), container->scrollTop());
// The initial scroll offset is to the left-most because of flipped blocks writing mode.
// 150 = total_layout_overflow(100 + 100) - width(50)
EXPECT_EQ(LayoutUnit(150), container->scrollLeft());
@@ -350,8 +350,8 @@ TEST_F(VisualRectMappingTest, ContainerOverflowHidden)
"</div>");
LayoutBlock* container = toLayoutBlock(getLayoutObjectByElementId("container"));
- EXPECT_EQ(LayoutUnit(0), container->scrollTop());
- EXPECT_EQ(LayoutUnit(0), container->scrollLeft());
+ EXPECT_EQ(LayoutUnit(), container->scrollTop());
+ EXPECT_EQ(LayoutUnit(), container->scrollLeft());
container->setScrollTop(LayoutUnit(27));
container->setScrollLeft(LayoutUnit(28));
document().view()->updateAllLifecyclePhases();
@@ -382,7 +382,7 @@ TEST_F(VisualRectMappingTest, ContainerFlippedWritingModeAndOverflowHidden)
"</div>");
LayoutBlock* container = toLayoutBlock(getLayoutObjectByElementId("container"));
- EXPECT_EQ(LayoutUnit(0), container->scrollTop());
+ EXPECT_EQ(LayoutUnit(), container->scrollTop());
// The initial scroll offset is to the left-most because of flipped blocks writing mode.
// 150 = total_layout_overflow(100 + 100) - width(50)
EXPECT_EQ(LayoutUnit(150), container->scrollLeft());
@@ -420,7 +420,7 @@ TEST_F(VisualRectMappingTest, ContainerAndTargetDifferentFlippedWritingMode)
"</div>");
LayoutBlock* container = toLayoutBlock(getLayoutObjectByElementId("container"));
- EXPECT_EQ(LayoutUnit(0), container->scrollTop());
+ EXPECT_EQ(LayoutUnit(), container->scrollTop());
// The initial scroll offset is to the left-most because of flipped blocks writing mode.
// 150 = total_layout_overflow(100 + 100) - width(50)
EXPECT_EQ(LayoutUnit(150), container->scrollLeft());

Powered by Google App Engine
This is Rietveld 408576698