Bug 1275059 - Simple fix for this bug. r=jfkthame, a=sylvestre
authorXidorn Quan <me@upsuper.org>
Wed, 25 May 2016 09:54:37 +1000
changeset 333123 f2a42f8eda64ebda82a08b542df7d30082859b02
parent 333122 0389431b7aad9c3d97d58e58f4ffc35ff2ac06d5
child 333124 ba38537fbb5af21916ef5869a108f59ec51bc874
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, sylvestre
bugs1275059
milestone48.0a2
Bug 1275059 - Simple fix for this bug. r=jfkthame, a=sylvestre 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;