OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/layout/ng/ng_block_node.h" | 5 #include "core/layout/ng/ng_block_node.h" |
6 | 6 |
7 #include "core/layout/LayoutBlockFlow.h" | 7 #include "core/layout/LayoutBlockFlow.h" |
8 #include "core/layout/api/LineLayoutAPIShim.h" | 8 #include "core/layout/api/LineLayoutAPIShim.h" |
9 #include "core/layout/line/InlineIterator.h" | 9 #include "core/layout/line/InlineIterator.h" |
10 #include "core/layout/ng/layout_ng_block_flow.h" | 10 #include "core/layout/ng/layout_ng_block_flow.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 267 } |
268 | 268 |
269 // Ensure the position of the children are copied across to the | 269 // Ensure the position of the children are copied across to the |
270 // LayoutObject tree. | 270 // LayoutObject tree. |
271 } else { | 271 } else { |
272 for (const auto& child_fragment : fragment_->Children()) { | 272 for (const auto& child_fragment : fragment_->Children()) { |
273 if (child_fragment->IsPlaced()) | 273 if (child_fragment->IsPlaced()) |
274 FragmentPositionUpdated(toNGPhysicalBoxFragment(*child_fragment)); | 274 FragmentPositionUpdated(toNGPhysicalBoxFragment(*child_fragment)); |
275 | 275 |
276 for (const auto& floating_object : child_fragment->PositionedFloats()) { | 276 for (const auto& floating_object : child_fragment->PositionedFloats()) { |
277 FloatingObjectPositionedUpdated(floating_object, layout_box_); | 277 FloatingObjectPositionedUpdated( |
| 278 floating_object, toLayoutBox(child_fragment->GetLayoutObject())); |
278 } | 279 } |
279 } | 280 } |
280 } | 281 } |
281 | 282 |
282 if (layout_box_->isLayoutBlock()) | 283 if (layout_box_->isLayoutBlock()) |
283 toLayoutBlock(layout_box_)->layoutPositionedObjects(true); | 284 toLayoutBlock(layout_box_)->layoutPositionedObjects(true); |
284 layout_box_->clearNeedsLayout(); | 285 layout_box_->clearNeedsLayout(); |
285 if (layout_box_->isLayoutBlockFlow()) { | 286 if (layout_box_->isLayoutBlockFlow()) { |
286 toLayoutBlockFlow(layout_box_)->updateIsSelfCollapsing(); | 287 toLayoutBlockFlow(layout_box_)->updateIsSelfCollapsing(); |
287 } | 288 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // Save static position for legacy AbsPos layout. | 352 // Save static position for legacy AbsPos layout. |
352 void NGBlockNode::SaveStaticOffsetForLegacy(const NGLogicalOffset& offset) { | 353 void NGBlockNode::SaveStaticOffsetForLegacy(const NGLogicalOffset& offset) { |
353 DCHECK(layout_box_); | 354 DCHECK(layout_box_); |
354 DCHECK(layout_box_->isOutOfFlowPositioned()); | 355 DCHECK(layout_box_->isOutOfFlowPositioned()); |
355 DCHECK(layout_box_->layer()); | 356 DCHECK(layout_box_->layer()); |
356 layout_box_->layer()->setStaticBlockPosition(offset.block_offset); | 357 layout_box_->layer()->setStaticBlockPosition(offset.block_offset); |
357 layout_box_->layer()->setStaticInlinePosition(offset.inline_offset); | 358 layout_box_->layer()->setStaticInlinePosition(offset.inline_offset); |
358 } | 359 } |
359 | 360 |
360 } // namespace blink | 361 } // namespace blink |
OLD | NEW |