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

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

Issue 2700683002: [LayoutNG] Fix incorrectly positioned empty blocks inside of new BFC (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
index 7e8127a48780df6ce49966c3c011861e117d73f2..8f593a24d6b74e872c42773fef3f260e0943d3da 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
@@ -246,6 +246,10 @@ void NGBlockNode::CopyFragmentDataToLayoutBox(
intrinsic_logical_height -= border_and_padding.BlockSum();
layout_box_->setIntrinsicContentLogicalHeight(intrinsic_logical_height);
+ for (const auto& floating_object : fragment_->PositionedFloats()) {
+ FloatingObjectPositionedUpdated(floating_object, layout_box_);
+ }
+
// TODO(layout-dev): Currently we are not actually performing layout on
// inline children. For now just clear the needsLayout bit so that we can
// run unittests.
@@ -263,10 +267,6 @@ void NGBlockNode::CopyFragmentDataToLayoutBox(
for (const auto& child_fragment : fragment_->Children()) {
if (child_fragment->IsPlaced())
FragmentPositionUpdated(toNGPhysicalBoxFragment(*child_fragment));
-
- for (const auto& floating_object : child_fragment->PositionedFloats()) {
- FloatingObjectPositionedUpdated(floating_object, layout_box_);
- }
}
}

Powered by Google App Engine
This is Rietveld 408576698