Commit f780e9be authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[LayoutNG] Avoid copying NGOutOfFlowPositionedDescendant

Bug: 635619
Change-Id: I5f2992f95f755e56c34ce5a89c5185ae31b6537f
Reviewed-on: https://chromium-review.googlesource.com/c/1333010Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607517}
parent cdc86f4b
......@@ -65,7 +65,7 @@ void LayoutNGBlockFlow::UpdateBlockLayout(bool relayout_children) {
scoped_refptr<NGLayoutResult> result =
NGBlockNode(this).Layout(constraint_space);
for (NGOutOfFlowPositionedDescendant descendant :
for (const NGOutOfFlowPositionedDescendant& descendant :
result->OutOfFlowPositionedDescendants())
descendant.node.UseOldOutOfFlowPositioning();
......
......@@ -977,7 +977,7 @@ void NGBlockNode::UpdateShapeOutsideInfoIfNeeded(
percentage_resolution_inline_size);
}
void NGBlockNode::UseOldOutOfFlowPositioning() {
void NGBlockNode::UseOldOutOfFlowPositioning() const {
DCHECK(box_->IsOutOfFlowPositioned());
box_->ContainingBlock()->InsertPositionedObject(box_);
}
......
......@@ -87,7 +87,7 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
// Called if this is an out-of-flow block which needs to be
// positioned with legacy layout.
void UseOldOutOfFlowPositioning();
void UseOldOutOfFlowPositioning() const;
// Save static position for legacy AbsPos layout.
void SaveStaticOffsetForLegacy(const NGLogicalOffset&,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment