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

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

Issue 2931563002: [LayoutNG] Implement 'text-align-last' (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 39825864db8b0243dc48d9dc51992bcb18db3302..0071e5404fcd405c9e3281a2fb6507c9a5ea6c4e 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
@@ -359,21 +359,17 @@ static LayoutUnit ComputeContentSize(NGInlineNode node,
.ToConstraintSpace(writing_mode);
NGLineBreaker line_breaker(node, space.Get());
NGInlineLayoutAlgorithm algorithm(node, space.Get());
- NGInlineItemResults item_results;
+ NGLineInfo line_info;
LayoutUnit result;
- while (true) {
- line_breaker.NextLine(&item_results, &algorithm);
- if (item_results.IsEmpty())
- break;
+ while (line_breaker.NextLine(&line_info, &algorithm)) {
LayoutUnit inline_size;
- for (const NGInlineItemResult item_result : item_results)
+ for (const NGInlineItemResult item_result : line_info.Results())
inline_size += item_result.inline_size;
if (mode == ContentSizeMode::Max) {
result = std::max(inline_size, result);
} else {
result += inline_size;
}
- item_results.clear();
}
return result;
}

Powered by Google App Engine
This is Rietveld 408576698