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

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

Issue 2921463004: [LayoutNG] PODify NGLayoutInputNode and sub-classes. (Closed)
Patch Set: new ng-bot expectations Created 3 years, 6 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/inline/ng_inline_layout_algorithm_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
index 45b67761719b614f7d0d7e724a2012c9f0c95ed2..ec2e95d61f368f0450a8387f26152d04dfa0993c 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
@@ -39,14 +39,13 @@ TEST_F(NGInlineLayoutAlgorithmTest, BreakToken) {
// Perform 1st Layout.
LayoutNGBlockFlow* block_flow =
ToLayoutNGBlockFlow(GetLayoutObjectByElementId("container"));
- NGInlineNode* inline_node =
- new NGInlineNode(block_flow->FirstChild(), block_flow);
+ NGInlineNode inline_node(block_flow, block_flow->FirstChild());
RefPtr<NGConstraintSpace> constraint_space =
NGConstraintSpaceBuilder(NGWritingMode::kHorizontalTopBottom)
.SetAvailableSize({LayoutUnit(50), LayoutUnit(20)})
.ToConstraintSpace(NGWritingMode::kHorizontalTopBottom);
RefPtr<NGLayoutResult> layout_result =
- inline_node->Layout(constraint_space.Get(), nullptr);
+ inline_node.Layout(constraint_space.Get(), nullptr);
auto* wrapper =
ToNGPhysicalBoxFragment(layout_result->PhysicalFragment().Get());
@@ -65,7 +64,7 @@ TEST_F(NGInlineLayoutAlgorithmTest, BreakToken) {
// Perform 2nd layout with the break token from the 2nd line.
RefPtr<NGLayoutResult> layout_result2 =
- inline_node->Layout(constraint_space.Get(), line2->BreakToken());
+ inline_node.Layout(constraint_space.Get(), line2->BreakToken());
auto* wrapper2 =
ToNGPhysicalBoxFragment(layout_result2->PhysicalFragment().Get());
@@ -97,11 +96,10 @@ TEST_F(NGInlineLayoutAlgorithmTest, MAYBE_VerticalAlignBottomReplaced) {
)HTML");
LayoutNGBlockFlow* block_flow =
ToLayoutNGBlockFlow(GetLayoutObjectByElementId("container"));
- NGInlineNode* inline_node =
- new NGInlineNode(block_flow->FirstChild(), block_flow);
+ NGInlineNode inline_node(block_flow, block_flow->FirstChild());
RefPtr<NGConstraintSpace> space =
NGConstraintSpace::CreateFromLayoutObject(*block_flow);
- RefPtr<NGLayoutResult> layout_result = inline_node->Layout(space.Get());
+ RefPtr<NGLayoutResult> layout_result = inline_node.Layout(space.Get());
auto* wrapper =
ToNGPhysicalBoxFragment(layout_result->PhysicalFragment().Get());
EXPECT_EQ(1u, wrapper->Children().size());

Powered by Google App Engine
This is Rietveld 408576698