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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc

Issue 2334873002: [LayoutNG] Don't implement ContainerSize() using the physical constraint space. (Closed)
Patch Set: Created 4 years, 3 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/ng/ng_constraint_space_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc
index 6daea5c8b16cda8bac7df7ed3aceeda039fb119e..bc4ad51cfcae944ec2a3e0fabbd311e954e8bf65 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc
@@ -88,6 +88,21 @@ TEST(NGConstraintSpaceTest, LayoutOpportunitiesOneExclusion) {
EXPECT_EQ(nullptr, secondOpportunity);
}
+TEST(NGConstraintSpaceTest, ContainerSize) {
+ NGPhysicalSize physical_size;
+ physical_size.width = LayoutUnit(800);
+ physical_size.height = LayoutUnit(600);
+ auto* physical_space = new NGPhysicalConstraintSpace(physical_size);
+
+ auto* space = new NGConstraintSpace(HorizontalTopBottom, physical_space);
+ auto* derived_space =
+ new NGConstraintSpace(*space, NGLogicalOffset(),
+ NGLogicalSize(LayoutUnit(200), LayoutUnit(300)));
+
+ EXPECT_EQ(LayoutUnit(200), derived_space->ContainerSize().inline_size);
+ EXPECT_EQ(LayoutUnit(300), derived_space->ContainerSize().block_size);
+}
+
} // namespace
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc ('k') | third_party/WebKit/Source/core/layout/ng/ng_units.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698