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

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

Issue 2649583002: [LayoutNG] Remove the ng_layout_coordinator and temporary LayoutSync method. (Closed)
Patch Set: rebase v2 Created 3 years, 11 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_block_layout_algorithm.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
index da7045aed75364ac7cb299082175a5ea887bbbdb..7bce9eec0a277525c2b77e06c4a672741f34e506 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
@@ -219,10 +219,7 @@ bool NGBlockLayoutAlgorithm::ComputeMinAndMaxContentSizes(
return true;
}
-NGLayoutStatus NGBlockLayoutAlgorithm::Layout(
- NGPhysicalFragment* child_fragment,
- NGPhysicalFragment** fragment_out,
- NGLayoutAlgorithm** algorithm_out) {
+NGPhysicalFragment* NGBlockLayoutAlgorithm::Layout() {
WTF::Optional<MinAndMaxContentSizes> sizes;
if (NeedMinAndMaxContentSizes(ConstraintSpace(), Style())) {
// TODO(ikilpatrick): Change ComputeMinAndMaxContentSizes to return
@@ -291,13 +288,8 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout(
SpaceAvailableForCurrentChild() > LayoutUnit());
space_for_current_child_ = CreateConstraintSpaceForCurrentChild();
- NGFragment* fragment;
- current_child_->LayoutSync(space_for_current_child_, &fragment);
- NGPhysicalFragment* child_fragment = fragment->PhysicalFragment();
-
- // TODO(layout_ng): Seems like a giant hack to call this here.
- current_child_->UpdateLayoutBox(toNGPhysicalBoxFragment(child_fragment),
- space_for_current_child_);
+ NGPhysicalFragment* child_fragment =
+ current_child_->Layout(space_for_current_child_);
FinishCurrentChildLayout(new NGBoxFragment(
ConstraintSpace().WritingMode(), ConstraintSpace().Direction(),
@@ -322,12 +314,12 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout(
if (ConstraintSpace().HasBlockFragmentation())
FinalizeForFragmentation();
- *fragment_out = builder_->ToBoxFragment();
+ NGPhysicalFragment* fragment = builder_->ToBoxFragment();
for (auto& node : positioned_out_of_flow_children)
node->PositionUpdated();
- return kNewFragment;
+ return fragment;
}
void NGBlockLayoutAlgorithm::FinishCurrentChildLayout(NGFragment* fragment) {

Powered by Google App Engine
This is Rietveld 408576698