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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_base_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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/ng/ng_base_layout_algorithm_test.h" 5 #include "core/layout/ng/ng_base_layout_algorithm_test.h"
6 6
7 #include "core/layout/ng/layout_ng_block_flow.h" 7 #include "core/layout/ng/layout_ng_block_flow.h"
8 #include "core/layout/ng/ng_block_layout_algorithm.h" 8 #include "core/layout/ng/ng_block_layout_algorithm.h"
9 #include "core/layout/ng/ng_layout_result.h" 9 #include "core/layout/ng/ng_layout_result.h"
10 #include "core/layout/ng/ng_physical_fragment.h" 10 #include "core/layout/ng/ng_physical_fragment.h"
(...skipping 10 matching lines...) Expand all
21 21
22 void NGBaseLayoutAlgorithmTest::SetUp() { 22 void NGBaseLayoutAlgorithmTest::SetUp() {
23 RenderingTest::SetUp(); 23 RenderingTest::SetUp();
24 EnableCompositing(); 24 EnableCompositing();
25 } 25 }
26 26
27 std::pair<RefPtr<NGPhysicalBoxFragment>, RefPtr<NGConstraintSpace>> 27 std::pair<RefPtr<NGPhysicalBoxFragment>, RefPtr<NGConstraintSpace>>
28 NGBaseLayoutAlgorithmTest::RunBlockLayoutAlgorithmForElement(Element* element) { 28 NGBaseLayoutAlgorithmTest::RunBlockLayoutAlgorithmForElement(Element* element) {
29 LayoutNGBlockFlow* block_flow = 29 LayoutNGBlockFlow* block_flow =
30 ToLayoutNGBlockFlow(element->GetLayoutObject()); 30 ToLayoutNGBlockFlow(element->GetLayoutObject());
31 NGBlockNode* node = new NGBlockNode(block_flow); 31 NGBlockNode node(block_flow);
32 RefPtr<NGConstraintSpace> space = 32 RefPtr<NGConstraintSpace> space =
33 NGConstraintSpace::CreateFromLayoutObject(*block_flow); 33 NGConstraintSpace::CreateFromLayoutObject(*block_flow);
34 34
35 RefPtr<NGLayoutResult> result = 35 RefPtr<NGLayoutResult> result =
36 NGBlockLayoutAlgorithm(node, space.Get()).Layout(); 36 NGBlockLayoutAlgorithm(node, space.Get()).Layout();
37 return std::make_pair( 37 return std::make_pair(
38 ToNGPhysicalBoxFragment(result->PhysicalFragment().Get()), space); 38 ToNGPhysicalBoxFragment(result->PhysicalFragment().Get()), space);
39 } 39 }
40 40
41 } // namespace blink 41 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698