Test for word-break in 16-bit text as well as 8-bit. Bug 249159 r=jfkthame
authorSimon Montagu <smontagu@smontagu.org>
Mon, 07 May 2012 12:18:23 -0700
changeset 93400 2998b1105a1140f0ec95db658b27e68d28780c63
parent 93399 4acd1e285cc4dfbb4fd64290574ef4eb7a5d99dd
child 93401 78c508bfee65fa90fc86b05042075de78f7964b8
push id22634
push useremorley@mozilla.com
push dateTue, 08 May 2012 09:48:43 +0000
treeherdermozilla-central@e4f9e2eab6b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs249159
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Test for word-break in 16-bit text as well as 8-bit. Bug 249159 r=jfkthame
content/base/src/nsLineBreaker.cpp
--- a/content/base/src/nsLineBreaker.cpp
+++ b/content/base/src/nsLineBreaker.cpp
@@ -250,17 +250,18 @@ nsLineBreaker::AppendText(nsIAtom* aLang
 
   for (;;) {
     PRUnichar ch = aText[offset];
     bool isSpace = IsSpace(ch);
     bool isBreakableSpace = isSpace && !(aFlags & BREAK_SUPPRESS_INSIDE);
 
     if (aSink) {
       breakState[offset] =
-        mBreakHere || (mAfterBreakableSpace && !isBreakableSpace) ?
+        mBreakHere || (mAfterBreakableSpace && !isBreakableSpace) ||
+        (mWordBreak == nsILineBreaker::kWordBreak_BreakAll)  ?
           gfxTextRun::CompressedGlyph::FLAG_BREAK_TYPE_NORMAL :
           gfxTextRun::CompressedGlyph::FLAG_BREAK_TYPE_NONE;
     }
     mBreakHere = false;
     mAfterBreakableSpace = isBreakableSpace;
 
     if (isSpace) {
       if (offset > wordStart && aSink) {