Bug 645647 part 3 - Remove unused trailingTextFrame member. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Thu, 14 Apr 2016 01:32:12 +0200
changeset 331005 78e9d3a39ae86af507b4a8aaa31293edd0d270fc
parent 331004 812c15b34793ac1c0bdd5560af46461f1b5ac5a4
child 331006 19f4a61b0c3c546e23f4df19344d3dc9202a4318
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)
reviewersdholbert
bugs645647
milestone48.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 645647 part 3 - Remove unused trailingTextFrame member. r=dholbert
layout/generic/nsFrame.cpp
layout/generic/nsIFrame.h
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4293,17 +4293,16 @@ nsIFrame::InlineMinISizeData::DefaultAdd
     !aFrame->CanContinueTextRun() &&
     !parent->StyleContext()->ShouldSuppressLineBreak() &&
     parent->StyleText()->WhiteSpaceCanWrap(parent);
   if (mayBreak) {
     OptionallyBreak();
   }
   trailingWhitespace = 0;
   skipWhitespace = false;
-  trailingTextFrame = nullptr;
   currentLine += aISize;
   atStartOfLine = false;
   if (mayBreak) {
     OptionallyBreak();
   }
 }
 
 void
@@ -4322,25 +4321,22 @@ nsIFrame::InlineMinISizeData::ForceBreak
   currentLine = trailingWhitespace = 0;
 
   for (uint32_t i = 0, i_end = floats.Length(); i != i_end; ++i) {
     nscoord float_min = floats[i].Width();
     if (float_min > prevLines)
       prevLines = float_min;
   }
   floats.Clear();
-  trailingTextFrame = nullptr;
   skipWhitespace = true;
 }
 
 void
 nsIFrame::InlineMinISizeData::OptionallyBreak(nscoord aHyphenWidth)
 {
-  trailingTextFrame = nullptr;
-
   // If we can fit more content into a smaller width by staying on this
   // line (because we're still at a negative offset due to negative
   // text-indent or negative margin), don't break.  Otherwise, do the
   // same as ForceBreak.  it doesn't really matter when we accumulate
   // floats.
   if (currentLine + aHyphenWidth < 0 || atStartOfLine)
     return;
   currentLine += aHyphenWidth;
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1747,18 +1747,17 @@ public:
       nscoord         mWidth;
     };
 
     nsTArray<FloatInfo> floats;
   };
 
   struct InlineMinISizeData : public InlineIntrinsicISizeData {
     InlineMinISizeData()
-      : trailingTextFrame(nullptr)
-      , atStartOfLine(true)
+      : atStartOfLine(true)
     {}
 
     // The default implementation for nsIFrame::AddInlineMinISize.
     void DefaultAddInlineMinISize(nsIFrame* aFrame,
                                   nscoord   aISize,
                                   bool      aAllowBreak = true);
 
     // We need to distinguish forced and optional breaks for cases where the
@@ -1766,21 +1765,16 @@ public:
     // optional breaks to prevent min-width from ending up bigger than
     // pref-width.
     void ForceBreak();
 
     // If the break here is actually taken, aHyphenWidth must be added to the
     // width of the current line.
     void OptionallyBreak(nscoord aHyphenWidth = 0);
 
-    // The last text frame processed so far in the current line, when
-    // the last characters in that text frame are relevant for line
-    // break opportunities.
-    nsIFrame *trailingTextFrame;
-
     // Whether we're currently at the start of the line.  If we are, we
     // can't break (for example, between the text-indent and the first
     // word).
     bool atStartOfLine;
   };
 
   struct InlinePrefISizeData : public InlineIntrinsicISizeData {
     void ForceBreak();