Make nsStyleCoord's member variables private, as they should have been. (Bug 730240) r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Fri, 24 Feb 2012 21:23:14 -0800
changeset 87709 b958923e04baf46fc6ae15bc57e4bc983d1113f4
parent 87708 350d812f93b9f80acf7a497c87eb692acd5cf91d
child 87710 ffc9d929b260b2d3c25d2ac855ea56c3c9de7833
push id22143
push userphilringnalda@gmail.com
push dateSun, 26 Feb 2012 23:12:35 +0000
treeherdermozilla-central@b98fc24ac54b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs730240
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Make nsStyleCoord's member variables private, as they should have been. (Bug 730240) r=bzbarsky
layout/style/nsComputedDOMStyle.cpp
layout/style/nsStyleCoord.h
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -1488,36 +1488,36 @@ nsComputedDOMStyle::GetCSSGradientString
 
   bool needSep = false;
   nsAutoString tokenString;
   nsROCSSPrimitiveValue *tmpVal = GetROCSSPrimitiveValue();
 
   if (aGradient->mToCorner) {
     AppendCSSGradientToBoxPosition(aGradient, aString, needSep);
   } else {
-    if (aGradient->mBgPosX.mUnit != eStyleUnit_None) {
+    if (aGradient->mBgPosX.GetUnit() != eStyleUnit_None) {
       AppendCSSGradientLength(aGradient->mBgPosX, tmpVal, aString);
       needSep = true;
     }
-    if (aGradient->mBgPosY.mUnit != eStyleUnit_None) {
+    if (aGradient->mBgPosY.GetUnit() != eStyleUnit_None) {
       if (needSep) {
         aString.AppendLiteral(" ");
       }
       AppendCSSGradientLength(aGradient->mBgPosY, tmpVal, aString);
       needSep = true;
     }
   }
-  if (aGradient->mAngle.mUnit != eStyleUnit_None) {
+  if (aGradient->mAngle.GetUnit() != eStyleUnit_None) {
     if (needSep) {
       aString.AppendLiteral(" ");
     }
     tmpVal->SetNumber(aGradient->mAngle.GetAngleValue());
     tmpVal->GetCssText(tokenString);
     aString.Append(tokenString);
-    switch (aGradient->mAngle.mUnit) {
+    switch (aGradient->mAngle.GetUnit()) {
     case eStyleUnit_Degree: aString.AppendLiteral("deg"); break;
     case eStyleUnit_Grad: aString.AppendLiteral("grad"); break;
     case eStyleUnit_Radian: aString.AppendLiteral("rad"); break;
     case eStyleUnit_Turn: aString.AppendLiteral("turn"); break;
     default: NS_NOTREACHED("unrecognized angle unit");
     }
     needSep = true;
   }
@@ -1545,17 +1545,17 @@ nsComputedDOMStyle::GetCSSGradientString
   for (PRUint32 i = 0; i < aGradient->mStops.Length(); ++i) {
     if (needSep) {
       aString.AppendLiteral(", ");
     }
     SetToRGBAColor(tmpVal, aGradient->mStops[i].mColor);
     tmpVal->GetCssText(tokenString);
     aString.Append(tokenString);
 
-    if (aGradient->mStops[i].mLocation.mUnit != eStyleUnit_None) {
+    if (aGradient->mStops[i].mLocation.GetUnit() != eStyleUnit_None) {
       aString.AppendLiteral(" ");
       AppendCSSGradientLength(aGradient->mStops[i].mLocation, tmpVal, aString);
     }
     needSep = true;
   }
 
   delete tmpVal;
   aString.AppendLiteral(")");
--- a/layout/style/nsStyleCoord.h
+++ b/layout/style/nsStyleCoord.h
@@ -174,17 +174,17 @@ public:
   void  SetPercentValue(float aValue);
   void  SetFactorValue(float aValue);
   void  SetAngleValue(float aValue, nsStyleUnit aUnit);
   void  SetNormalValue();
   void  SetAutoValue();
   void  SetNoneValue();
   void  SetCalcValue(Calc* aValue);
 
-public: // FIXME: private!
+private:
   nsStyleUnit   mUnit;
   nsStyleUnion  mValue;
 };
 
 /**
  * Class that represents a set of top/right/bottom/left nsStyleCoords.
  * This is commonly used to hold the widths of the borders, margins,
  * or paddings of a box.