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

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

Issue 1919453002: Support for mapping from outer/visual to flowthread coord space in nested multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add assert. Created 4 years, 8 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/core/layout/LayoutMultiColumnSet.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/MapCoordinatesTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/MapCoordinatesTest.cpp b/third_party/WebKit/Source/core/layout/MapCoordinatesTest.cpp
index 086bd8d982d2605353ad69deaed12cb65d086a4e..06c5ae0c035142a85c3b9239d80aba32e6728f66 100644
--- a/third_party/WebKit/Source/core/layout/MapCoordinatesTest.cpp
+++ b/third_party/WebKit/Source/core/layout/MapCoordinatesTest.cpp
@@ -575,21 +575,29 @@ TEST_F(MapCoordinatesTest, NestedMulticolWithBlock)
FloatPoint mappedPoint = mapLocalToAncestor(target, outerMulticol, FloatPoint());
EXPECT_EQ(FloatPoint(435, 115), mappedPoint);
-
- // TODO(mstensho): Add mapAncestorToLocal() tests when it starts working in nested multicol.
+ mappedPoint = mapAncestorToLocal(target, outerMulticol, mappedPoint);
+ EXPECT_EQ(FloatPoint(), mappedPoint);
// Walk each ancestor in the chain separately, to verify each step on the way.
mappedPoint = mapLocalToAncestor(target, innerFlowThread, FloatPoint());
EXPECT_EQ(FloatPoint(0, 630), mappedPoint);
+ mappedPoint = mapAncestorToLocal(target, innerFlowThread, mappedPoint);
+ EXPECT_EQ(FloatPoint(), mappedPoint);
- mappedPoint = mapLocalToAncestor(innerFlowThread, innerMulticol, mappedPoint);
+ mappedPoint = mapLocalToAncestor(innerFlowThread, innerMulticol, FloatPoint(0, 630));
EXPECT_EQ(FloatPoint(140, 305), mappedPoint);
+ mappedPoint = mapAncestorToLocal(innerFlowThread, innerMulticol, mappedPoint);
+ EXPECT_EQ(FloatPoint(0, 630), mappedPoint);
- mappedPoint = mapLocalToAncestor(innerMulticol, outerFlowThread, mappedPoint);
+ mappedPoint = mapLocalToAncestor(innerMulticol, outerFlowThread, FloatPoint(140, 305));
EXPECT_EQ(FloatPoint(140, 315), mappedPoint);
+ mappedPoint = mapAncestorToLocal(innerMulticol, outerFlowThread, mappedPoint);
+ EXPECT_EQ(FloatPoint(140, 305), mappedPoint);
- mappedPoint = mapLocalToAncestor(outerFlowThread, outerMulticol, mappedPoint);
+ mappedPoint = mapLocalToAncestor(outerFlowThread, outerMulticol, FloatPoint(140, 315));
EXPECT_EQ(FloatPoint(435, 115), mappedPoint);
+ mappedPoint = mapAncestorToLocal(outerFlowThread, outerMulticol, mappedPoint);
+ EXPECT_EQ(FloatPoint(140, 315), mappedPoint);
}
TEST_F(MapCoordinatesTest, MulticolWithAbsPosInRelPos)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698