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

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

Issue 2871733003: [LayoutNG] Refactor NGLineBreaker for ShapingLineBreaker (Closed)
Patch Set: Cleanup 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_break_token.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_break_token.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_break_token.cc
index a58aff8eb3b0f4b3c19012f799fb73f3252b7bf6..e9638b4b2814f2b8c63d5704f8de80d296725e6f 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_break_token.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_break_token.cc
@@ -13,7 +13,10 @@ NGInlineBreakToken::NGInlineBreakToken(NGInlineNode* node,
unsigned text_offset)
: NGBreakToken(kInlineBreakToken, kUnfinished, node),
item_index_(item_index),
- text_offset_(text_offset) {}
+ text_offset_(text_offset) {
+ // Use nullptr for the initial layout, rather than (0, 0) break token.
+ DCHECK(item_index || text_offset);
+}
NGInlineBreakToken::NGInlineBreakToken(NGLayoutInputNode* node)
: NGBreakToken(kInlineBreakToken, kFinished, node),
« no previous file with comments | « third_party/WebKit/Source/core/layout/BUILD.gn ('k') | third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698