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

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

Issue 2735703005: [LayoutNG] Out-of-flow positioned objects in inline (Closed)
Patch Set: Rebase Created 3 years, 9 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_inline_node.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc b/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc
index a4ba2f3b96f0f3b5b0262ac6146353479ee8ba6a..3e7717dc3583338c6bc58bf0beb331d99bd0bf57 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc
@@ -92,7 +92,10 @@ void NGInlineNode::CollectInlines(LayoutObject* start,
builder->SetIsSVGText(node->isSVGInlineText());
builder->Append(toLayoutText(node)->text(), node->style(), node);
} else if (node->isFloating() || node->isOutOfFlowPositioned()) {
- // Skip positioned objects.
+ // Add floats and positioned objects in the same way as atomic inlines.
+ // Because these objects need positions, they will be handled in
+ // NGLineBuilder.
+ builder->Append(objectReplacementCharacter, nullptr, node);
} else if (!node->isInline()) {
// TODO(kojii): Implement when inline has block children.
} else {
@@ -273,7 +276,7 @@ MinMaxContentSize NGInlineNode::ComputeMinMaxContentSize() {
.SetTextDirection(BlockStyle()->direction())
.SetAvailableSize({LayoutUnit(), NGSizeIndefinite})
.ToConstraintSpace(writing_mode);
- NGLineBuilder line_builder(this, constraint_space.get());
+ NGLineBuilder line_builder(this, constraint_space.get(), nullptr);
LayoutInline(constraint_space.get(), &line_builder);
MinMaxContentSize sizes;
sizes.min_content = line_builder.MaxInlineSize();

Powered by Google App Engine
This is Rietveld 408576698