Failed to apply patch for
third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:
While running git apply --index -p1;
error: patch failed:
third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:329
error: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:
patch does not apply
Patch:
third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
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),
- 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) {
https://codereview.chromium.org/2649583002/