mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1553874 - Skip calling in to GetJISx4051Breaks when line-break:anywhere is in effect. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D32448 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
a78fb97ef2
commit
56105e859f
@ -249,7 +249,11 @@ nsresult nsLineBreaker::AppendText(nsAtom* aHyphenationLanguage,
|
||||
if (isSpace || ch == '\n') {
|
||||
if (offset > wordStart && aSink) {
|
||||
if (!(aFlags & BREAK_SUPPRESS_INSIDE)) {
|
||||
if (wordHasComplexChar) {
|
||||
if (mStrictness == LineBreaker::Strictness::Anywhere) {
|
||||
memset(breakState.Elements() + wordStart,
|
||||
gfxTextRun::CompressedGlyph::FLAG_BREAK_TYPE_NORMAL,
|
||||
offset - wordStart);
|
||||
} else if (wordHasComplexChar) {
|
||||
// Save current start-of-word state because GetJISx4051Breaks will
|
||||
// set it to false
|
||||
uint8_t currentStart = breakState[wordStart];
|
||||
@ -407,8 +411,12 @@ nsresult nsLineBreaker::AppendText(nsAtom* aHyphenationLanguage,
|
||||
mAfterBreakableSpace = isBreakableSpace;
|
||||
|
||||
if (isSpace) {
|
||||
if (offset > wordStart && wordHasComplexChar) {
|
||||
if (aSink && !(aFlags & BREAK_SUPPRESS_INSIDE)) {
|
||||
if (offset > wordStart && aSink && !(aFlags & BREAK_SUPPRESS_INSIDE)) {
|
||||
if (mStrictness == LineBreaker::Strictness::Anywhere) {
|
||||
memset(breakState.Elements() + wordStart,
|
||||
gfxTextRun::CompressedGlyph::FLAG_BREAK_TYPE_NORMAL,
|
||||
offset - wordStart);
|
||||
} else if (wordHasComplexChar) {
|
||||
// Save current start-of-word state because GetJISx4051Breaks will
|
||||
// set it to false
|
||||
uint8_t currentStart = breakState[wordStart];
|
||||
@ -417,9 +425,9 @@ nsresult nsLineBreaker::AppendText(nsAtom* aHyphenationLanguage,
|
||||
mScriptIsChineseOrJapanese, breakState.Elements() + wordStart);
|
||||
breakState[wordStart] = currentStart;
|
||||
}
|
||||
wordHasComplexChar = false;
|
||||
}
|
||||
|
||||
wordHasComplexChar = false;
|
||||
++offset;
|
||||
if (offset >= aLength) break;
|
||||
wordStart = offset;
|
||||
|
Loading…
Reference in New Issue
Block a user