Chromium Code Reviews| Index: third_party/WebKit/Source/platform/text/TextBreakIterator.cpp |
| diff --git a/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp b/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp |
| index 33fbe792da4cadcdec7aa6a7641570e0f0c3ed5b..3af733ca07e854f8e495bf6ef1a11e7a1cc89deb 100644 |
| --- a/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp |
| +++ b/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp |
| @@ -391,7 +391,7 @@ int LazyLineBreakIterator::NextBreakablePositionKeepAll(int pos) const { |
| } |
| unsigned LazyLineBreakIterator::NextBreakOpportunity(unsigned offset) const { |
| - int next_break = 0; |
| + int next_break = -1; |
| IsBreakable(offset, next_break); |
|
ikilpatrick
2017/05/30 16:05:26
Can just be IsBreakable(offset) ?
kojii
2017/05/30 17:56:18
I need to return next_break (this is reference) he
|
| return next_break; |
| } |
| @@ -400,8 +400,7 @@ unsigned LazyLineBreakIterator::PreviousBreakOpportunity(unsigned offset, |
| unsigned min) const { |
| unsigned pos = std::min(offset, string_.length()); |
| for (; pos > min; pos--) { |
| - int next_break = 0; |
| - if (IsBreakable(pos, next_break)) |
| + if (IsBreakable(pos)) |
| return pos; |
| } |
| return min; |