Bug 1175800 - Remove typedefs from nsComputedDOMStyle.cpp as they interfere with others under unified compilation. r=bzbarsky
authorCameron McCormack <cam@mcc.id.au>
Thu, 18 Jun 2015 16:52:49 +1000
changeset 267611 d80bdc49a0d56f9cfe83ae81651687ae7b151f50
parent 267610 2f789a4def0a7c18443039df41a2d5d9c82b5692
child 267612 08b29870bef49e830e3d4e13910166ca8c243512
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1175800
milestone41.0a1
Bug 1175800 - Remove typedefs from nsComputedDOMStyle.cpp as they interfere with others under unified compilation. r=bzbarsky
layout/style/nsComputedDOMStyle.cpp
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -46,19 +46,16 @@
 #include "mozilla/dom/Element.h"
 #include "prtime.h"
 #include "nsWrapperCacheInlines.h"
 #include "mozilla/AppUnits.h"
 #include <algorithm>
 
 using namespace mozilla;
 using namespace mozilla::dom;
-typedef const nsStyleBackground::Position Position;
-typedef const nsStyleBackground::Position::PositionCoord PositionCoord;
-typedef nsStyleTransformMatrix::TransformReferenceBox TransformReferenceBox;
 
 #if defined(DEBUG_bzbarsky) || defined(DEBUG_caillon)
 #define DEBUG_ComputedDOMStyle
 #endif
 
 /*
  * This is the implementation of the readonly CSSStyleDeclaration that is
  * returned by the getComputedStyle() function.
@@ -1260,17 +1257,18 @@ nsComputedDOMStyle::DoGetTransform()
    * TODO: There is no good way for us to represent the case where there's no
    * frame, which is problematic.  The reason is that when we have percentage
    * transforms, there are a total of four stored matrix entries that influence
    * the transform based on the size of the element.  However, this poses a
    * problem, because only two of these values can be explicitly referenced
    * using the named transforms.  Until a real solution is found, we'll just
    * use this approach.
    */
-  TransformReferenceBox refBox(mInnerFrame, nsSize(0, 0));
+  nsStyleTransformMatrix::TransformReferenceBox refBox(mInnerFrame,
+                                                       nsSize(0, 0));
 
    bool dummy;
    gfx3DMatrix matrix =
      nsStyleTransformMatrix::ReadTransforms(display->mSpecifiedTransform->mHead,
                                             mStyleContextHolder,
                                             mStyleContextHolder->PresContext(),
                                             dummy,
                                             refBox,
@@ -2077,33 +2075,35 @@ CSSValue*
 nsComputedDOMStyle::DoGetBackgroundOrigin()
 {
   return GetBackgroundList(&nsStyleBackground::Layer::mOrigin,
                            &nsStyleBackground::mOriginCount,
                            nsCSSProps::kBackgroundOriginKTable);
 }
 
 void
-nsComputedDOMStyle::SetValueToPositionCoord(const PositionCoord& aCoord,
-                                            nsROCSSPrimitiveValue* aValue)
+nsComputedDOMStyle::SetValueToPositionCoord(
+    const nsStyleBackground::Position::PositionCoord& aCoord,
+    nsROCSSPrimitiveValue* aValue)
 {
   if (!aCoord.mHasPercent) {
     MOZ_ASSERT(aCoord.mPercent == 0.0f,
                "Shouldn't have mPercent!");
     aValue->SetAppUnits(aCoord.mLength);
   } else if (aCoord.mLength == 0) {
     aValue->SetPercent(aCoord.mPercent);
   } else {
     SetValueToCalc(&aCoord, aValue);
   }
 }
 
 void
-nsComputedDOMStyle::SetValueToPosition(const Position& aPosition,
-                                       nsDOMCSSValueList* aValueList)
+nsComputedDOMStyle::SetValueToPosition(
+    const nsStyleBackground::Position& aPosition,
+    nsDOMCSSValueList* aValueList)
 {
   nsROCSSPrimitiveValue* valX = new nsROCSSPrimitiveValue;
   aValueList->AppendCSSValue(valX);
   SetValueToPositionCoord(aPosition.mXPosition, valX);
 
   nsROCSSPrimitiveValue* valY = new nsROCSSPrimitiveValue;
   aValueList->AppendCSSValue(valY);
   SetValueToPositionCoord(aPosition.mYPosition, valY);
@@ -4993,31 +4993,31 @@ nsComputedDOMStyle::GetFrameBoundsWidthF
 {
   // We need a frame to work with.
   if (!mInnerFrame) {
     return false;
   }
 
   AssertFlushedPendingReflows();
 
-  aWidth = TransformReferenceBox(mInnerFrame).Width();
+  aWidth = nsStyleTransformMatrix::TransformReferenceBox(mInnerFrame).Width();
   return true;
 }
 
 bool
 nsComputedDOMStyle::GetFrameBoundsHeightForTransform(nscoord& aHeight)
 {
   // We need a frame to work with.
   if (!mInnerFrame) {
     return false;
   }
 
   AssertFlushedPendingReflows();
 
-  aHeight = TransformReferenceBox(mInnerFrame).Height();
+  aHeight = nsStyleTransformMatrix::TransformReferenceBox(mInnerFrame).Height();
   return true;
 }
 
 CSSValue*
 nsComputedDOMStyle::GetSVGPaintFor(bool aFill)
 {
   nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;