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

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

Issue 2875933006: [LayoutNG] Misc fixes in ShapingLineBreaker (Closed)
Patch Set: clang build fix 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_line_breaker.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
index e68ed9f1d38aaa18bfd29ff97c85f36ef5ec2c10..88ecb2771f4582ad5616f75a8017f9213f8373fa 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
@@ -169,9 +169,13 @@ void NGLineBreaker::BreakLine(NGInlineItemResults* item_results,
// has item-specific info as context. Should they be part of ShapeLine() to
// instantiate once, or is this just fine since instatiation is not
// expensive?
+ DCHECK_EQ(item.TextShapeResult()->CharacterStartIndex(),
+ item.StartOffset());
+ DCHECK_EQ(item.TextShapeResult()->CharacterStartIndex() +
+ item.TextShapeResult()->NumCharacters(),
+ item.EndOffset());
ShapingLineBreaker breaker(&shaper, &item.Style()->GetFont(),
- item.TextShapeResult(), item.Style()->Locale(),
- LineBreakType::kNormal);
+ item.TextShapeResult(), &break_iterator);
// TODO(kojii): Set item.StartOffset/EndOffset() to ShapingLineBreaker, or
// change ShapingLineBreaker to take the range from ShapeResult.
// item.TextShapeResult() does not have results for outside the item offset

Powered by Google App Engine
This is Rietveld 408576698