Bug 1275059 - Simple fix for this bug. r=jfkthame
authorXidorn Quan <me@upsuper.org>
Wed, 25 May 2016 09:54:37 +1000
changeset 298815 cb2c2fdd7ea7ff410a7e22293d7bb3caccb58fa4
parent 298814 0ab9f64ac47cd6ce83e645fe5720db97b491c5fc
child 298816 c8be8ae4cf532b21e261faf43b4360c534286bbf
push id77329
push userxquan@mozilla.com
push dateTue, 24 May 2016 23:55:05 +0000
treeherdermozilla-inbound@c8be8ae4cf53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1275059
milestone49.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
Bug 1275059 - Simple fix for this bug. r=jfkthame MozReview-Commit-ID: IVScO6eV6RP
layout/generic/nsTextFrame.cpp
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -7910,17 +7910,17 @@ nsTextFrame::AddInlineMinISizeForFlow(ns
   bool preformatNewlines = textStyle->NewlineIsSignificant(this);
   bool preformatTabs = textStyle->WhiteSpaceIsSignificant();
   gfxFloat tabWidth = -1;
   uint32_t start =
     FindStartAfterSkippingWhitespace(&provider, aData, textStyle, &iter, flowEndInTextRun);
 
   // text-combine-upright frame is constantly 1em on inline-axis.
   if (StyleContext()->IsTextCombined()) {
-    if (textRun->CanBreakLineBefore(start)) {
+    if (start < flowEndInTextRun && textRun->CanBreakLineBefore(start)) {
       aData->OptionallyBreak();
     }
     aData->mCurrentLine += provider.GetFontMetrics()->EmHeight();
     aData->mTrailingWhitespace = 0;
     return;
   }
 
   AutoTArray<bool,BIG_TEXT_NODE_SIZE> hyphBuffer;