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

Unified Diff: third_party/WebKit/Source/platform/text/TextBreakIterator.cpp

Issue 2686583003: Fix line break at element boundary when 8bit element follows 16bit (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/text/line-break-8bit-after-16bit-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 438911f1b266e8dde4fe5ea287042213dd3d4689..a908f0a8980611e4e578fef72c7e06ce187e17bb 100644
--- a/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp
+++ b/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp
@@ -255,12 +255,9 @@ static inline int nextBreakablePosition(
int len = static_cast<int>(length);
int nextBreak = -1;
- CharacterType lastLastCh =
- pos > 1 ? str[pos - 2] : static_cast<CharacterType>(
- lazyBreakIterator.secondToLastCharacter());
- CharacterType lastCh =
- pos > 0 ? str[pos - 1]
- : static_cast<CharacterType>(lazyBreakIterator.lastCharacter());
+ UChar lastLastCh =
+ pos > 1 ? str[pos - 2] : lazyBreakIterator.secondToLastCharacter();
+ UChar lastCh = pos > 0 ? str[pos - 1] : lazyBreakIterator.lastCharacter();
ULineBreak lastLineBreak;
if (lineBreakType == LineBreakType::BreakAll)
lastLineBreak = lineBreakPropertyValue(lastLastCh, lastCh);
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/text/line-break-8bit-after-16bit-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698