Bug 1277433 - Part 3: Remove trailing whitespace from nsStyleStruct.cpp. r=dholbert draft
authorDaisuke Akatsuka <daisuke@mozilla-japan.org>
Wed, 08 Jun 2016 16:55:01 +0900
changeset 376549 c986b614ff8c2b3e3de757a2f3fca2d607f61cfd
parent 376548 543a525d0e37913fbcdefc40cae6951c880872ab
child 523182 be8a7cd2f6a7e1ac730f4245ae40749ab9501c5f
push id20609
push userbmo:daisuke@mozilla-japan.org
push dateWed, 08 Jun 2016 07:55:18 +0000
reviewersdholbert
bugs1277433
milestone49.0a1
Bug 1277433 - Part 3: Remove trailing whitespace from nsStyleStruct.cpp. r=dholbert MozReview-Commit-ID: 2iutqTtviy3
layout/style/nsStyleStruct.cpp
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -148,17 +148,17 @@ nsStyleFont::nsStyleFont(const nsStyleFo
 }
 
 nsStyleFont::nsStyleFont(StyleStructContext aContext)
   : nsStyleFont(*aContext.GetDefaultFont(kPresContext_DefaultVariableFont_ID),
                 aContext)
 {
 }
 
-void 
+void
 nsStyleFont::Destroy(nsPresContext* aContext) {
   this->~nsStyleFont();
   aContext->PresShell()->
     FreeByObjectID(eArenaObjectID_nsStyleFont, this);
 }
 
 void
 nsStyleFont::EnableZoom(nsPresContext* aContext, bool aEnable)
@@ -232,18 +232,18 @@ nsStyleFont::GetLanguage(StyleStructCont
     // NOTE this should not be used elsewhere, because we want websites
     // to use UTF-8 with proper language tag, instead of relying on
     // deriving language from charset. See bug 1040668 comment 67.
     language = aContext.GetLanguageFromCharset();
   }
   return language.forget();
 }
 
-static nscoord CalcCoord(const nsStyleCoord& aCoord, 
-                         const nscoord* aEnumTable, 
+static nscoord CalcCoord(const nsStyleCoord& aCoord,
+                         const nscoord* aEnumTable,
                          int32_t aNumEnums)
 {
   if (aCoord.GetUnit() == eStyleUnit_Enumerated) {
     MOZ_ASSERT(aEnumTable, "must have enum table");
     int32_t value = aCoord.GetIntValue();
     if (0 <= value && value < aNumEnums) {
       return aEnumTable[aCoord.GetIntValue()];
     }
@@ -264,17 +264,17 @@ nsStyleMargin::nsStyleMargin(StyleStruct
 }
 
 nsStyleMargin::nsStyleMargin(const nsStyleMargin& aSrc)
   : mMargin(aSrc.mMargin)
 {
   MOZ_COUNT_CTOR(nsStyleMargin);
 }
 
-void 
+void
 nsStyleMargin::Destroy(nsPresContext* aContext) {
   this->~nsStyleMargin();
   aContext->PresShell()->
     FreeByObjectID(eArenaObjectID_nsStyleMargin, this);
 }
 
 nsChangeHint nsStyleMargin::CalcDifference(const nsStyleMargin& aOther) const
 {
@@ -298,17 +298,17 @@ nsStylePadding::nsStylePadding(StyleStru
 }
 
 nsStylePadding::nsStylePadding(const nsStylePadding& aSrc)
   : mPadding(aSrc.mPadding)
 {
   MOZ_COUNT_CTOR(nsStylePadding);
 }
 
-void 
+void
 nsStylePadding::Destroy(nsPresContext* aContext) {
   this->~nsStylePadding();
   aContext->PresShell()->
     FreeByObjectID(eArenaObjectID_nsStylePadding, this);
 }
 
 nsChangeHint nsStylePadding::CalcDifference(const nsStylePadding& aOther) const
 {
@@ -469,17 +469,17 @@ nsChangeHint nsStyleBorder::CalcDifferen
   }
 
   // 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] || 
+    if (mBorderStyle[ix] != aOther.mBorderStyle[ix] ||
         mBorderColor[ix] != aOther.mBorderColor[ix])
       return nsChangeHint_RepaintFrame;
   }
 
   if (mBorderRadius != aOther.mBorderRadius ||
       !mBorderColors != !aOther.mBorderColors)
     return nsChangeHint_RepaintFrame;
 
@@ -539,17 +539,17 @@ nsStyleOutline::nsStyleOutline(const nsS
   , mActualOutlineWidth(aSrc.mActualOutlineWidth)
   , mOutlineColor(aSrc.mOutlineColor)
   , mOutlineStyle(aSrc.mOutlineStyle)
   , mTwipsPerPixel(aSrc.mTwipsPerPixel)
 {
   MOZ_COUNT_CTOR(nsStyleOutline);
 }
 
-void 
+void
 nsStyleOutline::RecalcData()
 {
   if (NS_STYLE_BORDER_STYLE_NONE == GetOutlineStyle()) {
     mActualOutlineWidth = 0;
   } else {
     MOZ_ASSERT(mOutlineWidth.ConvertsToLength() ||
                mOutlineWidth.GetUnit() == eStyleUnit_Enumerated);
     // Clamp negative calc() to 0.
@@ -586,25 +586,25 @@ nsChangeHint nsStyleOutline::CalcDiffere
   }
 
   return NS_STYLE_HINT_NONE;
 }
 
 // --------------------
 // nsStyleList
 //
-nsStyleList::nsStyleList(StyleStructContext aContext) 
+nsStyleList::nsStyleList(StyleStructContext aContext)
   : mListStylePosition(NS_STYLE_LIST_STYLE_POSITION_OUTSIDE),
     mCounterStyle(aContext.BuildCounterStyle(NS_LITERAL_STRING("disc")))
 {
   MOZ_COUNT_CTOR(nsStyleList);
   SetQuotesInitial();
 }
 
-nsStyleList::~nsStyleList() 
+nsStyleList::~nsStyleList()
 {
   MOZ_COUNT_DTOR(nsStyleList);
 }
 
 nsStyleList::nsStyleList(const nsStyleList& aSource)
   : mListStylePosition(aSource.mListStylePosition),
     mCounterStyle(aSource.mCounterStyle),
     mQuotes(aSource.mQuotes),
@@ -3017,17 +3017,17 @@ nsChangeHint nsStyleDisplay::CalcDiffere
     const nsChangeHint kUpdateOverflowAndRepaintHint =
       nsChangeHint_UpdateOverflow | nsChangeHint_RepaintFrame;
     for (uint8_t index = 0; index < 3; ++index)
       if (mTransformOrigin[index] != aOther.mTransformOrigin[index]) {
         transformHint |= nsChangeHint_UpdateTransformLayer |
                          nsChangeHint_UpdatePostTransformOverflow;
         break;
       }
-    
+
     for (uint8_t index = 0; index < 2; ++index)
       if (mPerspectiveOrigin[index] != aOther.mPerspectiveOrigin[index]) {
         transformHint |= kUpdateOverflowAndRepaintHint;
         break;
       }
 
     if (HasPerspectiveStyle() != aOther.HasPerspectiveStyle()) {
       // A change from/to being a containing block for position:fixed.
@@ -3046,20 +3046,20 @@ nsChangeHint nsStyleDisplay::CalcDiffere
       if (HasTransformStyle()) {
         hint |= transformHint;
       } else {
         hint |= nsChangeHint_NeutralChange;
       }
     }
   }
 
-  // Note that the HasTransformStyle() != aOther.HasTransformStyle() 
+  // Note that the HasTransformStyle() != aOther.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 
+  // 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;
   if (willChangeBitsChanged & (NS_STYLE_WILL_CHANGE_STACKING_CONTEXT |
                                NS_STYLE_WILL_CHANGE_SCROLL |
                                NS_STYLE_WILL_CHANGE_OPACITY)) {
     hint |= nsChangeHint_RepaintFrame;
   }
@@ -3369,40 +3369,40 @@ nsChangeHint nsStyleContent::CalcDiffere
   // 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 || 
+      mIncrementCount != aOther.mIncrementCount ||
       mResetCount != aOther.mResetCount) {
     return NS_STYLE_HINT_FRAMECHANGE;
   }
 
   uint32_t ix = mContentCount;
   while (0 < ix--) {
     if (mContents[ix] != aOther.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) || 
+    if ((mIncrements[ix].mValue != aOther.mIncrements[ix].mValue) ||
         (mIncrements[ix].mCounter != aOther.mIncrements[ix].mCounter)) {
       return NS_STYLE_HINT_FRAMECHANGE;
     }
   }
   ix = mResetCount;
   while (0 < ix--) {
-    if ((mResets[ix].mValue != aOther.mResets[ix].mValue) || 
+    if ((mResets[ix].mValue != aOther.mResets[ix].mValue) ||
         (mResets[ix].mCounter != aOther.mResets[ix].mCounter)) {
       return NS_STYLE_HINT_FRAMECHANGE;
     }
   }
   if (mMarkerOffset != aOther.mMarkerOffset) {
     return NS_STYLE_HINT_REFLOW;
   }
   return NS_STYLE_HINT_NONE;
@@ -3778,17 +3778,17 @@ nsChangeHint nsStyleUserInterface::CalcD
     // 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)
     hint |= NS_STYLE_HINT_VISUAL;
-  
+
   if (mUserInput != aOther.mUserInput) {
     if (NS_STYLE_USER_INPUT_NONE == mUserInput ||
         NS_STYLE_USER_INPUT_NONE == aOther.mUserInput) {
       hint |= NS_STYLE_HINT_FRAMECHANGE;
     } else {
       hint |= nsChangeHint_NeutralChange;
     }
   }