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

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

Issue 2930963002: [LayoutNG] Refactor of NGLineBreaker. (Closed)
Patch Set: rebase Created 3 years, 6 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/inline/ng_inline_node.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc
index 0071e5404fcd405c9e3281a2fb6507c9a5ea6c4e..a7769672fead627c8b0e76b01a1809d9751df38b 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc
@@ -357,11 +357,14 @@ static LayoutUnit ComputeContentSize(NGInlineNode node,
.SetTextDirection(style.Direction())
.SetAvailableSize({available_inline_size, NGSizeIndefinite})
.ToConstraintSpace(writing_mode);
- NGLineBreaker line_breaker(node, space.Get());
- NGInlineLayoutAlgorithm algorithm(node, space.Get());
+
+ NGFragmentBuilder container_builder(
+ NGPhysicalFragment::NGFragmentType::kFragmentBox, node);
+
+ NGLineBreaker line_breaker(node, space.Get(), &container_builder);
NGLineInfo line_info;
LayoutUnit result;
- while (line_breaker.NextLine(&line_info, &algorithm)) {
+ while (line_breaker.NextLine(&line_info, NGLogicalOffset())) {
LayoutUnit inline_size;
for (const NGInlineItemResult item_result : line_info.Results())
inline_size += item_result.inline_size;

Powered by Google App Engine
This is Rietveld 408576698