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

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

Issue 2888643004: [LayoutNG] Implement LayoutBR/preserved newlines and tabs (Closed)
Patch Set: Rebase Created 3 years, 7 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_layout_algorithm.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc
index 57d3ecf4d43df9f8e7f86ab546204b6491a410fe..af52537d6ba4928e6a4776c4e569dbc4e314213c 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc
@@ -236,13 +236,14 @@ bool NGInlineLayoutAlgorithm::PlaceItems(
for (auto& item_result : *line_items) {
const NGInlineItem& item = items[item_result.item_index];
- if (item.Type() == NGInlineItem::kText) {
+ if (item.Type() == NGInlineItem::kText ||
+ item.Type() == NGInlineItem::kControl) {
DCHECK(item.GetLayoutObject()->IsText());
DCHECK(!box->text_metrics.IsEmpty());
text_builder.SetSize(
{item_result.inline_size, box->text_metrics.LineHeight()});
// Take all used fonts into account if 'line-height: normal'.
- if (box->include_used_fonts) {
+ if (box->include_used_fonts && item.Type() == NGInlineItem::kText) {
box->AccumulateUsedFonts(item, item_result.start_offset,
item_result.end_offset, baseline_type_);
}

Powered by Google App Engine
This is Rietveld 408576698