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

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: fixup comments. 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 238c3b0dc9b0e67b3b35ff7d137341c747ca0ecb..045d35587316e7401d7946b5f2af492f3e2d92ba 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),
cbiesinger 2017/01/20 21:21:56 Oh I see... this was only needed because we did no
ikilpatrick 2017/01/20 23:19:57 Yeah going through the boxes now might make things
- space_for_current_child_);
+ NGPhysicalFragment* child_fragment =
+ current_child_->Layout(space_for_current_child_);
FinishCurrentChildLayout(new NGBoxFragment(
ConstraintSpace().WritingMode(), ConstraintSpace().Direction(),
@@ -329,8 +321,7 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout(
if (ConstraintSpace().HasBlockFragmentation())
FinalizeForFragmentation();
- *fragment_out = builder_->ToBoxFragment();
- return kNewFragment;
+ return builder_->ToBoxFragment();
}
void NGBlockLayoutAlgorithm::FinishCurrentChildLayout(NGFragment* fragment) {

Powered by Google App Engine
This is Rietveld 408576698