Bug 1139709. Remove unused parameters from nsMathMLChar::GetMaxWidth. r=mats
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 05 Mar 2015 14:46:40 +1300
changeset 232383 22cf89e35a513b4a6a61fe48c4db16f601d709aa
parent 232382 d151e628b2e85d88c883dcb56cc14918e1e528f7
child 232384 3c86caa855ee1c526a8ed0ee0fd0f2340baee0f1
push id56533
push userrocallahan@mozilla.com
push dateSat, 07 Mar 2015 09:41:30 +0000
treeherdermozilla-inbound@16f240fd86de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1139709
milestone39.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 1139709. Remove unused parameters from nsMathMLChar::GetMaxWidth. r=mats
layout/mathml/nsMathMLChar.cpp
layout/mathml/nsMathMLChar.h
layout/mathml/nsMathMLmoFrame.cpp
--- a/layout/mathml/nsMathMLChar.cpp
+++ b/layout/mathml/nsMathMLChar.cpp
@@ -1818,18 +1818,17 @@ nsMathMLChar::Stretch(nsPresContext*    
 // character built from parts is considered, (it will be used by Stretch for
 // any characters greater than its minimum size, so) the height is set to its
 // minimum size, so that only widths of smaller subsequent characters are
 // considered.
 nscoord
 nsMathMLChar::GetMaxWidth(nsPresContext* aPresContext,
                           nsRenderingContext& aRenderingContext,
                           float aFontSizeInflation,
-                          uint32_t aStretchHint,
-                          float aMaxSize, bool aMaxSizeIsAbsolute)
+                          uint32_t aStretchHint)
 {
   nsBoundingMetrics bm;
   nsStretchDirection direction = NS_STRETCH_DIRECTION_VERTICAL;
   const nsBoundingMetrics container; // zero target size
 
   StretchInternal(aPresContext, aRenderingContext.ThebesContext(),
                   aFontSizeInflation, direction,
                   container, bm, aStretchHint | NS_STRETCH_MAXWIDTH);
--- a/layout/mathml/nsMathMLChar.h
+++ b/layout/mathml/nsMathMLChar.h
@@ -158,29 +158,21 @@ public:
     mRect = aRect;
   }
 
   // Get the maximum width that the character might have after a vertical
   // Stretch().
   //
   // @param aStretchHint can be the value that will be passed to Stretch().
   // It is used to determine whether the operator is stretchy or a largeop.
-  // @param aMaxSize is the value of the "maxsize" attribute.
-  // @param aMaxSizeIsAbsolute indicates whether the aMaxSize is an absolute
-  // value in app units (true) or a multiplier of the base size (false).
   nscoord
   GetMaxWidth(nsPresContext* aPresContext,
               nsRenderingContext& aRenderingContext,
               float aFontSizeInflation,
-              uint32_t aStretchHint = NS_STRETCH_NORMAL,
-              float aMaxSize = NS_MATHML_OPERATOR_SIZE_INFINITY,
-              // Perhaps just nsOperatorFlags aFlags.
-              // But need DisplayStyle for largeOp,
-              // or remove the largeop bit from flags.
-              bool aMaxSizeIsAbsolute = false);
+              uint32_t aStretchHint = NS_STRETCH_NORMAL);
 
   // Metrics that _exactly_ enclose the char. The char *must* have *already*
   // being stretched before you can call the GetBoundingMetrics() method.
   // IMPORTANT: since chars have their own style contexts, and may be rendered
   // with glyphs that are not in the parent font, just calling the default
   // aRenderingContext.GetBoundingMetrics(aChar) can give incorrect results.
   void
   GetBoundingMetrics(nsBoundingMetrics& aBoundingMetrics) {
--- a/layout/mathml/nsMathMLmoFrame.cpp
+++ b/layout/mathml/nsMathMLmoFrame.cpp
@@ -1030,27 +1030,27 @@ nsMathMLmoFrame::MarkIntrinsicISizesDirt
   // XXXldb This should really be marking dirty rather than rebuilding
   // so that we don't rebuild multiple times for the same change.
   RebuildAutomaticDataForChildren(target);
 
   nsMathMLContainerFrame::MarkIntrinsicISizesDirty();
 }
 
 /* virtual */ void
-nsMathMLmoFrame::GetIntrinsicISizeMetrics(nsRenderingContext *aRenderingContext, nsHTMLReflowMetrics& aDesiredSize)
+nsMathMLmoFrame::GetIntrinsicISizeMetrics(nsRenderingContext *aRenderingContext,
+                                          nsHTMLReflowMetrics& aDesiredSize)
 {
   ProcessOperatorData();
   if (UseMathMLChar()) {
     uint32_t stretchHint = GetStretchHint(mFlags, mPresentationData, true,
                                           StyleFont());
     aDesiredSize.Width() = mMathMLChar.
       GetMaxWidth(PresContext(), *aRenderingContext,
                   nsLayoutUtils::FontSizeInflationFor(this),
-                  stretchHint, mMaxSize,
-                  NS_MATHML_OPERATOR_MAXSIZE_IS_ABSOLUTE(mFlags));
+                  stretchHint);
   }
   else {
     nsMathMLTokenFrame::GetIntrinsicISizeMetrics(aRenderingContext,
                                                  aDesiredSize);
   }
 
   // leadingSpace and trailingSpace are actually applied to the outermost
   // embellished container but for determining total intrinsic width it should