Index: third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc |
index edf7f115b885acad6d29652aa9ee053e7024206a..0e899b2d9dde283aecd56545163a386194251070 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc |
@@ -78,10 +78,10 @@ void NGOutOfFlowLayoutPart::Run() { |
if (IsContainingBlockForAbsoluteDescendant(container_style_, |
descendant->Style())) { |
NGLogicalOffset offset; |
- RefPtr<NGPhysicalFragment> physical_fragment = |
+ RefPtr<NGLayoutResult> result = |
LayoutDescendant(*descendant, static_position, &offset); |
// TODO(atotic) Need to adjust size of overflow rect per spec. |
- container_builder_->AddChild(std::move(physical_fragment), offset); |
+ container_builder_->AddChild(result, offset); |
ikilpatrick
2017/02/21 22:26:02
std::move needed?
cbiesinger
2017/02/22 18:09:01
Done.
|
} else { |
container_builder_->AddOutOfFlowDescendant(descendant, static_position); |
} |
@@ -95,7 +95,7 @@ void NGOutOfFlowLayoutPart::Run() { |
} |
} |
-RefPtr<NGPhysicalFragment> NGOutOfFlowLayoutPart::LayoutDescendant( |
+RefPtr<NGLayoutResult> NGOutOfFlowLayoutPart::LayoutDescendant( |
NGBlockNode& descendant, |
NGStaticPosition static_position, |
NGLogicalOffset* offset) { |
@@ -104,7 +104,7 @@ RefPtr<NGPhysicalFragment> NGOutOfFlowLayoutPart::LayoutDescendant( |
// relative to the container's padding box. |
static_position.offset -= container_border_physical_offset_; |
- RefPtr<NGPhysicalFragment> physical_fragment = nullptr; |
+ RefPtr<NGLayoutResult> layout_result = nullptr; |
Optional<MinAndMaxContentSizes> inline_estimate; |
Optional<LayoutUnit> block_estimate; |
@@ -118,12 +118,12 @@ RefPtr<NGPhysicalFragment> NGOutOfFlowLayoutPart::LayoutDescendant( |
inline_estimate); |
if (AbsoluteNeedsChildBlockSize(descendant.Style())) { |
- physical_fragment = |
- GenerateFragment(descendant, block_estimate, node_position); |
+ layout_result = GenerateFragment(descendant, block_estimate, node_position); |
// TODO(ikilpatrick): the writing mode switching here looks wrong. |
- NGBoxFragment fragment(container_space_->WritingMode(), |
- toNGPhysicalBoxFragment(physical_fragment.get())); |
+ NGBoxFragment fragment( |
+ container_space_->WritingMode(), |
+ toNGPhysicalBoxFragment(layout_result->PhysicalFragment().get())); |
block_estimate = fragment.BlockSize(); |
} |
@@ -133,12 +133,11 @@ RefPtr<NGPhysicalFragment> NGOutOfFlowLayoutPart::LayoutDescendant( |
&node_position); |
// Skip this step if we produced a fragment when estimating the block size. |
- if (!physical_fragment) { |
+ if (!layout_result) { |
block_estimate = |
node_position.size.ConvertToLogical(container_space_->WritingMode()) |
.block_size; |
- physical_fragment = |
- GenerateFragment(descendant, block_estimate, node_position); |
+ layout_result = GenerateFragment(descendant, block_estimate, node_position); |
} |
// Compute logical offset, NGAbsolutePhysicalPosition is calculated relative |
@@ -150,10 +149,10 @@ RefPtr<NGPhysicalFragment> NGOutOfFlowLayoutPart::LayoutDescendant( |
offset->block_offset = |
inset.block_start + container_border_offset_.block_offset; |
- return physical_fragment; |
+ return layout_result; |
} |
-RefPtr<NGPhysicalFragment> NGOutOfFlowLayoutPart::GenerateFragment( |
+RefPtr<NGLayoutResult> NGOutOfFlowLayoutPart::GenerateFragment( |
NGBlockNode& descendant, |
const Optional<LayoutUnit>& block_estimate, |
const NGAbsolutePhysicalPosition node_position) { |