Bug 1277163 - Rename nsStyleContext* argument to Calc(Style)Difference methods to indicate it's the new style. r?dbaron draft
authorCameron McCormack <cam@mcc.id.au>
Fri, 17 Jun 2016 06:06:57 +1000
changeset 379723 3e9f2e9a7535acf44822cd213b9d6be7fb76a34c
parent 379708 b866a92a8310bc84100f454eb1d8b9b5472e9dbf
child 523550 b23fad8bc516bd57bd898f385513e622aba8aac4
push id21032
push usercmccormack@mozilla.com
push dateThu, 16 Jun 2016 20:07:26 +0000
reviewersdbaron
bugs1277163
milestone50.0a1
Bug 1277163 - Rename nsStyleContext* argument to Calc(Style)Difference methods to indicate it's the new style. r?dbaron MozReview-Commit-ID: 6GD5avLQfrN
layout/style/nsStyleContext.cpp
layout/style/nsStyleContext.h
layout/style/nsStyleStruct.cpp
layout/style/nsStyleStruct.h
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -891,17 +891,17 @@ nsStyleContext::ApplyStyleFixups(bool aS
   }
 
   // Compute User Interface style, to trigger loads of cursors
   StyleUserInterface();
 #undef GET_UNIQUE_STYLE_DATA
 }
 
 nsChangeHint
-nsStyleContext::CalcStyleDifference(nsStyleContext* aOther,
+nsStyleContext::CalcStyleDifference(nsStyleContext* aNewContext,
                                     nsChangeHint aParentHintsNotHandledForDescendants,
                                     uint32_t* aEqualStructs,
                                     uint32_t* aSamePointerStructs)
 {
   PROFILER_LABEL("nsStyleContext", "CalcStyleDifference",
     js::ProfileEntry::Category::CSS);
 
   MOZ_ASSERT(NS_IsHintSubset(aParentHintsNotHandledForDescendants,
@@ -909,17 +909,17 @@ nsStyleContext::CalcStyleDifference(nsSt
              "caller is passing inherited hints, but shouldn't be");
 
   static_assert(nsStyleStructID_Length <= 32,
                 "aEqualStructs is not big enough");
 
   *aEqualStructs = 0;
 
   nsChangeHint hint = NS_STYLE_HINT_NONE;
-  NS_ENSURE_TRUE(aOther, hint);
+  NS_ENSURE_TRUE(aNewContext, hint);
   // We must always ensure that we populate the structs on the new style
   // context that are filled in on the old context, so that if we get
   // two style changes in succession, the second of which causes a real
   // style change, the PeekStyleData doesn't return null (implying that
   // nobody ever looked at that struct's data).  In other words, we
   // can't skip later structs if we get a big change up front, because
   // we could later get a small change in one of those structs that we
   // don't want to miss.
@@ -932,44 +932,44 @@ nsStyleContext::CalcStyleDifference(nsSt
   // the rule node tree (if applicable) is also the same.
   // However, if there were noninherited style change hints on the
   // parent, we might produce these same noninherited hints on this
   // style context's frame due to 'inherit' values, so we do need to
   // compare.
   // (Things like 'em' units are handled by the change hint produced
   // by font-size changing, so we don't need to worry about them like
   // we worry about 'inherit' values.)
-  bool compare = mSource != aOther->mSource;
+  bool compare = mSource != aNewContext->mSource;
 
   DebugOnly<uint32_t> structsFound = 0;
 
   // If we had any change in variable values, then we'll need to examine
   // all of the other style structs too, even if the new style context has
   // the same source as the old one.
   const nsStyleVariables* thisVariables = PeekStyleVariables();
   if (thisVariables) {
     structsFound |= NS_STYLE_INHERIT_BIT(Variables);
-    const nsStyleVariables* otherVariables = aOther->StyleVariables();
+    const nsStyleVariables* otherVariables = aNewContext->StyleVariables();
     if (thisVariables->mVariables == otherVariables->mVariables) {
       *aEqualStructs |= NS_STYLE_INHERIT_BIT(Variables);
     } else {
       compare = true;
     }
   } else {
     *aEqualStructs |= NS_STYLE_INHERIT_BIT(Variables);
   }
 
   DebugOnly<int> styleStructCount = 1;  // count Variables already
 
 #define DO_STRUCT_DIFFERENCE(struct_)                                         \
   PR_BEGIN_MACRO                                                              \
     const nsStyle##struct_* this##struct_ = PeekStyle##struct_();             \
     if (this##struct_) {                                                      \
       structsFound |= NS_STYLE_INHERIT_BIT(struct_);                          \
-      const nsStyle##struct_* other##struct_ = aOther->Style##struct_();      \
+      const nsStyle##struct_* other##struct_ = aNewContext->Style##struct_(); \
       nsChangeHint maxDifference = nsStyle##struct_::MaxDifference();         \
       nsChangeHint differenceAlwaysHandledForDescendants =                    \
         nsStyle##struct_::DifferenceAlwaysHandledForDescendants();            \
       if (this##struct_ == other##struct_) {                                  \
         /* The very same struct, so we know that there will be no */          \
         /* differences.                                           */          \
         *aEqualStructs |= NS_STYLE_INHERIT_BIT(struct_);                      \
       } else if (compare ||                                                   \
@@ -1060,41 +1060,41 @@ nsStyleContext::CalcStyleDifference(nsSt
   // struct.)  This is important for callers in RestyleManager that
   // need to know the equality or not of the final set of cached struct
   // pointers.
   *aSamePointerStructs = 0;
 
 #define STYLE_STRUCT(name_, callback_)                                        \
   {                                                                           \
     const nsStyle##name_* data = PeekStyle##name_();                          \
-    if (!data || data == aOther->Style##name_()) {                            \
+    if (!data || data == aNewContext->Style##name_()) {                       \
       *aSamePointerStructs |= NS_STYLE_INHERIT_BIT(name_);                    \
     }                                                                         \
   }
 #include "nsStyleStructList.h"
 #undef STYLE_STRUCT
 
   // Note that we do not check whether this->RelevantLinkVisited() !=
-  // aOther->RelevantLinkVisited(); we don't need to since
+  // aNewContext->RelevantLinkVisited(); we don't need to since
   // nsCSSFrameConstructor::DoContentStateChanged always adds
   // nsChangeHint_RepaintFrame for NS_EVENT_STATE_VISITED changes (and
   // needs to, since HasStateDependentStyle probably doesn't work right
   // for NS_EVENT_STATE_VISITED).  Hopefully this doesn't actually
   // expose whether links are visited to performance tests since all
   // link coloring happens asynchronously at a time when it's hard for
   // the page to measure.
   // However, we do need to compute the larger of the changes that can
   // happen depending on whether the link is visited or unvisited, since
   // doing only the one that's currently appropriate would expose which
   // links are in history to easy performance measurement.  Therefore,
   // here, we add nsChangeHint_RepaintFrame hints (the maximum for
   // things that can depend on :visited) for the properties on which we
   // call GetVisitedDependentColor.
   nsStyleContext *thisVis = GetStyleIfVisited(),
-                *otherVis = aOther->GetStyleIfVisited();
+                *otherVis = aNewContext->GetStyleIfVisited();
   if (!thisVis != !otherVis) {
     // One style context has a style-if-visited and the other doesn't.
     // Presume a difference.
     hint |= nsChangeHint_RepaintFrame;
   } else if (thisVis && !NS_IsHintSubset(nsChangeHint_RepaintFrame, hint)) {
     // Both style contexts have a style-if-visited.
     bool change = false;
 
--- a/layout/style/nsStyleContext.h
+++ b/layout/style/nsStyleContext.h
@@ -371,34 +371,34 @@ public:
     const nsStyle##name_ * PeekStyle##name_() {           \
       return DoGetStyle##name_<false>();                  \
     }
   #include "nsStyleStructList.h"
   #undef STYLE_STRUCT
 
   /**
    * Compute the style changes needed during restyling when this style
-   * context is being replaced by aOther.  (This is nonsymmetric since
+   * context is being replaced by aNewContext.  (This is nonsymmetric since
    * we optimize by skipping comparison for styles that have never been
    * requested.)
    *
    * This method returns a change hint (see nsChangeHint.h).  All change
    * hints apply to the frame and its later continuations or ib-split
    * siblings.  Most (all of those except the "NotHandledForDescendants"
    * hints) also apply to all descendants.  The caller must pass in any
    * non-inherited hints that resulted from the parent style context's
    * style change.  The caller *may* pass more hints than needed, but
    * must not pass less than needed; therefore if the caller doesn't
    * know, the caller should pass
    * nsChangeHint_Hints_NotHandledForDescendants.
    *
    * aEqualStructs must not be null.  Into it will be stored a bitfield
    * representing which structs were compared to be non-equal.
    */
-  nsChangeHint CalcStyleDifference(nsStyleContext* aOther,
+  nsChangeHint CalcStyleDifference(nsStyleContext* aNewContext,
                                    nsChangeHint aParentHintsNotHandledForDescendants,
                                    uint32_t* aEqualStructs,
                                    uint32_t* aSamePointerStructs);
 
   /**
    * Get a color that depends on link-visitedness using this and
    * this->GetStyleIfVisited().
    *
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -179,36 +179,36 @@ nsStyleFont::EnableZoom(nsPresContext* a
     mSize = nsStyleFont::UnZoomText(aContext, mSize);
     mFont.size = nsStyleFont::UnZoomText(aContext, mFont.size);
     mScriptUnconstrainedSize =
       nsStyleFont::UnZoomText(aContext, mScriptUnconstrainedSize);
   }
 }
 
 nsChangeHint
-nsStyleFont::CalcDifference(const nsStyleFont& aOther) const
+nsStyleFont::CalcDifference(const nsStyleFont& aNewData) const
 {
-  MOZ_ASSERT(mAllowZoom == aOther.mAllowZoom,
+  MOZ_ASSERT(mAllowZoom == aNewData.mAllowZoom,
              "expected mAllowZoom to be the same on both nsStyleFonts");
-  if (mSize != aOther.mSize ||
-      mFont != aOther.mFont ||
-      mLanguage != aOther.mLanguage ||
-      mExplicitLanguage != aOther.mExplicitLanguage ||
-      mMathVariant != aOther.mMathVariant ||
-      mMathDisplay != aOther.mMathDisplay ||
-      mMinFontSizeRatio != aOther.mMinFontSizeRatio) {
+  if (mSize != aNewData.mSize ||
+      mFont != aNewData.mFont ||
+      mLanguage != aNewData.mLanguage ||
+      mExplicitLanguage != aNewData.mExplicitLanguage ||
+      mMathVariant != aNewData.mMathVariant ||
+      mMathDisplay != aNewData.mMathDisplay ||
+      mMinFontSizeRatio != aNewData.mMinFontSizeRatio) {
     return NS_STYLE_HINT_REFLOW;
   }
 
   // XXX Should any of these cause a non-nsChangeHint_NeutralChange change?
-  if (mGenericID != aOther.mGenericID ||
-      mScriptLevel != aOther.mScriptLevel ||
-      mScriptUnconstrainedSize != aOther.mScriptUnconstrainedSize ||
-      mScriptMinSize != aOther.mScriptMinSize ||
-      mScriptSizeMultiplier != aOther.mScriptSizeMultiplier) {
+  if (mGenericID != aNewData.mGenericID ||
+      mScriptLevel != aNewData.mScriptLevel ||
+      mScriptUnconstrainedSize != aNewData.mScriptUnconstrainedSize ||
+      mScriptMinSize != aNewData.mScriptMinSize ||
+      mScriptSizeMultiplier != aNewData.mScriptSizeMultiplier) {
     return nsChangeHint_NeutralChange;
   }
 
   return NS_STYLE_HINT_NONE;
 }
 
 /* static */ nscoord
 nsStyleFont::ZoomText(StyleStructContext aContext, nscoord aSize)
@@ -275,19 +275,19 @@ nsStyleMargin::nsStyleMargin(const nsSty
 void 
 nsStyleMargin::Destroy(nsPresContext* aContext) {
   this->~nsStyleMargin();
   aContext->PresShell()->
     FreeByObjectID(eArenaObjectID_nsStyleMargin, this);
 }
 
 nsChangeHint
-nsStyleMargin::CalcDifference(const nsStyleMargin& aOther) const
+nsStyleMargin::CalcDifference(const nsStyleMargin& aNewData) const
 {
-  if (mMargin == aOther.mMargin) {
+  if (mMargin == aNewData.mMargin) {
     return NS_STYLE_HINT_NONE;
   }
   // Margin differences can't affect descendant intrinsic sizes and
   // don't need to force children to reflow.
   return nsChangeHint_NeedReflow |
          nsChangeHint_ReflowChangesSizeOrPosition |
          nsChangeHint_ClearAncestorIntrinsics;
 }
@@ -310,19 +310,19 @@ nsStylePadding::nsStylePadding(const nsS
 void 
 nsStylePadding::Destroy(nsPresContext* aContext) {
   this->~nsStylePadding();
   aContext->PresShell()->
     FreeByObjectID(eArenaObjectID_nsStylePadding, this);
 }
 
 nsChangeHint
-nsStylePadding::CalcDifference(const nsStylePadding& aOther) const
+nsStylePadding::CalcDifference(const nsStylePadding& aNewData) const
 {
-  if (mPadding == aOther.mPadding) {
+  if (mPadding == aNewData.mPadding) {
     return NS_STYLE_HINT_NONE;
   }
   // Padding differences can't affect descendant intrinsic sizes, but do need
   // to force children to reflow so that we can reposition them, since their
   // offsets are from our frame bounds but our content rect's position within
   // those bounds is moving.
   return NS_STYLE_HINT_REFLOW & ~nsChangeHint_ClearDescendantIntrinsics;
 }
@@ -446,79 +446,79 @@ void
 nsStyleBorder::Destroy(nsPresContext* aContext) {
   UntrackImage(aContext);
   this->~nsStyleBorder();
   aContext->PresShell()->
     FreeByObjectID(eArenaObjectID_nsStyleBorder, this);
 }
 
 nsChangeHint
-nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const
+nsStyleBorder::CalcDifference(const nsStyleBorder& aNewData) const
 {
   // XXXbz we should be able to return a more specific change hint for
   // at least GetComputedBorder() differences...
-  if (mTwipsPerPixel != aOther.mTwipsPerPixel ||
-      GetComputedBorder() != aOther.GetComputedBorder() ||
-      mFloatEdge != aOther.mFloatEdge ||
-      mBorderImageOutset != aOther.mBorderImageOutset ||
-      mBoxDecorationBreak != aOther.mBoxDecorationBreak)
+  if (mTwipsPerPixel != aNewData.mTwipsPerPixel ||
+      GetComputedBorder() != aNewData.GetComputedBorder() ||
+      mFloatEdge != aNewData.mFloatEdge ||
+      mBorderImageOutset != aNewData.mBorderImageOutset ||
+      mBoxDecorationBreak != aNewData.mBoxDecorationBreak)
     return NS_STYLE_HINT_REFLOW;
 
   NS_FOR_CSS_SIDES(ix) {
     // See the explanation in nsChangeHint.h of
     // nsChangeHint_BorderStyleNoneChange .
     // Furthermore, even though we know *this* side is 0 width, just
     // assume a repaint hint for some other change rather than bother
     // tracking this result through the rest of the function.
-    if (HasVisibleStyle(ix) != aOther.HasVisibleStyle(ix)) {
+    if (HasVisibleStyle(ix) != aNewData.HasVisibleStyle(ix)) {
       return nsChangeHint_RepaintFrame |
              nsChangeHint_BorderStyleNoneChange;
     }
   }
 
   // Note that mBorderStyle stores not only the border style but also
   // color-related flags.  Given that we've already done an mComputedBorder
   // comparison, border-style differences can only lead to a repaint hint.  So
   // it's OK to just compare the values directly -- if either the actual
   // style or the color flags differ we want to repaint.
   NS_FOR_CSS_SIDES(ix) {
-    if (mBorderStyle[ix] != aOther.mBorderStyle[ix] || 
-        mBorderColor[ix] != aOther.mBorderColor[ix])
+    if (mBorderStyle[ix] != aNewData.mBorderStyle[ix] || 
+        mBorderColor[ix] != aNewData.mBorderColor[ix])
       return nsChangeHint_RepaintFrame;
   }
 
-  if (mBorderRadius != aOther.mBorderRadius ||
-      !mBorderColors != !aOther.mBorderColors)
+  if (mBorderRadius != aNewData.mBorderRadius ||
+      !mBorderColors != !aNewData.mBorderColors)
     return nsChangeHint_RepaintFrame;
 
-  if (IsBorderImageLoaded() || aOther.IsBorderImageLoaded()) {
-    if (mBorderImageSource  != aOther.mBorderImageSource  ||
-        mBorderImageRepeatH != aOther.mBorderImageRepeatH ||
-        mBorderImageRepeatV != aOther.mBorderImageRepeatV ||
-        mBorderImageSlice   != aOther.mBorderImageSlice   ||
-        mBorderImageFill    != aOther.mBorderImageFill    ||
-        mBorderImageWidth   != aOther.mBorderImageWidth   ||
-        mBorderImageOutset  != aOther.mBorderImageOutset)
+  if (IsBorderImageLoaded() || aNewData.IsBorderImageLoaded()) {
+    if (mBorderImageSource  != aNewData.mBorderImageSource  ||
+        mBorderImageRepeatH != aNewData.mBorderImageRepeatH ||
+        mBorderImageRepeatV != aNewData.mBorderImageRepeatV ||
+        mBorderImageSlice   != aNewData.mBorderImageSlice   ||
+        mBorderImageFill    != aNewData.mBorderImageFill    ||
+        mBorderImageWidth   != aNewData.mBorderImageWidth   ||
+        mBorderImageOutset  != aNewData.mBorderImageOutset)
       return nsChangeHint_RepaintFrame;
   }
 
   // Note that at this point if mBorderColors is non-null so is
-  // aOther.mBorderColors
+  // aNewData.mBorderColors
   if (mBorderColors) {
     NS_FOR_CSS_SIDES(ix) {
       if (!nsBorderColors::Equal(mBorderColors[ix],
-                                 aOther.mBorderColors[ix]))
+                                 aNewData.mBorderColors[ix]))
         return nsChangeHint_RepaintFrame;
     }
   }
 
   // mBorder is the specified border value.  Changes to this don't
   // need any change processing, since we operate on the computed
   // border values instead.
-  if (mBorder != aOther.mBorder) {
+  if (mBorder != aNewData.mBorder) {
     return nsChangeHint_NeutralChange;
   }
 
   return NS_STYLE_HINT_NONE;
 }
 
 nsStyleOutline::nsStyleOutline(StyleStructContext aContext)
   : mOutlineWidth(NS_STYLE_BORDER_WIDTH_MEDIUM, eStyleUnit_Enumerated)
@@ -563,37 +563,37 @@ nsStyleOutline::RecalcData()
       std::max(CalcCoord(mOutlineWidth,
                          StaticPresData::Get()->GetBorderWidthTable(), 3), 0);
     mActualOutlineWidth =
       NS_ROUND_BORDER_TO_PIXELS(mActualOutlineWidth, mTwipsPerPixel);
   }
 }
 
 nsChangeHint
-nsStyleOutline::CalcDifference(const nsStyleOutline& aOther) const
+nsStyleOutline::CalcDifference(const nsStyleOutline& aNewData) const
 {
-  if (mActualOutlineWidth != aOther.mActualOutlineWidth ||
+  if (mActualOutlineWidth != aNewData.mActualOutlineWidth ||
       (mActualOutlineWidth > 0 &&
-       mOutlineOffset != aOther.mOutlineOffset)) {
+       mOutlineOffset != aNewData.mOutlineOffset)) {
     return nsChangeHint_UpdateOverflow |
            nsChangeHint_SchedulePaint;
   }
 
-  if (mOutlineStyle != aOther.mOutlineStyle ||
-      mOutlineColor != aOther.mOutlineColor ||
-      mOutlineRadius != aOther.mOutlineRadius) {
+  if (mOutlineStyle != aNewData.mOutlineStyle ||
+      mOutlineColor != aNewData.mOutlineColor ||
+      mOutlineRadius != aNewData.mOutlineRadius) {
     if (mActualOutlineWidth > 0) {
       return nsChangeHint_RepaintFrame;
     }
     return nsChangeHint_NeutralChange;
   }
 
-  if (mOutlineWidth != aOther.mOutlineWidth ||
-      mOutlineOffset != aOther.mOutlineOffset ||
-      mTwipsPerPixel != aOther.mTwipsPerPixel) {
+  if (mOutlineWidth != aNewData.mOutlineWidth ||
+      mOutlineOffset != aNewData.mOutlineOffset ||
+      mTwipsPerPixel != aNewData.mTwipsPerPixel) {
     return nsChangeHint_NeutralChange;
   }
 
   return NS_STYLE_HINT_NONE;
 }
 
 // --------------------
 // nsStyleList
@@ -668,34 +668,34 @@ nsStyleList::SetQuotes(nsStyleQuoteValue
 
 const nsStyleQuoteValues::QuotePairArray&
 nsStyleList::GetQuotePairs() const
 {
   return mQuotes->mQuotePairs;
 }
 
 nsChangeHint
-nsStyleList::CalcDifference(const nsStyleList& aOther) const
+nsStyleList::CalcDifference(const nsStyleList& aNewData) const
 {
   // If the quotes implementation is ever going to change we might not need
   // a framechange here and a reflow should be sufficient.  See bug 35768.
-  if (mQuotes != aOther.mQuotes &&
-      (mQuotes || aOther.mQuotes) &&
-      GetQuotePairs() != aOther.GetQuotePairs()) {
+  if (mQuotes != aNewData.mQuotes &&
+      (mQuotes || aNewData.mQuotes) &&
+      GetQuotePairs() != aNewData.GetQuotePairs()) {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
-  if (mListStylePosition != aOther.mListStylePosition)
+  if (mListStylePosition != aNewData.mListStylePosition)
     return NS_STYLE_HINT_FRAMECHANGE;
-  if (EqualImages(mListStyleImage, aOther.mListStyleImage) &&
-      mCounterStyle == aOther.mCounterStyle) {
-    if (mImageRegion.IsEqualInterior(aOther.mImageRegion)) {
+  if (EqualImages(mListStyleImage, aNewData.mListStyleImage) &&
+      mCounterStyle == aNewData.mCounterStyle) {
+    if (mImageRegion.IsEqualInterior(aNewData.mImageRegion)) {
       return NS_STYLE_HINT_NONE;
     }
-    if (mImageRegion.width == aOther.mImageRegion.width &&
-        mImageRegion.height == aOther.mImageRegion.height)
+    if (mImageRegion.width == aNewData.mImageRegion.width &&
+        mImageRegion.height == aNewData.mImageRegion.height)
       return NS_STYLE_HINT_VISUAL;
   }
   return NS_STYLE_HINT_REFLOW;
 }
 
 StaticRefPtr<nsStyleQuoteValues>
 nsStyleList::sInitialQuotes;
 
@@ -731,27 +731,27 @@ nsStyleXUL::nsStyleXUL(const nsStyleXUL&
   , mBoxOrient(aSource.mBoxOrient)
   , mBoxPack(aSource.mBoxPack)
   , mStretchStack(aSource.mStretchStack)
 {
   MOZ_COUNT_CTOR(nsStyleXUL);
 }
 
 nsChangeHint
-nsStyleXUL::CalcDifference(const nsStyleXUL& aOther) const
+nsStyleXUL::CalcDifference(const nsStyleXUL& aNewData) const
 {
-  if (mBoxAlign == aOther.mBoxAlign &&
-      mBoxDirection == aOther.mBoxDirection &&
-      mBoxFlex == aOther.mBoxFlex &&
-      mBoxOrient == aOther.mBoxOrient &&
-      mBoxPack == aOther.mBoxPack &&
-      mBoxOrdinal == aOther.mBoxOrdinal &&
-      mStretchStack == aOther.mStretchStack)
+  if (mBoxAlign == aNewData.mBoxAlign &&
+      mBoxDirection == aNewData.mBoxDirection &&
+      mBoxFlex == aNewData.mBoxFlex &&
+      mBoxOrient == aNewData.mBoxOrient &&
+      mBoxPack == aNewData.mBoxPack &&
+      mBoxOrdinal == aNewData.mBoxOrdinal &&
+      mStretchStack == aNewData.mStretchStack)
     return NS_STYLE_HINT_NONE;
-  if (mBoxOrdinal != aOther.mBoxOrdinal)
+  if (mBoxOrdinal != aNewData.mBoxOrdinal)
     return NS_STYLE_HINT_FRAMECHANGE;
   return NS_STYLE_HINT_REFLOW;
 }
 
 // --------------------
 // nsStyleColumn
 //
 /* static */ const uint32_t nsStyleColumn::kMaxColumnCount = 1000;
@@ -786,41 +786,41 @@ nsStyleColumn::nsStyleColumn(const nsSty
   , mColumnRuleColorIsForeground(aSource.mColumnRuleColorIsForeground)
   , mColumnRuleWidth(aSource.mColumnRuleWidth)
   , mTwipsPerPixel(aSource.mTwipsPerPixel)
 {
   MOZ_COUNT_CTOR(nsStyleColumn);
 }
 
 nsChangeHint
-nsStyleColumn::CalcDifference(const nsStyleColumn& aOther) const
+nsStyleColumn::CalcDifference(const nsStyleColumn& aNewData) const
 {
   if ((mColumnWidth.GetUnit() == eStyleUnit_Auto)
-      != (aOther.mColumnWidth.GetUnit() == eStyleUnit_Auto) ||
-      mColumnCount != aOther.mColumnCount)
+      != (aNewData.mColumnWidth.GetUnit() == eStyleUnit_Auto) ||
+      mColumnCount != aNewData.mColumnCount)
     // We force column count changes to do a reframe, because it's tricky to handle
     // some edge cases where the column count gets smaller and content overflows.
     // XXX not ideal
     return NS_STYLE_HINT_FRAMECHANGE;
 
-  if (mColumnWidth != aOther.mColumnWidth ||
-      mColumnGap != aOther.mColumnGap ||
-      mColumnFill != aOther.mColumnFill)
+  if (mColumnWidth != aNewData.mColumnWidth ||
+      mColumnGap != aNewData.mColumnGap ||
+      mColumnFill != aNewData.mColumnFill)
     return NS_STYLE_HINT_REFLOW;
 
-  if (GetComputedColumnRuleWidth() != aOther.GetComputedColumnRuleWidth() ||
-      mColumnRuleStyle != aOther.mColumnRuleStyle ||
-      mColumnRuleColor != aOther.mColumnRuleColor ||
-      mColumnRuleColorIsForeground != aOther.mColumnRuleColorIsForeground)
+  if (GetComputedColumnRuleWidth() != aNewData.GetComputedColumnRuleWidth() ||
+      mColumnRuleStyle != aNewData.mColumnRuleStyle ||
+      mColumnRuleColor != aNewData.mColumnRuleColor ||
+      mColumnRuleColorIsForeground != aNewData.mColumnRuleColorIsForeground)
     return NS_STYLE_HINT_VISUAL;
 
   // XXX Is it right that we never check mTwipsPerPixel to return a
   // non-nsChangeHint_NeutralChange hint?
-  if (mColumnRuleWidth != aOther.mColumnRuleWidth ||
-      mTwipsPerPixel != aOther.mTwipsPerPixel) {
+  if (mColumnRuleWidth != aNewData.mColumnRuleWidth ||
+      mTwipsPerPixel != aNewData.mTwipsPerPixel) {
     return nsChangeHint_NeutralChange;
   }
 
   return NS_STYLE_HINT_NONE;
 }
 
 // --------------------
 // nsStyleSVG
@@ -886,83 +886,83 @@ PaintURIChanged(const nsStyleSVGPaint& a
     return aPaint1.mType == eStyleSVGPaintType_Server ||
            aPaint2.mType == eStyleSVGPaintType_Server;
   }
   return aPaint1.mType == eStyleSVGPaintType_Server &&
     !EqualURIs(aPaint1.mPaint.mPaintServer, aPaint2.mPaint.mPaintServer);
 }
 
 nsChangeHint
-nsStyleSVG::CalcDifference(const nsStyleSVG& aOther) const
+nsStyleSVG::CalcDifference(const nsStyleSVG& aNewData) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
-  if (!EqualURIs(mMarkerEnd, aOther.mMarkerEnd) ||
-      !EqualURIs(mMarkerMid, aOther.mMarkerMid) ||
-      !EqualURIs(mMarkerStart, aOther.mMarkerStart)) {
+  if (!EqualURIs(mMarkerEnd, aNewData.mMarkerEnd) ||
+      !EqualURIs(mMarkerMid, aNewData.mMarkerMid) ||
+      !EqualURIs(mMarkerStart, aNewData.mMarkerStart)) {
     // Markers currently contribute to nsSVGPathGeometryFrame::mRect,
     // so we need a reflow as well as a repaint. No intrinsic sizes need
     // to change, so nsChangeHint_NeedReflow is sufficient.
     return nsChangeHint_UpdateEffects |
            nsChangeHint_NeedReflow |
            nsChangeHint_NeedDirtyReflow | // XXX remove me: bug 876085
            nsChangeHint_RepaintFrame;
   }
 
-  if (mFill != aOther.mFill ||
-      mStroke != aOther.mStroke ||
-      mFillOpacity != aOther.mFillOpacity ||
-      mStrokeOpacity != aOther.mStrokeOpacity) {
+  if (mFill != aNewData.mFill ||
+      mStroke != aNewData.mStroke ||
+      mFillOpacity != aNewData.mFillOpacity ||
+      mStrokeOpacity != aNewData.mStrokeOpacity) {
     hint |= nsChangeHint_RepaintFrame;
-    if (HasStroke() != aOther.HasStroke() ||
-        (!HasStroke() && HasFill() != aOther.HasFill())) {
+    if (HasStroke() != aNewData.HasStroke() ||
+        (!HasStroke() && HasFill() != aNewData.HasFill())) {
       // Frame bounds and overflow rects depend on whether we "have" fill or
       // stroke. Whether we have stroke or not just changed, or else we have no
       // stroke (in which case whether we have fill or not is significant to frame
       // bounds) and whether we have fill or not just changed. In either case we
       // need to reflow so the frame rect is updated.
       // XXXperf this is a waste on non nsSVGPathGeometryFrames.
       hint |= nsChangeHint_NeedReflow |
               nsChangeHint_NeedDirtyReflow; // XXX remove me: bug 876085
     }
-    if (PaintURIChanged(mFill, aOther.mFill) ||
-        PaintURIChanged(mStroke, aOther.mStroke)) {
+    if (PaintURIChanged(mFill, aNewData.mFill) ||
+        PaintURIChanged(mStroke, aNewData.mStroke)) {
       hint |= nsChangeHint_UpdateEffects;
     }
   }
 
   // Stroke currently contributes to nsSVGPathGeometryFrame::mRect, so
   // we need a reflow here. No intrinsic sizes need to change, so
   // nsChangeHint_NeedReflow is sufficient.
   // Note that stroke-dashoffset does not affect nsSVGPathGeometryFrame::mRect.
   // text-anchor changes also require a reflow since it changes frames' rects.
-  if (mStrokeWidth           != aOther.mStrokeWidth           ||
-      mStrokeMiterlimit      != aOther.mStrokeMiterlimit      ||
-      mStrokeLinecap         != aOther.mStrokeLinecap         ||
-      mStrokeLinejoin        != aOther.mStrokeLinejoin        ||
-      mTextAnchor            != aOther.mTextAnchor) {
+  if (mStrokeWidth           != aNewData.mStrokeWidth           ||
+      mStrokeMiterlimit      != aNewData.mStrokeMiterlimit      ||
+      mStrokeLinecap         != aNewData.mStrokeLinecap         ||
+      mStrokeLinejoin        != aNewData.mStrokeLinejoin        ||
+      mTextAnchor            != aNewData.mTextAnchor) {
     return hint |
            nsChangeHint_NeedReflow |
            nsChangeHint_NeedDirtyReflow | // XXX remove me: bug 876085
            nsChangeHint_RepaintFrame;
   }
 
   if (hint & nsChangeHint_RepaintFrame) {
     return hint; // we don't add anything else below
   }
 
-  if ( mStrokeDashoffset      != aOther.mStrokeDashoffset      ||
-       mClipRule              != aOther.mClipRule              ||
-       mColorInterpolation    != aOther.mColorInterpolation    ||
-       mColorInterpolationFilters != aOther.mColorInterpolationFilters ||
-       mFillRule              != aOther.mFillRule              ||
-       mPaintOrder            != aOther.mPaintOrder            ||
-       mShapeRendering        != aOther.mShapeRendering        ||
-       mStrokeDasharray       != aOther.mStrokeDasharray       ||
-       mContextFlags          != aOther.mContextFlags) {
+  if ( mStrokeDashoffset      != aNewData.mStrokeDashoffset      ||
+       mClipRule              != aNewData.mClipRule              ||
+       mColorInterpolation    != aNewData.mColorInterpolation    ||
+       mColorInterpolationFilters != aNewData.mColorInterpolationFilters ||
+       mFillRule              != aNewData.mFillRule              ||
+       mPaintOrder            != aNewData.mPaintOrder            ||
+       mShapeRendering        != aNewData.mShapeRendering        ||
+       mStrokeDasharray       != aNewData.mStrokeDasharray       ||
+       mContextFlags          != aNewData.mContextFlags) {
     return hint | nsChangeHint_RepaintFrame;
   }
 
   return hint;
 }
 
 // --------------------
 // nsStyleBasicShape
@@ -1250,50 +1250,50 @@ nsStyleSVGReset::Destroy(nsPresContext* 
   mMask.UntrackImages(aContext);
 
   this->~nsStyleSVGReset();
   aContext->PresShell()->
     FreeByObjectID(mozilla::eArenaObjectID_nsStyleSVGReset, this);
 }
 
 nsChangeHint
-nsStyleSVGReset::CalcDifference(const nsStyleSVGReset& aOther) const
+nsStyleSVGReset::CalcDifference(const nsStyleSVGReset& aNewData) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
-  if (mClipPath != aOther.mClipPath) {
+  if (mClipPath != aNewData.mClipPath) {
     hint |= nsChangeHint_UpdateEffects |
             nsChangeHint_RepaintFrame;
     // clip-path changes require that we update the PreEffectsBBoxProperty,
     // which is done during overflow computation.
     hint |= nsChangeHint_UpdateOverflow;
   }
 
-  if (mDominantBaseline != aOther.mDominantBaseline) {
+  if (mDominantBaseline != aNewData.mDominantBaseline) {
     // XXXjwatt: why NS_STYLE_HINT_REFLOW? Isn't that excessive?
     hint |= NS_STYLE_HINT_REFLOW;
-  } else if (mVectorEffect  != aOther.mVectorEffect) {
+  } else if (mVectorEffect  != aNewData.mVectorEffect) {
     // Stroke currently affects nsSVGPathGeometryFrame::mRect, and
     // vector-effect affect stroke. As a result we need to reflow if
     // vector-effect changes in order to have nsSVGPathGeometryFrame::
     // ReflowSVG called to update its mRect. No intrinsic sizes need
     // to change so nsChangeHint_NeedReflow is sufficient.
     hint |= nsChangeHint_NeedReflow |
             nsChangeHint_NeedDirtyReflow | // XXX remove me: bug 876085
             nsChangeHint_RepaintFrame;
-  } else if (mStopColor     != aOther.mStopColor     ||
-             mFloodColor    != aOther.mFloodColor    ||
-             mLightingColor != aOther.mLightingColor ||
-             mStopOpacity   != aOther.mStopOpacity   ||
-             mFloodOpacity  != aOther.mFloodOpacity  ||
-             mMaskType      != aOther.mMaskType) {
+  } else if (mStopColor     != aNewData.mStopColor     ||
+             mFloodColor    != aNewData.mFloodColor    ||
+             mLightingColor != aNewData.mLightingColor ||
+             mStopOpacity   != aNewData.mStopOpacity   ||
+             mFloodOpacity  != aNewData.mFloodOpacity  ||
+             mMaskType      != aNewData.mMaskType) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
-  hint |= mMask.CalcDifference(aOther.mMask, nsChangeHint_RepaintFrame);
+  hint |= mMask.CalcDifference(aNewData.mMask, nsChangeHint_RepaintFrame);
 
   return hint;
 }
 
 // nsStyleSVGPaint implementation
 nsStyleSVGPaint::nsStyleSVGPaint(nsStyleSVGPaintType aType)
   : mType(nsStyleSVGPaintType(0))
   , mFallbackColor(NS_RGB(0, 0, 0))
@@ -1478,124 +1478,124 @@ IsAutonessEqual(const nsStyleSides& aSid
         (aSides2.GetUnit(side) == eStyleUnit_Auto)) {
       return false;
     }
   }
   return true;
 }
 
 nsChangeHint
-nsStylePosition::CalcDifference(const nsStylePosition& aOther,
+nsStylePosition::CalcDifference(const nsStylePosition& aNewData,
                                 const nsStyleVisibility* aOldStyleVisibility) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
   // Changes to "z-index" require a repaint.
-  if (mZIndex != aOther.mZIndex) {
+  if (mZIndex != aNewData.mZIndex) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
   // Changes to "object-fit" & "object-position" require a repaint.  They
   // may also require a reflow, if we have a nsSubDocumentFrame, so that we
   // can adjust the size & position of the subdocument.
-  if (mObjectFit != aOther.mObjectFit ||
-      mObjectPosition != aOther.mObjectPosition) {
+  if (mObjectFit != aNewData.mObjectFit ||
+      mObjectPosition != aNewData.mObjectPosition) {
     hint |= nsChangeHint_RepaintFrame |
             nsChangeHint_NeedReflow;
   }
 
-  if (mOrder != aOther.mOrder) {
+  if (mOrder != aNewData.mOrder) {
     // "order" impacts both layout order and stacking order, so we need both a
     // reflow and a repaint when it changes.  (Technically, we only need a
     // reflow if we're in a multi-line flexbox (which we can't be sure about,
     // since that's determined by styling on our parent) -- there, "order" can
     // affect which flex line we end up on, & hence can affect our sizing by
     // changing the group of flex items we're competing with for space.)
     return hint |
            nsChangeHint_RepaintFrame |
            nsChangeHint_AllReflowHints;
   }
 
-  if (mBoxSizing != aOther.mBoxSizing) {
+  if (mBoxSizing != aNewData.mBoxSizing) {
     // Can affect both widths and heights; just a bad scene.
     return hint |
            nsChangeHint_AllReflowHints;
   }
 
   // Properties that apply to flex items:
   // XXXdholbert These should probably be more targeted (bug 819536)
-  if (mAlignSelf != aOther.mAlignSelf ||
-      mFlexBasis != aOther.mFlexBasis ||
-      mFlexGrow != aOther.mFlexGrow ||
-      mFlexShrink != aOther.mFlexShrink) {
+  if (mAlignSelf != aNewData.mAlignSelf ||
+      mFlexBasis != aNewData.mFlexBasis ||
+      mFlexGrow != aNewData.mFlexGrow ||
+      mFlexShrink != aNewData.mFlexShrink) {
     return hint |
            nsChangeHint_AllReflowHints;
   }
 
   // Properties that apply to flex containers:
   // - flex-direction can swap a flex container between vertical & horizontal.
   // - align-items can change the sizing of a flex container & the positioning
   //   of its children.
   // - flex-wrap changes whether a flex container's children are wrapped, which
   //   impacts their sizing/positioning and hence impacts the container's size.
-  if (mAlignItems != aOther.mAlignItems ||
-      mFlexDirection != aOther.mFlexDirection ||
-      mFlexWrap != aOther.mFlexWrap) {
+  if (mAlignItems != aNewData.mAlignItems ||
+      mFlexDirection != aNewData.mFlexDirection ||
+      mFlexWrap != aNewData.mFlexWrap) {
     return hint |
            nsChangeHint_AllReflowHints;
   }
 
   // Properties that apply to grid containers:
   // FIXME: only for grid containers
   // (ie. 'display: grid' or 'display: inline-grid')
-  if (mGridTemplateColumns != aOther.mGridTemplateColumns ||
-      mGridTemplateRows != aOther.mGridTemplateRows ||
-      mGridTemplateAreas != aOther.mGridTemplateAreas ||
-      mGridAutoColumnsMin != aOther.mGridAutoColumnsMin ||
-      mGridAutoColumnsMax != aOther.mGridAutoColumnsMax ||
-      mGridAutoRowsMin != aOther.mGridAutoRowsMin ||
-      mGridAutoRowsMax != aOther.mGridAutoRowsMax ||
-      mGridAutoFlow != aOther.mGridAutoFlow) {
+  if (mGridTemplateColumns != aNewData.mGridTemplateColumns ||
+      mGridTemplateRows != aNewData.mGridTemplateRows ||
+      mGridTemplateAreas != aNewData.mGridTemplateAreas ||
+      mGridAutoColumnsMin != aNewData.mGridAutoColumnsMin ||
+      mGridAutoColumnsMax != aNewData.mGridAutoColumnsMax ||
+      mGridAutoRowsMin != aNewData.mGridAutoRowsMin ||
+      mGridAutoRowsMax != aNewData.mGridAutoRowsMax ||
+      mGridAutoFlow != aNewData.mGridAutoFlow) {
     return hint |
            nsChangeHint_AllReflowHints;
   }
 
   // Properties that apply to grid items:
   // FIXME: only for grid items
   // (ie. parent frame is 'display: grid' or 'display: inline-grid')
-  if (mGridColumnStart != aOther.mGridColumnStart ||
-      mGridColumnEnd != aOther.mGridColumnEnd ||
-      mGridRowStart != aOther.mGridRowStart ||
-      mGridRowEnd != aOther.mGridRowEnd ||
-      mGridColumnGap != aOther.mGridColumnGap ||
-      mGridRowGap != aOther.mGridRowGap) {
+  if (mGridColumnStart != aNewData.mGridColumnStart ||
+      mGridColumnEnd != aNewData.mGridColumnEnd ||
+      mGridRowStart != aNewData.mGridRowStart ||
+      mGridRowEnd != aNewData.mGridRowEnd ||
+      mGridColumnGap != aNewData.mGridColumnGap ||
+      mGridRowGap != aNewData.mGridRowGap) {
     return hint |
            nsChangeHint_AllReflowHints;
   }
 
   // Changing 'justify-content/items/self' might affect the positioning,
   // but it won't affect any sizing.
-  if (mJustifyContent != aOther.mJustifyContent ||
-      mJustifyItems != aOther.mJustifyItems ||
-      mJustifySelf != aOther.mJustifySelf) {
+  if (mJustifyContent != aNewData.mJustifyContent ||
+      mJustifyItems != aNewData.mJustifyItems ||
+      mJustifySelf != aNewData.mJustifySelf) {
     hint |= nsChangeHint_NeedReflow;
   }
 
   // 'align-content' doesn't apply to a single-line flexbox but we don't know
   // if we're a flex container at this point so we can't optimize for that.
-  if (mAlignContent != aOther.mAlignContent) {
+  if (mAlignContent != aNewData.mAlignContent) {
     hint |= nsChangeHint_NeedReflow;
   }
 
-  bool widthChanged = mWidth != aOther.mWidth ||
-                      mMinWidth != aOther.mMinWidth ||
-                      mMaxWidth != aOther.mMaxWidth;
-  bool heightChanged = mHeight != aOther.mHeight ||
-                       mMinHeight != aOther.mMinHeight ||
-                       mMaxHeight != aOther.mMaxHeight;
+  bool widthChanged = mWidth != aNewData.mWidth ||
+                      mMinWidth != aNewData.mMinWidth ||
+                      mMaxWidth != aNewData.mMaxWidth;
+  bool heightChanged = mHeight != aNewData.mHeight ||
+                       mMinHeight != aNewData.mMinHeight ||
+                       mMaxHeight != aNewData.mMaxHeight;
 
   // If aOldStyleVisibility is null, we don't need to bother with any of
   // these tests, since we know that the element never had its
   // nsStyleVisibility accessed, which means it couldn't have done
   // layout.
   // Note that we pass an nsStyleVisibility here because we don't want
   // to cause a new struct to be computed during
   // nsStyleContext::CalcStyleDifference, which can lead to incorrect
@@ -1632,18 +1632,18 @@ nsStylePosition::CalcDifference(const ns
 
   // If any of the offsets have changed, then return the respective hints
   // so that we would hopefully be able to avoid reflowing.
   // Note that it is possible that we'll need to reflow when processing
   // restyles, but we don't have enough information to make a good decision
   // right now.
   // Don't try to handle changes between "auto" and non-auto efficiently;
   // that's tricky to do and will hardly ever be able to avoid a reflow.
-  if (mOffset != aOther.mOffset) {
-    if (IsAutonessEqual(mOffset, aOther.mOffset)) {
+  if (mOffset != aNewData.mOffset) {
+    if (IsAutonessEqual(mOffset, aNewData.mOffset)) {
       hint |= nsChangeHint_RecomputePosition |
               nsChangeHint_UpdateParentOverflow;
     } else {
       hint |= nsChangeHint_AllReflowHints;
     }
   }
   return hint;
 }
@@ -1722,20 +1722,21 @@ nsStyleTable::~nsStyleTable()
 
 nsStyleTable::nsStyleTable(const nsStyleTable& aSource)
   : mLayoutStrategy(aSource.mLayoutStrategy)
   , mSpan(aSource.mSpan)
 {
   MOZ_COUNT_CTOR(nsStyleTable);
 }
 
-nsChangeHint nsStyleTable::CalcDifference(const nsStyleTable& aOther) const
+nsChangeHint
+nsStyleTable::CalcDifference(const nsStyleTable& aNewData) const
 {
-  if (mSpan != aOther.mSpan ||
-      mLayoutStrategy != aOther.mLayoutStrategy)
+  if (mSpan != aNewData.mSpan ||
+      mLayoutStrategy != aNewData.mLayoutStrategy)
     return NS_STYLE_HINT_FRAMECHANGE;
   return NS_STYLE_HINT_NONE;
 }
 
 // -----------------------
 // nsStyleTableBorder
 
 nsStyleTableBorder::nsStyleTableBorder(StyleStructContext aContext)
@@ -1759,30 +1760,30 @@ nsStyleTableBorder::nsStyleTableBorder(c
   , mBorderCollapse(aSource.mBorderCollapse)
   , mCaptionSide(aSource.mCaptionSide)
   , mEmptyCells(aSource.mEmptyCells)
 {
   MOZ_COUNT_CTOR(nsStyleTableBorder);
 }
 
 nsChangeHint
-nsStyleTableBorder::CalcDifference(const nsStyleTableBorder& aOther) const
+nsStyleTableBorder::CalcDifference(const nsStyleTableBorder& aNewData) const
 {
   // Border-collapse changes need a reframe, because we use a different frame
   // class for table cells in the collapsed border model.  This is used to
   // conserve memory when using the separated border model (collapsed borders
   // require extra state to be stored).
-  if (mBorderCollapse != aOther.mBorderCollapse) {
+  if (mBorderCollapse != aNewData.mBorderCollapse) {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
 
-  if ((mCaptionSide == aOther.mCaptionSide) &&
-      (mBorderSpacingCol == aOther.mBorderSpacingCol) &&
-      (mBorderSpacingRow == aOther.mBorderSpacingRow)) {
-    if (mEmptyCells == aOther.mEmptyCells)
+  if ((mCaptionSide == aNewData.mCaptionSide) &&
+      (mBorderSpacingCol == aNewData.mBorderSpacingCol) &&
+      (mBorderSpacingRow == aNewData.mBorderSpacingRow)) {
+    if (mEmptyCells == aNewData.mEmptyCells)
       return NS_STYLE_HINT_NONE;
     return NS_STYLE_HINT_VISUAL;
   }
   else
     return NS_STYLE_HINT_REFLOW;
 }
 
 // --------------------
@@ -1797,19 +1798,19 @@ nsStyleColor::nsStyleColor(StyleStructCo
 
 nsStyleColor::nsStyleColor(const nsStyleColor& aSource)
   : mColor(aSource.mColor)
 {
   MOZ_COUNT_CTOR(nsStyleColor);
 }
 
 nsChangeHint
-nsStyleColor::CalcDifference(const nsStyleColor& aOther) const
+nsStyleColor::CalcDifference(const nsStyleColor& aNewData) const
 {
-  if (mColor == aOther.mColor)
+  if (mColor == aNewData.mColor)
     return NS_STYLE_HINT_NONE;
   return nsChangeHint_RepaintFrame;
 }
 
 // --------------------
 // nsStyleGradient
 //
 bool
@@ -2298,27 +2299,27 @@ nsStyleImageLayers::nsStyleImageLayers(c
     mSizeCount = std::max(mSizeCount, count);
     mMaskModeCount = std::max(mMaskModeCount, count);
     mBlendModeCount = std::max(mBlendModeCount, count);
     mCompositeCount = std::max(mCompositeCount, count);
   }
 }
 
 nsChangeHint
-nsStyleImageLayers::CalcDifference(const nsStyleImageLayers& aOther,
+nsStyleImageLayers::CalcDifference(const nsStyleImageLayers& aNewLayers,
                                    nsChangeHint aPositionChangeHint) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
   const nsStyleImageLayers& moreLayers =
-    mImageCount > aOther.mImageCount ?
-      *this : aOther;
+    mImageCount > aNewLayers.mImageCount ?
+      *this : aNewLayers;
   const nsStyleImageLayers& lessLayers =
-    mImageCount > aOther.mImageCount ?
-      aOther : *this;
+    mImageCount > aNewLayers.mImageCount ?
+      aNewLayers : *this;
 
   NS_FOR_VISIBLE_IMAGE_LAYERS_BACK_TO_FRONT(i, moreLayers) {
     if (i < lessLayers.mImageCount) {
       nsChangeHint layerDifference =
         moreLayers.mLayers[i].CalcDifference(lessLayers.mLayers[i],
                                              aPositionChangeHint);
       hint |= layerDifference;
       if (layerDifference &&
@@ -2333,26 +2334,26 @@ nsStyleImageLayers::CalcDifference(const
       }
     }
   }
 
   if (hint) {
     return hint;
   }
 
-  if (mAttachmentCount != aOther.mAttachmentCount ||
-      mBlendModeCount != aOther.mBlendModeCount ||
-      mClipCount != aOther.mClipCount ||
-      mCompositeCount != aOther.mCompositeCount ||
-      mMaskModeCount != aOther.mMaskModeCount ||
-      mOriginCount != aOther.mOriginCount ||
-      mRepeatCount != aOther.mRepeatCount ||
-      mPositionXCount != aOther.mPositionXCount ||
-      mPositionYCount != aOther.mPositionYCount ||
-      mSizeCount != aOther.mSizeCount) {
+  if (mAttachmentCount != aNewLayers.mAttachmentCount ||
+      mBlendModeCount != aNewLayers.mBlendModeCount ||
+      mClipCount != aNewLayers.mClipCount ||
+      mCompositeCount != aNewLayers.mCompositeCount ||
+      mMaskModeCount != aNewLayers.mMaskModeCount ||
+      mOriginCount != aNewLayers.mOriginCount ||
+      mRepeatCount != aNewLayers.mRepeatCount ||
+      mPositionXCount != aNewLayers.mPositionXCount ||
+      mPositionYCount != aNewLayers.mPositionYCount ||
+      mSizeCount != aNewLayers.mSizeCount) {
     hint |= nsChangeHint_NeutralChange;
   }
 
   return hint;
 }
 
 bool
 nsStyleImageLayers::HasLayerWithImage() const
@@ -2589,39 +2590,39 @@ nsStyleImageLayers::Layer::operator==(co
          mSize == aOther.mSize &&
          mImage == aOther.mImage &&
          mMaskMode == aOther.mMaskMode &&
          mComposite == aOther.mComposite &&
          EqualURIs(mSourceURI, aOther.mSourceURI);
 }
 
 nsChangeHint
-nsStyleImageLayers::Layer::CalcDifference(const nsStyleImageLayers::Layer& aOther,
+nsStyleImageLayers::Layer::CalcDifference(const nsStyleImageLayers::Layer& aNewLayer,
                                           nsChangeHint aPositionChangeHint) const
 {
   nsChangeHint hint = nsChangeHint(0);
-  if (!EqualURIs(mSourceURI, aOther.mSourceURI)) {
+  if (!EqualURIs(mSourceURI, aNewLayer.mSourceURI)) {
     hint |= nsChangeHint_UpdateEffects |
             nsChangeHint_RepaintFrame;
     // Mask changes require that we update the PreEffectsBBoxProperty,
     // which is done during overflow computation.
     hint |= nsChangeHint_UpdateOverflow;
-  } else if (mAttachment != aOther.mAttachment ||
-             mClip != aOther.mClip ||
-             mOrigin != aOther.mOrigin ||
-             mRepeat != aOther.mRepeat ||
-             mBlendMode != aOther.mBlendMode ||
-             mSize != aOther.mSize ||
-             mImage != aOther.mImage ||
-             mMaskMode != aOther.mMaskMode ||
-             mComposite != aOther.mComposite) {
+  } else if (mAttachment != aNewLayer.mAttachment ||
+             mClip != aNewLayer.mClip ||
+             mOrigin != aNewLayer.mOrigin ||
+             mRepeat != aNewLayer.mRepeat ||
+             mBlendMode != aNewLayer.mBlendMode ||
+             mSize != aNewLayer.mSize ||
+             mImage != aNewLayer.mImage ||
+             mMaskMode != aNewLayer.mMaskMode ||
+             mComposite != aNewLayer.mComposite) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
-  if (mPosition != aOther.mPosition) {
+  if (mPosition != aNewLayer.mPosition) {
     hint |= aPositionChangeHint;
   }
 
   return hint;
 }
 
 // --------------------
 // nsStyleBackground
@@ -2653,24 +2654,24 @@ nsStyleBackground::Destroy(nsPresContext
   mImage.UntrackImages(aContext);
 
   this->~nsStyleBackground();
   aContext->PresShell()->
     FreeByObjectID(eArenaObjectID_nsStyleBackground, this);
 }
 
 nsChangeHint
-nsStyleBackground::CalcDifference(const nsStyleBackground& aOther) const
+nsStyleBackground::CalcDifference(const nsStyleBackground& aNewData) const
 {
   nsChangeHint hint = nsChangeHint(0);
-  if (mBackgroundColor != aOther.mBackgroundColor) {
+  if (mBackgroundColor != aNewData.mBackgroundColor) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
-  hint |= mImage.CalcDifference(aOther.mImage,
+  hint |= mImage.CalcDifference(aNewData.mImage,
                                 nsChangeHint_UpdateBackgroundPosition);
 
   return hint;
 }
 
 bool
 nsStyleBackground::HasFixedBackground(nsIFrame* aFrame) const
 {
@@ -2944,95 +2945,95 @@ nsStyleDisplay::nsStyleDisplay(const nsS
   mTransformOrigin[0] = aSource.mTransformOrigin[0];
   mTransformOrigin[1] = aSource.mTransformOrigin[1];
   mTransformOrigin[2] = aSource.mTransformOrigin[2];
   mPerspectiveOrigin[0] = aSource.mPerspectiveOrigin[0];
   mPerspectiveOrigin[1] = aSource.mPerspectiveOrigin[1];
 }
 
 nsChangeHint
-nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
+nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
-  if (!EqualURIs(mBinding, aOther.mBinding)
-      || mPosition != aOther.mPosition
-      || mDisplay != aOther.mDisplay
-      || mContain != aOther.mContain
-      || (mFloats == NS_STYLE_FLOAT_NONE) != (aOther.mFloats == NS_STYLE_FLOAT_NONE)
-      || mOverflowX != aOther.mOverflowX
-      || mOverflowY != aOther.mOverflowY
-      || mScrollBehavior != aOther.mScrollBehavior
-      || mScrollSnapTypeX != aOther.mScrollSnapTypeX
-      || mScrollSnapTypeY != aOther.mScrollSnapTypeY
-      || mScrollSnapPointsX != aOther.mScrollSnapPointsX
-      || mScrollSnapPointsY != aOther.mScrollSnapPointsY
-      || mScrollSnapDestination != aOther.mScrollSnapDestination
-      || mTopLayer != aOther.mTopLayer
-      || mResize != aOther.mResize)
+  if (!EqualURIs(mBinding, aNewData.mBinding)
+      || mPosition != aNewData.mPosition
+      || mDisplay != aNewData.mDisplay
+      || mContain != aNewData.mContain
+      || (mFloats == NS_STYLE_FLOAT_NONE) != (aNewData.mFloats == NS_STYLE_FLOAT_NONE)
+      || mOverflowX != aNewData.mOverflowX
+      || mOverflowY != aNewData.mOverflowY
+      || mScrollBehavior != aNewData.mScrollBehavior
+      || mScrollSnapTypeX != aNewData.mScrollSnapTypeX
+      || mScrollSnapTypeY != aNewData.mScrollSnapTypeY
+      || mScrollSnapPointsX != aNewData.mScrollSnapPointsX
+      || mScrollSnapPointsY != aNewData.mScrollSnapPointsY
+      || mScrollSnapDestination != aNewData.mScrollSnapDestination
+      || mTopLayer != aNewData.mTopLayer
+      || mResize != aNewData.mResize)
     hint |= nsChangeHint_ReconstructFrame;
 
   /* Note: When mScrollBehavior, mScrollSnapTypeX, mScrollSnapTypeY,
    * mScrollSnapPointsX, mScrollSnapPointsY, or mScrollSnapDestination are
    * changed, nsChangeHint_NeutralChange is not sufficient to enter
    * nsCSSFrameConstructor::PropagateScrollToViewport. By using the same hint
    * as used when the overflow css property changes,
    * nsChangeHint_ReconstructFrame, PropagateScrollToViewport will be called.
    *
    * The scroll-behavior css property is not expected to change often (the
    * CSSOM-View DOM methods are likely to be used in those cases); however,
    * if this does become common perhaps a faster-path might be worth while.
    */
 
   if ((mAppearance == NS_THEME_TEXTFIELD &&
-       aOther.mAppearance != NS_THEME_TEXTFIELD) ||
+       aNewData.mAppearance != NS_THEME_TEXTFIELD) ||
       (mAppearance != NS_THEME_TEXTFIELD &&
-       aOther.mAppearance == NS_THEME_TEXTFIELD)) {
+       aNewData.mAppearance == NS_THEME_TEXTFIELD)) {
     // This is for <input type=number> where we allow authors to specify a
     // |-moz-appearance:textfield| to get a control without a spinner. (The
     // spinner is present for |-moz-appearance:number-input| but also other
     // values such as 'none'.) We need to reframe since we want to use
     // nsTextControlFrame instead of nsNumberControlFrame if the author
     // specifies 'textfield'.
     return nsChangeHint_ReconstructFrame;
   }
 
-  if (mFloats != aOther.mFloats) {
+  if (mFloats != aNewData.mFloats) {
     // Changing which side we float on doesn't affect descendants directly
     hint |= nsChangeHint_AllReflowHints &
             ~(nsChangeHint_ClearDescendantIntrinsics |
               nsChangeHint_NeedDirtyReflow);
   }
 
-  if (mVerticalAlign != aOther.mVerticalAlign) {
+  if (mVerticalAlign != aNewData.mVerticalAlign) {
     // XXX Can this just be AllReflowHints + RepaintFrame, and be included in
     // the block below?
     hint |= NS_STYLE_HINT_REFLOW;
   }
 
   // XXX the following is conservative, for now: changing float breaking shouldn't
   // necessarily require a repaint, reflow should suffice.
-  if (mBreakType != aOther.mBreakType
-      || mBreakInside != aOther.mBreakInside
-      || mBreakBefore != aOther.mBreakBefore
-      || mBreakAfter != aOther.mBreakAfter
-      || mAppearance != aOther.mAppearance
-      || mOrient != aOther.mOrient
-      || mOverflowClipBox != aOther.mOverflowClipBox)
+  if (mBreakType != aNewData.mBreakType
+      || mBreakInside != aNewData.mBreakInside
+      || mBreakBefore != aNewData.mBreakBefore
+      || mBreakAfter != aNewData.mBreakAfter
+      || mAppearance != aNewData.mAppearance
+      || mOrient != aNewData.mOrient
+      || mOverflowClipBox != aNewData.mOverflowClipBox)
     hint |= nsChangeHint_AllReflowHints |
             nsChangeHint_RepaintFrame;
 
-  if (mIsolation != aOther.mIsolation) {
+  if (mIsolation != aNewData.mIsolation) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
   /* If we've added or removed the transform property, we need to reconstruct the frame to add
    * or remove the view object, and also to handle abs-pos and fixed-pos containers.
    */
-  if (HasTransformStyle() != aOther.HasTransformStyle()) {
+  if (HasTransformStyle() != aNewData.HasTransformStyle()) {
     // We do not need to apply nsChangeHint_UpdateTransformLayer since
     // nsChangeHint_RepaintFrame will forcibly invalidate the frame area and
     // ensure layers are rebuilt (or removed).
     hint |= nsChangeHint_UpdateContainingBlock |
             nsChangeHint_UpdateOverflow |
             nsChangeHint_RepaintFrame;
   } else {
     /* Otherwise, if we've kept the property lying around and we already had a
@@ -3042,86 +3043,86 @@ nsStyleDisplay::CalcDifference(const nsS
      * overflow rect.
      *
      * If the property isn't present in either style struct, we still do the
      * comparisons but turn all the resulting change hints into
      * nsChangeHint_NeutralChange.
      */
     nsChangeHint transformHint = nsChangeHint(0);
 
-    if (!mSpecifiedTransform != !aOther.mSpecifiedTransform ||
+    if (!mSpecifiedTransform != !aNewData.mSpecifiedTransform ||
         (mSpecifiedTransform &&
-         *mSpecifiedTransform != *aOther.mSpecifiedTransform)) {
+         *mSpecifiedTransform != *aNewData.mSpecifiedTransform)) {
       transformHint |= nsChangeHint_UpdateTransformLayer;
 
       if (mSpecifiedTransform &&
-          aOther.mSpecifiedTransform) {
+          aNewData.mSpecifiedTransform) {
         transformHint |= nsChangeHint_UpdatePostTransformOverflow;
       } else {
         transformHint |= nsChangeHint_UpdateOverflow;
       }
     }
 
     const nsChangeHint kUpdateOverflowAndRepaintHint =
       nsChangeHint_UpdateOverflow | nsChangeHint_RepaintFrame;
     for (uint8_t index = 0; index < 3; ++index)
-      if (mTransformOrigin[index] != aOther.mTransformOrigin[index]) {
+      if (mTransformOrigin[index] != aNewData.mTransformOrigin[index]) {
         transformHint |= nsChangeHint_UpdateTransformLayer |
                          nsChangeHint_UpdatePostTransformOverflow;
         break;
       }
     
     for (uint8_t index = 0; index < 2; ++index)
-      if (mPerspectiveOrigin[index] != aOther.mPerspectiveOrigin[index]) {
+      if (mPerspectiveOrigin[index] != aNewData.mPerspectiveOrigin[index]) {
         transformHint |= kUpdateOverflowAndRepaintHint;
         break;
       }
 
-    if (HasPerspectiveStyle() != aOther.HasPerspectiveStyle()) {
+    if (HasPerspectiveStyle() != aNewData.HasPerspectiveStyle()) {
       // A change from/to being a containing block for position:fixed.
       hint |= nsChangeHint_UpdateContainingBlock;
     }
 
-    if (mChildPerspective != aOther.mChildPerspective ||
-        mTransformStyle != aOther.mTransformStyle ||
-        mTransformBox != aOther.mTransformBox)
+    if (mChildPerspective != aNewData.mChildPerspective ||
+        mTransformStyle != aNewData.mTransformStyle ||
+        mTransformBox != aNewData.mTransformBox)
       transformHint |= kUpdateOverflowAndRepaintHint;
 
-    if (mBackfaceVisibility != aOther.mBackfaceVisibility)
+    if (mBackfaceVisibility != aNewData.mBackfaceVisibility)
       transformHint |= nsChangeHint_RepaintFrame;
 
     if (transformHint) {
       if (HasTransformStyle()) {
         hint |= transformHint;
       } else {
         hint |= nsChangeHint_NeutralChange;
       }
     }
   }
 
-  // Note that the HasTransformStyle() != aOther.HasTransformStyle() 
+  // Note that the HasTransformStyle() != aNewData.HasTransformStyle() 
   // test above handles relevant changes in the
   // NS_STYLE_WILL_CHANGE_TRANSFORM bit, which in turn handles frame 
   // reconstruction for changes in the containing block of 
   // fixed-positioned elements.
   uint8_t willChangeBitsChanged =
-    mWillChangeBitField ^ aOther.mWillChangeBitField;
+    mWillChangeBitField ^ aNewData.mWillChangeBitField;
   if (willChangeBitsChanged & (NS_STYLE_WILL_CHANGE_STACKING_CONTEXT |
                                NS_STYLE_WILL_CHANGE_SCROLL |
                                NS_STYLE_WILL_CHANGE_OPACITY)) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
   if (willChangeBitsChanged & NS_STYLE_WILL_CHANGE_FIXPOS_CB) {
     hint |= nsChangeHint_UpdateContainingBlock;
   }
 
   // If touch-action is changed, we need to regenerate the event regions on
   // the layers and send it over to the compositor for APZ to handle.
-  if (mTouchAction != aOther.mTouchAction) {
+  if (mTouchAction != aNewData.mTouchAction) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
   // Note:  Our current behavior for handling changes to the
   // transition-duration, transition-delay, and transition-timing-function
   // properties is to do nothing.  In other words, the transition
   // property that matters is what it is when the transition begins, and
   // we don't stop a transition later because the transition property
@@ -3133,34 +3134,34 @@ nsStyleDisplay::CalcDifference(const nsS
   // Note: Likewise, for animation-*, the animation manager gets
   // notified about every new style context constructed, and it uses
   // that opportunity to handle dynamic changes appropriately.
 
   // But we still need to return nsChangeHint_NeutralChange for these
   // properties, since some data did change in the style struct.
 
   if (!hint &&
-      (mOriginalDisplay != aOther.mOriginalDisplay ||
-       mOriginalFloats != aOther.mOriginalFloats ||
-       mTransitions != aOther.mTransitions ||
+      (mOriginalDisplay != aNewData.mOriginalDisplay ||
+       mOriginalFloats != aNewData.mOriginalFloats ||
+       mTransitions != aNewData.mTransitions ||
        mTransitionTimingFunctionCount !=
-         aOther.mTransitionTimingFunctionCount ||
-       mTransitionDurationCount != aOther.mTransitionDurationCount ||
-       mTransitionDelayCount != aOther.mTransitionDelayCount ||
-       mTransitionPropertyCount != aOther.mTransitionPropertyCount ||
-       mAnimations != aOther.mAnimations ||
-       mAnimationTimingFunctionCount != aOther.mAnimationTimingFunctionCount ||
-       mAnimationDurationCount != aOther.mAnimationDurationCount ||
-       mAnimationDelayCount != aOther.mAnimationDelayCount ||
-       mAnimationNameCount != aOther.mAnimationNameCount ||
-       mAnimationDirectionCount != aOther.mAnimationDirectionCount ||
-       mAnimationFillModeCount != aOther.mAnimationFillModeCount ||
-       mAnimationPlayStateCount != aOther.mAnimationPlayStateCount ||
-       mAnimationIterationCountCount != aOther.mAnimationIterationCountCount ||
-       mScrollSnapCoordinate != aOther.mScrollSnapCoordinate)) {
+         aNewData.mTransitionTimingFunctionCount ||
+       mTransitionDurationCount != aNewData.mTransitionDurationCount ||
+       mTransitionDelayCount != aNewData.mTransitionDelayCount ||
+       mTransitionPropertyCount != aNewData.mTransitionPropertyCount ||
+       mAnimations != aNewData.mAnimations ||
+       mAnimationTimingFunctionCount != aNewData.mAnimationTimingFunctionCount ||
+       mAnimationDurationCount != aNewData.mAnimationDurationCount ||
+       mAnimationDelayCount != aNewData.mAnimationDelayCount ||
+       mAnimationNameCount != aNewData.mAnimationNameCount ||
+       mAnimationDirectionCount != aNewData.mAnimationDirectionCount ||
+       mAnimationFillModeCount != aNewData.mAnimationFillModeCount ||
+       mAnimationPlayStateCount != aNewData.mAnimationPlayStateCount ||
+       mAnimationIterationCountCount != aNewData.mAnimationIterationCountCount ||
+       mScrollSnapCoordinate != aNewData.mScrollSnapCoordinate)) {
     hint |= nsChangeHint_NeutralChange;
   }
 
   return hint;
 }
 
 // --------------------
 // nsStyleVisibility
@@ -3187,45 +3188,45 @@ nsStyleVisibility::nsStyleVisibility(con
   , mWritingMode(aSource.mWritingMode)
   , mTextOrientation(aSource.mTextOrientation)
   , mColorAdjust(aSource.mColorAdjust)
 {
   MOZ_COUNT_CTOR(nsStyleVisibility);
 }
 
 nsChangeHint
-nsStyleVisibility::CalcDifference(const nsStyleVisibility& aOther) const
+nsStyleVisibility::CalcDifference(const nsStyleVisibility& aNewData) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
-  if (mDirection != aOther.mDirection || mWritingMode != aOther.mWritingMode) {
+  if (mDirection != aNewData.mDirection || mWritingMode != aNewData.mWritingMode) {
     // It's important that a change in mWritingMode results in frame
     // reconstruction, because it may affect intrinsic size (see
     // nsSubDocumentFrame::GetIntrinsicISize/BSize).
     hint |= nsChangeHint_ReconstructFrame;
   } else {
-    if ((mImageOrientation != aOther.mImageOrientation)) {
+    if ((mImageOrientation != aNewData.mImageOrientation)) {
       hint |= nsChangeHint_AllReflowHints |
               nsChangeHint_RepaintFrame;
     }
-    if (mVisible != aOther.mVisible) {
+    if (mVisible != aNewData.mVisible) {
       if ((NS_STYLE_VISIBILITY_COLLAPSE == mVisible) ||
-          (NS_STYLE_VISIBILITY_COLLAPSE == aOther.mVisible)) {
+          (NS_STYLE_VISIBILITY_COLLAPSE == aNewData.mVisible)) {
         hint |= NS_STYLE_HINT_REFLOW;
       } else {
         hint |= NS_STYLE_HINT_VISUAL;
       }
     }
-    if (mTextOrientation != aOther.mTextOrientation) {
+    if (mTextOrientation != aNewData.mTextOrientation) {
       hint |= NS_STYLE_HINT_REFLOW;
     }
-    if (mImageRendering != aOther.mImageRendering) {
+    if (mImageRendering != aNewData.mImageRendering) {
       hint |= nsChangeHint_RepaintFrame;
     }
-    if (mColorAdjust != aOther.mColorAdjust) {
+    if (mColorAdjust != aNewData.mColorAdjust) {
       // color-adjust only affects media where dynamic changes can't happen.
       hint |= nsChangeHint_NeutralChange;
     }
   }
   return hint;
 }
 
 nsStyleContentData::~nsStyleContentData()
@@ -3404,60 +3405,60 @@ nsStyleContent::nsStyleContent(const nsS
       const nsStyleCounterData *data = aSource.GetCounterResetAt(index);
       mResets[index].mCounter = data->mCounter;
       mResets[index].mValue = data->mValue;
     }
   }
 }
 
 nsChangeHint
-nsStyleContent::CalcDifference(const nsStyleContent& aOther) const
+nsStyleContent::CalcDifference(const nsStyleContent& aNewData) const
 {
   // In ReResolveStyleContext we assume that if there's no existing
   // ::before or ::after and we don't have to restyle children of the
   // node then we can't end up with a ::before or ::after due to the
   // restyle of the node itself.  That's not quite true, but the only
   // exception to the above is when the 'content' property of the node
   // changes and the pseudo-element inherits the changed value.  Since
   // the code here triggers a frame change on the node in that case,
   // the optimization in ReResolveStyleContext is ok.  But if we ever
   // change this code to not reconstruct frames on changes to the
   // 'content' property, then we will need to revisit the optimization
   // in ReResolveStyleContext.
 
-  if (mContentCount != aOther.mContentCount ||
-      mIncrementCount != aOther.mIncrementCount || 
-      mResetCount != aOther.mResetCount) {
+  if (mContentCount != aNewData.mContentCount ||
+      mIncrementCount != aNewData.mIncrementCount || 
+      mResetCount != aNewData.mResetCount) {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
 
   uint32_t ix = mContentCount;
   while (0 < ix--) {
-    if (mContents[ix] != aOther.mContents[ix]) {
+    if (mContents[ix] != aNewData.mContents[ix]) {
       // Unfortunately we need to reframe here; a simple reflow
       // will not pick up different text or different image URLs,
       // since we set all that up in the CSSFrameConstructor
       return NS_STYLE_HINT_FRAMECHANGE;
     }
   }
   ix = mIncrementCount;
   while (0 < ix--) {
-    if ((mIncrements[ix].mValue != aOther.mIncrements[ix].mValue) || 
-        (mIncrements[ix].mCounter != aOther.mIncrements[ix].mCounter)) {
+    if ((mIncrements[ix].mValue != aNewData.mIncrements[ix].mValue) || 
+        (mIncrements[ix].mCounter != aNewData.mIncrements[ix].mCounter)) {
       return NS_STYLE_HINT_FRAMECHANGE;
     }
   }
   ix = mResetCount;
   while (0 < ix--) {
-    if ((mResets[ix].mValue != aOther.mResets[ix].mValue) || 
-        (mResets[ix].mCounter != aOther.mResets[ix].mCounter)) {
+    if ((mResets[ix].mValue != aNewData.mResets[ix].mValue) || 
+        (mResets[ix].mCounter != aNewData.mResets[ix].mCounter)) {
       return NS_STYLE_HINT_FRAMECHANGE;
     }
   }
-  if (mMarkerOffset != aOther.mMarkerOffset) {
+  if (mMarkerOffset != aNewData.mMarkerOffset) {
     return NS_STYLE_HINT_REFLOW;
   }
   return NS_STYLE_HINT_NONE;
 }
 
 nsresult
 nsStyleContent::AllocateContents(uint32_t aCount)
 {
@@ -3499,44 +3500,44 @@ nsStyleTextReset::nsStyleTextReset(const
 }
 
 nsStyleTextReset::~nsStyleTextReset()
 {
   MOZ_COUNT_DTOR(nsStyleTextReset);
 }
 
 nsChangeHint
-nsStyleTextReset::CalcDifference(const nsStyleTextReset& aOther) const
+nsStyleTextReset::CalcDifference(const nsStyleTextReset& aNewData) const
 {
-  if (mUnicodeBidi != aOther.mUnicodeBidi) {
+  if (mUnicodeBidi != aNewData.mUnicodeBidi) {
     return NS_STYLE_HINT_REFLOW;
   }
 
   uint8_t lineStyle = GetDecorationStyle();
-  uint8_t otherLineStyle = aOther.GetDecorationStyle();
-  if (mTextDecorationLine != aOther.mTextDecorationLine ||
+  uint8_t otherLineStyle = aNewData.GetDecorationStyle();
+  if (mTextDecorationLine != aNewData.mTextDecorationLine ||
       lineStyle != otherLineStyle) {
     // Changes to our text-decoration line can impact our overflow area &
     // also our descendants' overflow areas (particularly for text-frame
     // descendants).  So, we update those areas & trigger a repaint.
     return nsChangeHint_RepaintFrame |
            nsChangeHint_UpdateSubtreeOverflow |
            nsChangeHint_SchedulePaint;
   }
 
   // Repaint for decoration color changes
   nscolor decColor, otherDecColor;
   bool isFG, otherIsFG;
   GetDecorationColor(decColor, isFG);
-  aOther.GetDecorationColor(otherDecColor, otherIsFG);
+  aNewData.GetDecorationColor(otherDecColor, otherIsFG);
   if (isFG != otherIsFG || (!isFG && decColor != otherDecColor)) {
     return nsChangeHint_RepaintFrame;
   }
 
-  if (mTextOverflow != aOther.mTextOverflow) {
+  if (mTextOverflow != aNewData.mTextOverflow) {
     return nsChangeHint_RepaintFrame;
   }
 
   return NS_STYLE_HINT_NONE;
 }
 
 // Returns true if the given shadow-arrays are equal.
 static bool
@@ -3636,98 +3637,98 @@ nsStyleText::nsStyleText(const nsStyleTe
 }
 
 nsStyleText::~nsStyleText()
 {
   MOZ_COUNT_DTOR(nsStyleText);
 }
 
 nsChangeHint
-nsStyleText::CalcDifference(const nsStyleText& aOther) const
+nsStyleText::CalcDifference(const nsStyleText& aNewData) const
 {
   if (WhiteSpaceOrNewlineIsSignificant() !=
-      aOther.WhiteSpaceOrNewlineIsSignificant()) {
+      aNewData.WhiteSpaceOrNewlineIsSignificant()) {
     // This may require construction of suppressed text frames
     return NS_STYLE_HINT_FRAMECHANGE;
   }
 
-  if (mTextCombineUpright != aOther.mTextCombineUpright ||
-      mControlCharacterVisibility != aOther.mControlCharacterVisibility) {
+  if (mTextCombineUpright != aNewData.mTextCombineUpright ||
+      mControlCharacterVisibility != aNewData.mControlCharacterVisibility) {
     return nsChangeHint_ReconstructFrame;
   }
 
-  if ((mTextAlign != aOther.mTextAlign) ||
-      (mTextAlignLast != aOther.mTextAlignLast) ||
-      (mTextAlignTrue != aOther.mTextAlignTrue) ||
-      (mTextAlignLastTrue != aOther.mTextAlignLastTrue) ||
-      (mTextTransform != aOther.mTextTransform) ||
-      (mWhiteSpace != aOther.mWhiteSpace) ||
-      (mWordBreak != aOther.mWordBreak) ||
-      (mOverflowWrap != aOther.mOverflowWrap) ||
-      (mHyphens != aOther.mHyphens) ||
-      (mRubyAlign != aOther.mRubyAlign) ||
-      (mRubyPosition != aOther.mRubyPosition) ||
-      (mTextSizeAdjust != aOther.mTextSizeAdjust) ||
-      (mLetterSpacing != aOther.mLetterSpacing) ||
-      (mLineHeight != aOther.mLineHeight) ||
-      (mTextIndent != aOther.mTextIndent) ||
-      (mWordSpacing != aOther.mWordSpacing) ||
-      (mTabSize != aOther.mTabSize))
+  if ((mTextAlign != aNewData.mTextAlign) ||
+      (mTextAlignLast != aNewData.mTextAlignLast) ||
+      (mTextAlignTrue != aNewData.mTextAlignTrue) ||
+      (mTextAlignLastTrue != aNewData.mTextAlignLastTrue) ||
+      (mTextTransform != aNewData.mTextTransform) ||
+      (mWhiteSpace != aNewData.mWhiteSpace) ||
+      (mWordBreak != aNewData.mWordBreak) ||
+      (mOverflowWrap != aNewData.mOverflowWrap) ||
+      (mHyphens != aNewData.mHyphens) ||
+      (mRubyAlign != aNewData.mRubyAlign) ||
+      (mRubyPosition != aNewData.mRubyPosition) ||
+      (mTextSizeAdjust != aNewData.mTextSizeAdjust) ||
+      (mLetterSpacing != aNewData.mLetterSpacing) ||
+      (mLineHeight != aNewData.mLineHeight) ||
+      (mTextIndent != aNewData.mTextIndent) ||
+      (mWordSpacing != aNewData.mWordSpacing) ||
+      (mTabSize != aNewData.mTabSize))
     return NS_STYLE_HINT_REFLOW;
 
-  if (HasTextEmphasis() != aOther.HasTextEmphasis() ||
+  if (HasTextEmphasis() != aNewData.HasTextEmphasis() ||
       (HasTextEmphasis() &&
-       mTextEmphasisPosition != aOther.mTextEmphasisPosition)) {
+       mTextEmphasisPosition != aNewData.mTextEmphasisPosition)) {
     // Text emphasis position change could affect line height calculation.
     return nsChangeHint_AllReflowHints |
            nsChangeHint_RepaintFrame;
   }
 
   nsChangeHint hint = nsChangeHint(0);
 
   // text-rendering changes require a reflow since they change SVG
   // frames' rects.
-  if (mTextRendering != aOther.mTextRendering) {
+  if (mTextRendering != aNewData.mTextRendering) {
     hint |= nsChangeHint_NeedReflow |
             nsChangeHint_NeedDirtyReflow | // XXX remove me: bug 876085
             nsChangeHint_RepaintFrame;
   }
 
-  if (!AreShadowArraysEqual(mTextShadow, aOther.mTextShadow) ||
-      mTextEmphasisStyle != aOther.mTextEmphasisStyle ||
-      mTextEmphasisStyleString != aOther.mTextEmphasisStyleString ||
-      mWebkitTextStrokeWidth != aOther.mWebkitTextStrokeWidth) {
+  if (!AreShadowArraysEqual(mTextShadow, aNewData.mTextShadow) ||
+      mTextEmphasisStyle != aNewData.mTextEmphasisStyle ||
+      mTextEmphasisStyleString != aNewData.mTextEmphasisStyleString ||
+      mWebkitTextStrokeWidth != aNewData.mWebkitTextStrokeWidth) {
     hint |= nsChangeHint_UpdateSubtreeOverflow |
             nsChangeHint_SchedulePaint |
             nsChangeHint_RepaintFrame;
 
     // We don't add any other hints below.
     return hint;
   }
 
   MOZ_ASSERT(!mTextEmphasisColorForeground ||
-             !aOther.mTextEmphasisColorForeground ||
-             mTextEmphasisColor == aOther.mTextEmphasisColor,
+             !aNewData.mTextEmphasisColorForeground ||
+             mTextEmphasisColor == aNewData.mTextEmphasisColor,
              "If the text-emphasis-color are both foreground color, "
              "mTextEmphasisColor should also be identical");
-  if (mTextEmphasisColorForeground != aOther.mTextEmphasisColorForeground ||
-      mTextEmphasisColor != aOther.mTextEmphasisColor ||
-      mWebkitTextFillColorForeground != aOther.mWebkitTextFillColorForeground ||
-      mWebkitTextFillColor != aOther.mWebkitTextFillColor ||
-      mWebkitTextStrokeColorForeground != aOther.mWebkitTextStrokeColorForeground ||
-      mWebkitTextStrokeColor != aOther.mWebkitTextStrokeColor) {
+  if (mTextEmphasisColorForeground != aNewData.mTextEmphasisColorForeground ||
+      mTextEmphasisColor != aNewData.mTextEmphasisColor ||
+      mWebkitTextFillColorForeground != aNewData.mWebkitTextFillColorForeground ||
+      mWebkitTextFillColor != aNewData.mWebkitTextFillColor ||
+      mWebkitTextStrokeColorForeground != aNewData.mWebkitTextStrokeColorForeground ||
+      mWebkitTextStrokeColor != aNewData.mWebkitTextStrokeColor) {
     hint |= nsChangeHint_SchedulePaint |
             nsChangeHint_RepaintFrame;
   }
 
   if (hint) {
     return hint;
   }
 
-  if (mTextEmphasisPosition != aOther.mTextEmphasisPosition) {
+  if (mTextEmphasisPosition != aNewData.mTextEmphasisPosition) {
     return nsChangeHint_NeutralChange;
   }
 
   return NS_STYLE_HINT_NONE;
 }
 
 LogicalSide
 nsStyleText::TextEmphasisSide(WritingMode aWM) const
@@ -3809,48 +3810,48 @@ nsStyleUserInterface::nsStyleUserInterfa
 
 nsStyleUserInterface::~nsStyleUserInterface()
 {
   MOZ_COUNT_DTOR(nsStyleUserInterface);
   delete [] mCursorArray;
 }
 
 nsChangeHint
-nsStyleUserInterface::CalcDifference(const nsStyleUserInterface& aOther) const
+nsStyleUserInterface::CalcDifference(const nsStyleUserInterface& aNewData) const
 {
   nsChangeHint hint = nsChangeHint(0);
-  if (mCursor != aOther.mCursor)
+  if (mCursor != aNewData.mCursor)
     hint |= nsChangeHint_UpdateCursor;
 
   // We could do better. But it wouldn't be worth it, URL-specified cursors are
   // rare.
-  if (mCursorArrayLength > 0 || aOther.mCursorArrayLength > 0)
+  if (mCursorArrayLength > 0 || aNewData.mCursorArrayLength > 0)
     hint |= nsChangeHint_UpdateCursor;
 
-  if (mPointerEvents != aOther.mPointerEvents) {
+  if (mPointerEvents != aNewData.mPointerEvents) {
     // nsSVGPathGeometryFrame's mRect depends on stroke _and_ on the value
     // of pointer-events. See nsSVGPathGeometryFrame::ReflowSVG's use of
     // GetHitTestFlags. (Only a reflow, no visual change.)
     hint |= nsChangeHint_NeedReflow |
             nsChangeHint_NeedDirtyReflow; // XXX remove me: bug 876085
   }
 
-  if (mUserModify != aOther.mUserModify)
+  if (mUserModify != aNewData.mUserModify)
     hint |= NS_STYLE_HINT_VISUAL;
   
-  if (mUserInput != aOther.mUserInput) {
+  if (mUserInput != aNewData.mUserInput) {
     if (NS_STYLE_USER_INPUT_NONE == mUserInput ||
-        NS_STYLE_USER_INPUT_NONE == aOther.mUserInput) {
+        NS_STYLE_USER_INPUT_NONE == aNewData.mUserInput) {
       hint |= NS_STYLE_HINT_FRAMECHANGE;
     } else {
       hint |= nsChangeHint_NeutralChange;
     }
   }
 
-  if (mUserFocus != aOther.mUserFocus) {
+  if (mUserFocus != aNewData.mUserFocus) {
     hint |= nsChangeHint_NeutralChange;
   }
 
   return hint;
 }
 
 void
 nsStyleUserInterface::CopyCursorArrayFrom(const nsStyleUserInterface& aSource)
@@ -3892,31 +3893,31 @@ nsStyleUIReset::nsStyleUIReset(const nsS
 }
 
 nsStyleUIReset::~nsStyleUIReset()
 {
   MOZ_COUNT_DTOR(nsStyleUIReset);
 }
 
 nsChangeHint
-nsStyleUIReset::CalcDifference(const nsStyleUIReset& aOther) const
+nsStyleUIReset::CalcDifference(const nsStyleUIReset& aNewData) const
 {
   // ignore mIMEMode
-  if (mForceBrokenImageIcon != aOther.mForceBrokenImageIcon)
+  if (mForceBrokenImageIcon != aNewData.mForceBrokenImageIcon)
     return NS_STYLE_HINT_FRAMECHANGE;
-  if (mWindowShadow != aOther.mWindowShadow) {
+  if (mWindowShadow != aNewData.mWindowShadow) {
     // We really need just an nsChangeHint_SyncFrameView, except
     // on an ancestor of the frame, so we get that by doing a
     // reflow.
     return NS_STYLE_HINT_REFLOW;
   }
-  if (mUserSelect != aOther.mUserSelect)
+  if (mUserSelect != aNewData.mUserSelect)
     return NS_STYLE_HINT_VISUAL;
 
-  if (mWindowDragging != aOther.mWindowDragging) {
+  if (mWindowDragging != aNewData.mWindowDragging) {
     return nsChangeHint_SchedulePaint;
   }
 
   return NS_STYLE_HINT_NONE;
 }
 
 //-----------------------
 // nsStyleVariables
@@ -3934,17 +3935,17 @@ nsStyleVariables::nsStyleVariables(const
 }
 
 nsStyleVariables::~nsStyleVariables()
 {
   MOZ_COUNT_DTOR(nsStyleVariables);
 }
 
 nsChangeHint
-nsStyleVariables::CalcDifference(const nsStyleVariables& aOther) const
+nsStyleVariables::CalcDifference(const nsStyleVariables& aNewData) const
 {
   return nsChangeHint(0);
 }
 
 //-----------------------
 // nsStyleEffects
 //
 
@@ -3970,71 +3971,71 @@ nsStyleEffects::nsStyleEffects(const nsS
 }
 
 nsStyleEffects::~nsStyleEffects()
 {
   MOZ_COUNT_DTOR(nsStyleEffects);
 }
 
 nsChangeHint
-nsStyleEffects::CalcDifference(const nsStyleEffects& aOther) const
+nsStyleEffects::CalcDifference(const nsStyleEffects& aNewData) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
-  if (!AreShadowArraysEqual(mBoxShadow, aOther.mBoxShadow)) {
+  if (!AreShadowArraysEqual(mBoxShadow, aNewData.mBoxShadow)) {
     // Update overflow regions & trigger DLBI to be sure it's noticed.
     // Also request a repaint, since it's possible that only the color
     // of the shadow is changing (and UpdateOverflow/SchedulePaint won't
     // repaint for that, since they won't know what needs invalidating.)
     hint |= nsChangeHint_UpdateOverflow |
             nsChangeHint_SchedulePaint |
             nsChangeHint_RepaintFrame;
   }
 
-  if (mClipFlags != aOther.mClipFlags) {
+  if (mClipFlags != aNewData.mClipFlags) {
     hint |= nsChangeHint_AllReflowHints |
             nsChangeHint_RepaintFrame;
   }
 
-  if (!mClip.IsEqualInterior(aOther.mClip)) {
+  if (!mClip.IsEqualInterior(aNewData.mClip)) {
     // If the clip has changed, we just need to update overflow areas. DLBI
     // will handle the invalidation.
     hint |= nsChangeHint_UpdateOverflow |
             nsChangeHint_SchedulePaint;
   }
 
-  if (mOpacity != aOther.mOpacity) {
+  if (mOpacity != aNewData.mOpacity) {
     // If we're going from the optimized >=0.99 opacity value to 1.0 or back, then
     // repaint the frame because DLBI will not catch the invalidation.  Otherwise,
     // just update the opacity layer.
-    if ((mOpacity >= 0.99f && mOpacity < 1.0f && aOther.mOpacity == 1.0f) ||
-        (aOther.mOpacity >= 0.99f && aOther.mOpacity < 1.0f && mOpacity == 1.0f)) {
+    if ((mOpacity >= 0.99f && mOpacity < 1.0f && aNewData.mOpacity == 1.0f) ||
+        (aNewData.mOpacity >= 0.99f && aNewData.mOpacity < 1.0f && mOpacity == 1.0f)) {
       hint |= nsChangeHint_RepaintFrame;
     } else {
       hint |= nsChangeHint_UpdateOpacityLayer;
-      if ((mOpacity == 1.0f) != (aOther.mOpacity == 1.0f)) {
+      if ((mOpacity == 1.0f) != (aNewData.mOpacity == 1.0f)) {
         hint |= nsChangeHint_UpdateUsesOpacity;
       }
     }
   }
 
-  if (HasFilters() != aOther.HasFilters()) {
+  if (HasFilters() != aNewData.HasFilters()) {
     // A change from/to being a containing block for position:fixed.
     hint |= nsChangeHint_UpdateContainingBlock;
   }
 
-  if (mFilters != aOther.mFilters) {
+  if (mFilters != aNewData.mFilters) {
     hint |= nsChangeHint_UpdateEffects |
             nsChangeHint_RepaintFrame |
             nsChangeHint_UpdateOverflow;
   }
 
-  if (mMixBlendMode != aOther.mMixBlendMode) {
+  if (mMixBlendMode != aNewData.mMixBlendMode) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
   if (!hint &&
-      !mClip.IsEqualEdges(aOther.mClip)) {
+      !mClip.IsEqualEdges(aNewData.mClip)) {
     hint |= nsChangeHint_NeutralChange;
   }
 
   return hint;
 }
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -114,17 +114,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 {
   nsStyleFont(const nsFont& aFont, StyleStructContext aContext);
   nsStyleFont(const nsStyleFont& aStyleFont);
   explicit nsStyleFont(StyleStructContext aContext);
   ~nsStyleFont() {
     MOZ_COUNT_DTOR(nsStyleFont);
   }
 
-  nsChangeHint CalcDifference(const nsStyleFont& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleFont& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_REFLOW |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
@@ -382,17 +382,17 @@ private:
 struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleColor
 {
   explicit nsStyleColor(StyleStructContext aContext);
   nsStyleColor(const nsStyleColor& aOther);
   ~nsStyleColor() {
     MOZ_COUNT_DTOR(nsStyleColor);
   }
 
-  nsChangeHint CalcDifference(const nsStyleColor& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleColor& aNewData) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint_RepaintFrame;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants at all.
     return nsChangeHint(0);
   }
@@ -687,17 +687,17 @@ struct nsStyleImageLayers {
     // of the background positioning area changes.  This is true for any
     // non-solid-color background whose position or size depends on
     // the size of the positioning area.  It's also true for SVG images
     // whose root <svg> node has a viewBox.
     bool RenderingMightDependOnPositioningAreaSizeChange() const;
 
     // Compute the change hint required by changes in just this layer.
     // aPositionChangeHint indicates the hint for position change.
-    nsChangeHint CalcDifference(const Layer& aOther,
+    nsChangeHint CalcDifference(const Layer& aNewLayer,
                                 nsChangeHint aPositionChangeHint) const;
 
     // An equality operator that compares the images using URL-equality
     // rather than pointer-equality.
     bool operator==(const Layer& aOther) const;
     bool operator!=(const Layer& aOther) const {
       return !(*this == aOther);
     }
@@ -736,17 +736,17 @@ struct nsStyleImageLayers {
         mLayers[i].TrackImages(aContext);
     }
   }
   void UntrackImages(nsPresContext* aContext) {
     for (uint32_t i = 0; i < mImageCount; ++i)
       mLayers[i].UntrackImages(aContext);
   }
 
-  nsChangeHint CalcDifference(const nsStyleImageLayers& aOther,
+  nsChangeHint CalcDifference(const nsStyleImageLayers& aNewLayers,
                               nsChangeHint aPositionChangeHint) const;
 
   bool HasLayerWithImage() const;
 
   static const nsCSSProperty kBackgroundLayerTable[];
   static const nsCSSProperty kMaskLayerTable[];
 
   #define NS_FOR_VISIBLE_IMAGE_LAYERS_BACK_TO_FRONT(var_, layers_) \
@@ -764,17 +764,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   void* operator new(size_t sz, nsStyleBackground* aSelf) CPP_THROW_NEW { return aSelf; }
   void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
     return aContext->PresShell()->
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleBackground, sz);
   }
   void Destroy(nsPresContext* aContext);
 
-  nsChangeHint CalcDifference(const nsStyleBackground& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleBackground& aNewData) const;
   static nsChangeHint MaxDifference() {
      return nsChangeHint_UpdateEffects |
            nsChangeHint_RepaintFrame |
            nsChangeHint_UpdateBackgroundPosition |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
@@ -820,17 +820,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   void* operator new(size_t sz, nsStyleMargin* aSelf) CPP_THROW_NEW { return aSelf; }
   void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
     return aContext->PresShell()->
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleMargin, sz);
   }
   void Destroy(nsPresContext* aContext);
 
-  nsChangeHint CalcDifference(const nsStyleMargin& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleMargin& aNewData) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint_NeedReflow |
            nsChangeHint_ReflowChangesSizeOrPosition |
            nsChangeHint_ClearAncestorIntrinsics;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference can return all of the reflow hints sometimes not
     // handled for descendants as hints not handled for descendants.
@@ -867,17 +867,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   void* operator new(size_t sz, nsStylePadding* aSelf) CPP_THROW_NEW { return aSelf; }
   void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
     return aContext->PresShell()->
       AllocateByObjectID(mozilla::eArenaObjectID_nsStylePadding, sz);
   }
   void Destroy(nsPresContext* aContext);
 
-  nsChangeHint CalcDifference(const nsStylePadding& aOther) const;
+  nsChangeHint CalcDifference(const nsStylePadding& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_REFLOW & ~nsChangeHint_ClearDescendantIntrinsics;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference can return nsChangeHint_ClearAncestorIntrinsics as
     // a hint not handled for descendants.  We could (and perhaps
     // should) return nsChangeHint_NeedReflow and
     // nsChangeHint_ReflowChangesSizeOrPosition as always handled for
@@ -1069,17 +1069,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   void* operator new(size_t sz, nsStyleBorder* aSelf) CPP_THROW_NEW { return aSelf; }
   void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
     return aContext->PresShell()->
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleBorder, sz);
   }
   void Destroy(nsPresContext* aContext);
 
-  nsChangeHint CalcDifference(const nsStyleBorder& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleBorder& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_REFLOW |
            nsChangeHint_UpdateOverflow |
            nsChangeHint_BorderStyleNoneChange |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
@@ -1303,17 +1303,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleOutline();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleOutline, this);
   }
 
   void RecalcData();
-  nsChangeHint CalcDifference(const nsStyleOutline& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleOutline& aNewData) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint_UpdateOverflow |
            nsChangeHint_SchedulePaint |
            nsChangeHint_RepaintFrame |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
@@ -1415,17 +1415,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleList, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleList();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleList, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleList& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleList& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
@@ -1640,17 +1640,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStylePosition, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStylePosition();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStylePosition, this);
   }
 
-  nsChangeHint CalcDifference(const nsStylePosition& aOther,
+  nsChangeHint CalcDifference(const nsStylePosition& aNewData,
                               const nsStyleVisibility* aOldStyleVisibility) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_REFLOW |
            nsChangeHint_NeutralChange |
            nsChangeHint_RecomputePosition |
            nsChangeHint_UpdateParentOverflow |
            nsChangeHint_UpdateComputedBSize;
   }
@@ -1935,17 +1935,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   }
 
   void SetDecorationColorToForeground()
   {
     mTextDecorationStyle &= ~BORDER_COLOR_SPECIAL;
     mTextDecorationStyle |= BORDER_COLOR_FOREGROUND;
   }
 
-  nsChangeHint CalcDifference(const nsStyleTextReset& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleTextReset& aNewData) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint(
         NS_STYLE_HINT_REFLOW |
         nsChangeHint_UpdateSubtreeOverflow);
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
@@ -1976,17 +1976,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleText, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleText();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleText, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleText& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleText& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE |
            nsChangeHint_UpdateSubtreeOverflow |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
@@ -2195,17 +2195,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleVisibility, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleVisibility();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleVisibility, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleVisibility& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleVisibility& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
@@ -2476,17 +2476,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleDisplay, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleDisplay();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleDisplay, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleDisplay& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleDisplay& aNewData) const;
   static nsChangeHint MaxDifference() {
     // All the parts of FRAMECHANGE are present in CalcDifference.
     return nsChangeHint(NS_STYLE_HINT_FRAMECHANGE |
                         nsChangeHint_UpdateTransformLayer |
                         nsChangeHint_UpdateOverflow |
                         nsChangeHint_UpdatePostTransformOverflow |
                         nsChangeHint_UpdateContainingBlock |
                         nsChangeHint_NeutralChange);
@@ -2748,17 +2748,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleTable, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleTable();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleTable, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleTable& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleTable& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
            nsChangeHint_ReflowChangesSizeOrPosition |
@@ -2781,17 +2781,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleTableBorder, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleTableBorder();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleTableBorder, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleTableBorder& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleTableBorder& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
            nsChangeHint_ReflowChangesSizeOrPosition |
@@ -2877,17 +2877,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   void* operator new(size_t sz, nsStyleContent* aSelf) CPP_THROW_NEW { return aSelf; }
   void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
     return aContext->PresShell()->
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleContent, sz);
   }
   void Destroy(nsPresContext* aContext);
 
-  nsChangeHint CalcDifference(const nsStyleContent& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleContent& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
            nsChangeHint_ReflowChangesSizeOrPosition |
@@ -2992,17 +2992,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleUIReset, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleUIReset();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleUIReset, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleUIReset& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleUIReset& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
            nsChangeHint_ReflowChangesSizeOrPosition |
@@ -3058,17 +3058,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleUserInterface, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleUserInterface();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleUserInterface, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleUserInterface& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleUserInterface& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE |
            nsChangeHint_UpdateCursor |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
@@ -3109,17 +3109,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleXUL, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleXUL();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleXUL, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleXUL& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleXUL& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
            nsChangeHint_ReflowChangesSizeOrPosition |
@@ -3147,17 +3147,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleColumn, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleColumn();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleColumn, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleColumn& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleColumn& aNewData) const;
   static nsChangeHint MaxDifference() {
     return NS_STYLE_HINT_FRAMECHANGE |
            nsChangeHint_NeutralChange;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
@@ -3244,17 +3244,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleSVG, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleSVG();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleSVG, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleSVG& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleSVG& aNewData) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint_UpdateEffects |
            nsChangeHint_NeedReflow |
            nsChangeHint_NeedDirtyReflow | // XXX remove me: bug 876085
            nsChangeHint_RepaintFrame;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns nsChangeHint_NeedReflow as a hint
@@ -3572,17 +3572,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   void* operator new(size_t sz, nsStyleSVGReset* aSelf) CPP_THROW_NEW { return aSelf; }
   void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW {
     return aContext->PresShell()->
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleSVGReset, sz);
   }
   void Destroy(nsPresContext* aContext);
 
-  nsChangeHint CalcDifference(const nsStyleSVGReset& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleSVGReset& aNewData) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint_UpdateEffects |
            nsChangeHint_UpdateOverflow |
            nsChangeHint_NeutralChange |
            nsChangeHint_RepaintFrame |
            NS_STYLE_HINT_REFLOW;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
@@ -3627,17 +3627,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleVariables, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleVariables();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleVariables, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleVariables& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleVariables& aNewData) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint(0);
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns nsChangeHint_NeedReflow or
     // nsChangeHint_ClearAncestorIntrinsics at all.
     return nsChangeHint(0);
   }
@@ -3657,17 +3657,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleEffects, sz);
   }
   void Destroy(nsPresContext* aContext) {
     this->~nsStyleEffects();
     aContext->PresShell()->
       FreeByObjectID(mozilla::eArenaObjectID_nsStyleEffects, this);
   }
 
-  nsChangeHint CalcDifference(const nsStyleEffects& aOther) const;
+  nsChangeHint CalcDifference(const nsStyleEffects& aNewData) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint_AllReflowHints |
            nsChangeHint_UpdateOverflow |
            nsChangeHint_SchedulePaint |
            nsChangeHint_RepaintFrame |
            nsChangeHint_UpdateOpacityLayer |
            nsChangeHint_UpdateUsesOpacity |
            nsChangeHint_UpdateContainingBlock |