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

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

Issue 2515923002: Remove redundant 'derived constraint space' setters from NGConstraintSpace (Closed)
Patch Set: sync to the head Created 4 years, 1 month 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_block_layout_algorithm_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
index b8a8cd633153ffa9614864b79449c87e8ccc5dbd..1ad88aa0c857a407aadf61a150d23f43f794a132 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
@@ -167,10 +167,14 @@ TEST_F(NGBlockLayoutAlgorithmTest, CollapsingMarginsCase1) {
div1->SetFirstChild(div2);
- auto* space = ConstructConstraintSpace(
- HorizontalTopBottom, LTR,
- NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
- space->SetIsNewFormattingContext(true);
+ NGLogicalSize size(LayoutUnit(100), NGSizeIndefinite);
+ NGConstraintSpaceBuilder builder(HorizontalTopBottom);
+ builder.SetAvailableSize(size)
+ .SetPercentageResolutionSize(size)
+ .SetIsNewFormattingContext(true);
+ auto* space = new NGConstraintSpace(HorizontalTopBottom, LTR,
+ builder.ToConstraintSpace());
+
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
EXPECT_TRUE(frag->MarginStrut().IsEmpty());

Powered by Google App Engine
This is Rietveld 408576698