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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_block_node.cc

Issue 2709083002: Fix incorrectly painted right floats in LayoutNG (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 264
265 // Ensure the position of the children are copied across to the 265 // Ensure the position of the children are copied across to the
266 // LayoutObject tree. 266 // LayoutObject tree.
267 } else { 267 } else {
268 for (const auto& child_fragment : fragment_->Children()) { 268 for (const auto& child_fragment : fragment_->Children()) {
269 if (child_fragment->IsPlaced()) 269 if (child_fragment->IsPlaced())
270 FragmentPositionUpdated(toNGPhysicalBoxFragment(*child_fragment)); 270 FragmentPositionUpdated(toNGPhysicalBoxFragment(*child_fragment));
271 271
272 for (const auto& floating_object : child_fragment->PositionedFloats()) { 272 for (const auto& floating_object : child_fragment->PositionedFloats()) {
273 FloatingObjectPositionedUpdated(floating_object, layout_box_); 273 FloatingObjectPositionedUpdated(
274 floating_object, toLayoutBox(child_fragment->GetLayoutObject()));
274 } 275 }
275 } 276 }
276 } 277 }
277 278
278 if (layout_box_->isLayoutBlock()) 279 if (layout_box_->isLayoutBlock())
279 toLayoutBlock(layout_box_)->layoutPositionedObjects(true); 280 toLayoutBlock(layout_box_)->layoutPositionedObjects(true);
280 layout_box_->clearNeedsLayout(); 281 layout_box_->clearNeedsLayout();
281 if (layout_box_->isLayoutBlockFlow()) { 282 if (layout_box_->isLayoutBlockFlow()) {
282 toLayoutBlockFlow(layout_box_)->updateIsSelfCollapsing(); 283 toLayoutBlockFlow(layout_box_)->updateIsSelfCollapsing();
283 } 284 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // Save static position for legacy AbsPos layout. 348 // Save static position for legacy AbsPos layout.
348 void NGBlockNode::SaveStaticOffsetForLegacy(const NGLogicalOffset& offset) { 349 void NGBlockNode::SaveStaticOffsetForLegacy(const NGLogicalOffset& offset) {
349 DCHECK(layout_box_); 350 DCHECK(layout_box_);
350 DCHECK(layout_box_->isOutOfFlowPositioned()); 351 DCHECK(layout_box_->isOutOfFlowPositioned());
351 DCHECK(layout_box_->layer()); 352 DCHECK(layout_box_->layer());
352 layout_box_->layer()->setStaticBlockPosition(offset.block_offset); 353 layout_box_->layer()->setStaticBlockPosition(offset.block_offset);
353 layout_box_->layer()->setStaticInlinePosition(offset.inline_offset); 354 layout_box_->layer()->setStaticInlinePosition(offset.inline_offset);
354 } 355 }
355 356
356 } // namespace blink 357 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698