Bug 523576 - Fix compilation with disable-svg. r=dbaron
authorRobert Longson <longsonr@gmail.com>
Sat, 12 Dec 2009 19:43:34 +0000
changeset 35641 b7755e1380c30995a57bc5acdf19dc7586120758
parent 35640 8bc6e7e44946d0f5ccc75821a1e52f6843d0639d
child 35642 7b22daaa50550f26efe2641cb1f62ec9b558b893
push idunknown
push userunknown
push dateunknown
reviewersdbaron
bugs523576
milestone1.9.3a1pre
Bug 523576 - Fix compilation with disable-svg. r=dbaron
layout/base/nsStyleConsts.h
layout/style/nsCSSDataBlock.h
layout/style/nsCSSDeclaration.cpp
layout/style/nsCSSKeywordList.h
layout/style/nsCSSPropList.h
layout/style/nsCSSProps.cpp
layout/style/nsCSSProps.h
layout/style/nsCSSStruct.cpp
layout/style/nsCSSStruct.h
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/nsRuleData.h
layout/style/nsRuleNode.cpp
layout/style/nsRuleNode.h
layout/style/nsStyleContext.cpp
layout/style/nsStyleStruct.cpp
layout/style/nsStyleStruct.h
layout/style/nsStyleStructList.h
--- a/layout/base/nsStyleConsts.h
+++ b/layout/base/nsStyleConsts.h
@@ -753,17 +753,16 @@
 #define NS_STYLE_GRADIENT_SHAPE_ELLIPTICAL      1
 #define NS_STYLE_GRADIENT_SHAPE_CIRCULAR        2
 
 #define NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE     0
 #define NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER   1
 #define NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE    2
 #define NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER  3
 
-#ifdef MOZ_SVG
 // See nsStyleSVG
 
 // dominant-baseline
 #define NS_STYLE_DOMINANT_BASELINE_AUTO              0
 #define NS_STYLE_DOMINANT_BASELINE_USE_SCRIPT        1
 #define NS_STYLE_DOMINANT_BASELINE_NO_CHANGE         2
 #define NS_STYLE_DOMINANT_BASELINE_RESET_SIZE        3
 #define NS_STYLE_DOMINANT_BASELINE_IDEOGRAPHIC       4
@@ -812,18 +811,16 @@
 #define NS_STYLE_TEXT_RENDERING_OPTIMIZELEGIBILITY 2
 #define NS_STYLE_TEXT_RENDERING_GEOMETRICPRECISION 3
 
 // color-interpolation and color-interpolation-filters
 #define NS_STYLE_COLOR_INTERPOLATION_AUTO           0
 #define NS_STYLE_COLOR_INTERPOLATION_SRGB           1
 #define NS_STYLE_COLOR_INTERPOLATION_LINEARRGB      2
 
-#endif // MOZ_SVG
-
 /*****************************************************************************
  * Constants for media features.                                             *
  *****************************************************************************/
 
 // orientation
 #define NS_STYLE_ORIENTATION_PORTRAIT           0
 #define NS_STYLE_ORIENTATION_LANDSCAPE          1
 
--- a/layout/style/nsCSSDataBlock.h
+++ b/layout/style/nsCSSDataBlock.h
@@ -211,19 +211,17 @@ public:
     nsCSSColor mColor;
     nsCSSContent mContent;
     nsCSSText mText;
     nsCSSUserInterface mUserInterface;
     nsCSSAural mAural;
     nsCSSPage mPage;
     nsCSSBreaks mBreaks;
     nsCSSXUL mXUL;
-#ifdef MOZ_SVG
     nsCSSSVG mSVG;
-#endif
     nsCSSColumn mColumn;
 
     /**
      * Transfer all of the state from the compressed block to this
      * expanded block.  The state of this expanded block must be clear
      * beforehand.
      *
      * The compressed block passed in IS RELEASED by this method and
--- a/layout/style/nsCSSDeclaration.cpp
+++ b/layout/style/nsCSSDeclaration.cpp
@@ -1093,29 +1093,27 @@ nsCSSDeclaration::GetValue(nsCSSProperty
         // The sublists are different lengths, so this can't be
         // represented as the shorthand.
         aValue.Truncate();
       }
 #undef NUM_TRANSITION_SUBPROPS
       break;
     }
 
-#ifdef MOZ_SVG
     case eCSSProperty_marker: {
       const nsCSSValue &endValue =
         *data->ValueStorageFor(eCSSProperty_marker_end);
       const nsCSSValue &midValue =
         *data->ValueStorageFor(eCSSProperty_marker_mid);
       const nsCSSValue &startValue =
         *data->ValueStorageFor(eCSSProperty_marker_start);
       if (endValue == midValue && midValue == startValue)
         AppendValueToString(eCSSProperty_marker_end, aValue);
       break;
     }
-#endif
     default:
       NS_NOTREACHED("no other shorthands");
       break;
   }
   return NS_OK;
 }
 
 PRBool
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -587,17 +587,16 @@ CSS_KEY(button-focus, buttonfocus)
 CSS_KEY(-moz-win-media-toolbox, _moz_win_media_toolbox)
 CSS_KEY(-moz-win-communications-toolbox, _moz_win_communications_toolbox)
 CSS_KEY(-moz-win-browsertabbar-toolbox, _moz_win_browsertabbar_toolbox)
 CSS_KEY(-moz-win-mediatext, _moz_win_mediatext)
 CSS_KEY(-moz-win-communicationstext, _moz_win_communicationstext)
 CSS_KEY(-moz-win-glass, _moz_win_glass)
 CSS_KEY(-moz-mac-unified-toolbar, _moz_mac_unified_toolbar)
 
-#ifdef MOZ_SVG
 CSS_KEY(alphabetic, alphabetic)
 CSS_KEY(bevel, bevel)
 CSS_KEY(butt, butt)
 CSS_KEY(central, central)
 CSS_KEY(crispedges, crispedges)
 //CSS_KEY(end, end)
 CSS_KEY(evenodd, evenodd)
 CSS_KEY(geometricprecision, geometricprecision)
@@ -615,9 +614,8 @@ CSS_KEY(optimizespeed, optimizespeed)
 CSS_KEY(reset-size, reset_size)
 //CSS_KEY(square, square)
 //CSS_KEY(start, start)
 CSS_KEY(srgb, srgb)
 CSS_KEY(text-after-edge, text_after_edge)
 CSS_KEY(text-before-edge, text_before_edge)
 CSS_KEY(use-script, use_script)
 CSS_KEY(-moz-crisp-edges, _moz_crisp_edges)
-#endif
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -2692,17 +2692,16 @@ CSS_PROP_FONT(
     mScriptMinSize,
     eCSSType_Value,
     nsnull,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 #endif
 #endif
 
-#ifdef MOZ_SVG
 // XXX treat SVG's CSS Properties as internal for now.
 // Do we want to create an nsIDOMSVGCSS2Properties interface?
 #ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
 CSS_PROP_SVGRESET(
     clip-path,
     clip_path,
     ClipPath,
     0,
@@ -3032,17 +3031,16 @@ CSS_PROP_SVG(
     0,
     SVG,
     mTextRendering,
     eCSSType_Value,
     kTextRenderingKTable,
     offsetof(nsStyleSVG, mTextRendering),
     eStyleAnimType_EnumU8)
 #endif /* !defined (CSS_PROP_LIST_EXCLUDE_INTERNAL) */
-#endif
 
 // Callers that want information on the properties that are in
 // the style structs but not in the nsCSS* structs should define
 // |CSS_PROP_INCLUDE_NOT_CSS|.  (Some of these are also in nsRuleData*,
 // and a distinction might be needed at some point.)
 // The first 3 parameters don't matter, but some compilers don't like
 // empty arguments to macros.
 #ifdef CSS_PROP_INCLUDE_NOT_CSS
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -1299,17 +1299,16 @@ const PRInt32 nsCSSProps::kBoxOrientKTab
 const PRInt32 nsCSSProps::kBoxPackKTable[] = {
   eCSSKeyword_start,  NS_STYLE_BOX_PACK_START,
   eCSSKeyword_center,   NS_STYLE_BOX_PACK_CENTER,
   eCSSKeyword_end, NS_STYLE_BOX_PACK_END,
   eCSSKeyword_justify, NS_STYLE_BOX_PACK_JUSTIFY,
   eCSSKeyword_UNKNOWN,-1
 };
 
-#ifdef MOZ_SVG
 // keyword tables for SVG properties
 
 const PRInt32 nsCSSProps::kDominantBaselineKTable[] = {
   eCSSKeyword_auto, NS_STYLE_DOMINANT_BASELINE_AUTO,
   eCSSKeyword_use_script, NS_STYLE_DOMINANT_BASELINE_USE_SCRIPT,
   eCSSKeyword_no_change, NS_STYLE_DOMINANT_BASELINE_NO_CHANGE,
   eCSSKeyword_reset_size, NS_STYLE_DOMINANT_BASELINE_RESET_SIZE,
   eCSSKeyword_alphabetic, NS_STYLE_DOMINANT_BASELINE_ALPHABETIC,
@@ -1376,18 +1375,16 @@ const PRInt32 nsCSSProps::kTextRendering
 
 const PRInt32 nsCSSProps::kColorInterpolationKTable[] = {
   eCSSKeyword_auto, NS_STYLE_COLOR_INTERPOLATION_AUTO,
   eCSSKeyword_srgb, NS_STYLE_COLOR_INTERPOLATION_SRGB,
   eCSSKeyword_linearrgb, NS_STYLE_COLOR_INTERPOLATION_LINEARRGB,
   eCSSKeyword_UNKNOWN, -1
 };
 
-#endif
-
 PRBool
 nsCSSProps::FindKeyword(nsCSSKeyword aKeyword, const PRInt32 aTable[], PRInt32& aResult)
 {
   PRInt32 index = 0;
   while (eCSSKeyword_UNKNOWN != nsCSSKeyword(aTable[index])) {
     if (aKeyword == nsCSSKeyword(aTable[index])) {
       aResult = aTable[index+1];
       return PR_TRUE;
@@ -1950,23 +1947,21 @@ static const nsCSSProperty gPauseSubprop
 static const nsCSSProperty gMozTransitionSubpropTable[] = {
   eCSSProperty_transition_property,
   eCSSProperty_transition_duration,
   eCSSProperty_transition_timing_function,
   eCSSProperty_transition_delay,
   eCSSProperty_UNKNOWN
 };
 
-#ifdef MOZ_SVG
 static const nsCSSProperty gMarkerSubpropTable[] = {
   eCSSProperty_marker_start,
   eCSSProperty_marker_mid,
   eCSSProperty_marker_end,
   eCSSProperty_UNKNOWN
 };
-#endif
 
 const nsCSSProperty *const
 nsCSSProps::kSubpropertyTable[eCSSProperty_COUNT - eCSSProperty_COUNT_no_shorthands] = {
 #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) g##method_##SubpropTable,
 #include "nsCSSPropList.h"
 #undef CSS_PROP_SHORTHAND
 };
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -243,27 +243,25 @@ public:
   static const PRInt32 kBorderColorKTable[];
   static const PRInt32 kBorderImageKTable[];
   static const PRInt32 kBorderStyleKTable[];
   static const PRInt32 kBorderWidthKTable[];
   static const PRInt32 kBoxAlignKTable[];
   static const PRInt32 kBoxDirectionKTable[];
   static const PRInt32 kBoxOrientKTable[];
   static const PRInt32 kBoxPackKTable[];
-#ifdef MOZ_SVG
   static const PRInt32 kDominantBaselineKTable[];
   static const PRInt32 kFillRuleKTable[];
   static const PRInt32 kImageRenderingKTable[];
   static const PRInt32 kShapeRenderingKTable[];
   static const PRInt32 kStrokeLinecapKTable[];
   static const PRInt32 kStrokeLinejoinKTable[];
   static const PRInt32 kTextAnchorKTable[];
   static const PRInt32 kTextRenderingKTable[];
   static const PRInt32 kColorInterpolationKTable[];
-#endif
   static const PRInt32 kBoxPropSourceKTable[];
   static const PRInt32 kBoxShadowTypeKTable[];
   static const PRInt32 kBoxSizingKTable[];
   static const PRInt32 kCaptionSideKTable[];
   static const PRInt32 kClearKTable[];
   static const PRInt32 kColorKTable[];
   static const PRInt32 kContentKTable[];
   static const PRInt32 kCursorKTable[];
--- a/layout/style/nsCSSStruct.cpp
+++ b/layout/style/nsCSSStruct.cpp
@@ -459,23 +459,20 @@ nsCSSColumn::nsCSSColumn(void)
   MOZ_COUNT_CTOR(nsCSSColumn);
 }
 
 nsCSSColumn::~nsCSSColumn(void)
 {
   MOZ_COUNT_DTOR(nsCSSColumn);
 }
 
-#ifdef MOZ_SVG
 // --- nsCSSSVG -----------------
 
 nsCSSSVG::nsCSSSVG(void) : mStrokeDasharray(nsnull)
 {
   MOZ_COUNT_CTOR(nsCSSSVG);
 }
 
 nsCSSSVG::~nsCSSSVG(void)
 {
   MOZ_COUNT_DTOR(nsCSSSVG);
   delete mStrokeDasharray;
 }
-
-#endif // MOZ_SVG
--- a/layout/style/nsCSSStruct.h
+++ b/layout/style/nsCSSStruct.h
@@ -667,17 +667,16 @@ private:
 };
 
 struct nsRuleDataColumn : public nsCSSColumn {
   nsRuleDataColumn() {}
 private:
   nsRuleDataColumn(const nsRuleDataColumn& aOther); // NOT IMPLEMENTED
 };
 
-#ifdef MOZ_SVG
 struct nsCSSSVG : public nsCSSStruct {
   nsCSSSVG(void);
   ~nsCSSSVG(void);
 
   nsCSSValue mClipPath;
   nsCSSValue mClipRule;
   nsCSSValue mColorInterpolation;
   nsCSSValue mColorInterpolationFilters;
@@ -711,11 +710,10 @@ private:
   nsCSSSVG(const nsCSSSVG& aOther); // NOT IMPLEMENTED
 };
 
 struct nsRuleDataSVG : public nsCSSSVG {
   nsRuleDataSVG() {}
 private:
   nsRuleDataSVG(const nsRuleDataSVG& aOther); // NOT IMPLEMENTED
 };
-#endif
 
 #endif /* nsCSSStruct_h___ */
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -3737,18 +3737,16 @@ nsComputedDOMStyle::GetFrameBoundsHeight
   // Check to see that we're transformed.
   if (!mInnerFrame->GetStyleDisplay()->HasTransform())
     return PR_FALSE;
 
   aHeight = nsDisplayTransform::GetFrameBoundsForTransform(mInnerFrame).height;
   return PR_TRUE;
 }
 
-#ifdef MOZ_SVG
-
 nsresult
 nsComputedDOMStyle::GetSVGPaintFor(PRBool aFill,
                                    nsIDOMCSSValue** aValue)
 {
   nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
   NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);
 
   const nsStyleSVG* svg = GetStyleSVG();
@@ -4203,18 +4201,16 @@ nsComputedDOMStyle::GetMask(nsIDOMCSSVal
   if (svg->mMask)
     val->SetURI(svg->mMask);
   else
     val->SetIdent(eCSSKeyword_none);
 
   return CallQueryInterface(val, aValue);
 }
 
-#endif // MOZ_SVG
-
 nsresult
 nsComputedDOMStyle::GetTransitionDelay(nsIDOMCSSValue** aValue)
 {
   const nsStyleDisplay* display = GetStyleDisplay();
 
   nsDOMCSSValueList *valueList = GetROCSSValueList(PR_TRUE);
   NS_ENSURE_TRUE(valueList, NS_ERROR_OUT_OF_MEMORY);
 
@@ -4532,20 +4528,17 @@ nsComputedDOMStyle::GetQueryableProperty
     COMPUTED_STYLE_MAP_ENTRY(user_input,                    UserInput),
     COMPUTED_STYLE_MAP_ENTRY(user_modify,                   UserModify),
     COMPUTED_STYLE_MAP_ENTRY(user_select,                   UserSelect),
     COMPUTED_STYLE_MAP_ENTRY(transition_delay,              TransitionDelay),
     COMPUTED_STYLE_MAP_ENTRY(transition_duration,           TransitionDuration),
     COMPUTED_STYLE_MAP_ENTRY(transition_property,           TransitionProperty),
     COMPUTED_STYLE_MAP_ENTRY(transition_timing_function,    TransitionTimingFunction),
     COMPUTED_STYLE_MAP_ENTRY(_moz_window_shadow,            WindowShadow),
-    COMPUTED_STYLE_MAP_ENTRY(word_wrap,                     WordWrap)
-
-#ifdef MOZ_SVG
-    ,
+    COMPUTED_STYLE_MAP_ENTRY(word_wrap,                     WordWrap),
     COMPUTED_STYLE_MAP_ENTRY(clip_path,                     ClipPath),
     COMPUTED_STYLE_MAP_ENTRY(clip_rule,                     ClipRule),
     COMPUTED_STYLE_MAP_ENTRY(color_interpolation,           ColorInterpolation),
     COMPUTED_STYLE_MAP_ENTRY(color_interpolation_filters,   ColorInterpolationFilters),
     COMPUTED_STYLE_MAP_ENTRY(dominant_baseline,             DominantBaseline),
     COMPUTED_STYLE_MAP_ENTRY(fill,                          Fill),
     COMPUTED_STYLE_MAP_ENTRY(fill_opacity,                  FillOpacity),
     COMPUTED_STYLE_MAP_ENTRY(fill_rule,                     FillRule),
@@ -4566,17 +4559,16 @@ nsComputedDOMStyle::GetQueryableProperty
     COMPUTED_STYLE_MAP_ENTRY(stroke_dashoffset,             StrokeDashoffset),
     COMPUTED_STYLE_MAP_ENTRY(stroke_linecap,                StrokeLinecap),
     COMPUTED_STYLE_MAP_ENTRY(stroke_linejoin,               StrokeLinejoin),
     COMPUTED_STYLE_MAP_ENTRY(stroke_miterlimit,             StrokeMiterlimit),
     COMPUTED_STYLE_MAP_ENTRY(stroke_opacity,                StrokeOpacity),
     COMPUTED_STYLE_MAP_ENTRY(stroke_width,                  StrokeWidth),
     COMPUTED_STYLE_MAP_ENTRY(text_anchor,                   TextAnchor),
     COMPUTED_STYLE_MAP_ENTRY(text_rendering,                TextRendering)
-#endif
 
   };
 
   *aLength = NS_ARRAY_LENGTH(map);
 
   return map;
 }
 
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -331,17 +331,16 @@ private:
   nsresult GetColumnRuleColor(nsIDOMCSSValue** aValue);
 
   /* CSS Transitions */
   nsresult GetTransitionProperty(nsIDOMCSSValue** aValue);
   nsresult GetTransitionDuration(nsIDOMCSSValue** aValue);
   nsresult GetTransitionDelay(nsIDOMCSSValue** aValue);
   nsresult GetTransitionTimingFunction(nsIDOMCSSValue** aValue);
 
-#ifdef MOZ_SVG
   /* SVG properties */
   nsresult GetSVGPaintFor(PRBool aFill, nsIDOMCSSValue** aValue);
 
   nsresult GetFill(nsIDOMCSSValue** aValue);
   nsresult GetStroke(nsIDOMCSSValue** aValue);
   nsresult GetMarkerEnd(nsIDOMCSSValue** aValue);
   nsresult GetMarkerMid(nsIDOMCSSValue** aValue);
   nsresult GetMarkerStart(nsIDOMCSSValue** aValue);
@@ -371,17 +370,16 @@ private:
 
   nsresult GetFloodColor(nsIDOMCSSValue** aValue);
   nsresult GetLightingColor(nsIDOMCSSValue** aValue);
   nsresult GetStopColor(nsIDOMCSSValue** aValue);
 
   nsresult GetClipPath(nsIDOMCSSValue** aValue);
   nsresult GetFilter(nsIDOMCSSValue** aValue);
   nsresult GetMask(nsIDOMCSSValue** aValue);
-#endif // MOZ_SVG
 
   nsROCSSPrimitiveValue* GetROCSSPrimitiveValue();
   nsDOMCSSValueList* GetROCSSValueList(PRBool aCommaDelimited);
   nsresult SetToRGBAColor(nsROCSSPrimitiveValue* aValue, nscolor aColor);
   nsresult SetValueToStyleImage(const nsStyleImage& aStyleImage,
                                 nsROCSSPrimitiveValue* aValue);
   
   /**
--- a/layout/style/nsRuleData.h
+++ b/layout/style/nsRuleData.h
@@ -67,31 +67,24 @@ struct nsRuleData
   nsRuleDataList* mListData;
   nsRuleDataPosition* mPositionData;
   nsRuleDataTable* mTableData;
   nsRuleDataColor* mColorData;
   nsRuleDataContent* mContentData;
   nsRuleDataText* mTextData;
   nsRuleDataUserInterface* mUserInterfaceData;
   nsRuleDataXUL* mXULData;
-
-#ifdef MOZ_SVG
   nsRuleDataSVG* mSVGData;
-#endif
 
   nsRuleDataColumn* mColumnData;
 
   nsRuleData(PRUint32 aSIDs, nsPresContext* aContext, nsStyleContext* aStyleContext) 
     :mSIDs(aSIDs), mPresContext(aContext), mStyleContext(aStyleContext), mPostResolveCallback(nsnull),
      mFontData(nsnull), mDisplayData(nsnull), mMarginData(nsnull), mListData(nsnull), 
      mPositionData(nsnull), mTableData(nsnull), mColorData(nsnull), mContentData(nsnull), mTextData(nsnull),
-     mUserInterfaceData(nsnull), mColumnData(nsnull)
+     mUserInterfaceData(nsnull), mXULData(nsnull), mSVGData(nsnull), mColumnData(nsnull)
   {
     mCanStoreInRuleTree = PR_TRUE;
-    mXULData = nsnull;
-#ifdef MOZ_SVG
-    mSVGData = nsnull;
-#endif
   }
   ~nsRuleData() {}
 };
 
 #endif
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -1324,29 +1324,27 @@ static const PropertyCheckData UIResetCh
 };
 
 static const PropertyCheckData XULCheckProperties[] = {
 #define CSS_PROP_XUL CHECK_DATA_FOR_PROPERTY
 #include "nsCSSPropList.h"
 #undef CSS_PROP_XUL
 };
 
-#ifdef MOZ_SVG
 static const PropertyCheckData SVGCheckProperties[] = {
 #define CSS_PROP_SVG CHECK_DATA_FOR_PROPERTY
 #include "nsCSSPropList.h"
 #undef CSS_PROP_SVG
 };
 
 static const PropertyCheckData SVGResetCheckProperties[] = {
 #define CSS_PROP_SVGRESET CHECK_DATA_FOR_PROPERTY
 #include "nsCSSPropList.h"
 #undef CSS_PROP_SVGRESET
 };
-#endif
 
 static const PropertyCheckData ColumnCheckProperties[] = {
 #define CSS_PROP_COLUMN CHECK_DATA_FOR_PROPERTY
 #include "nsCSSPropList.h"
 #undef CSS_PROP_COLUMN
 };
 
 #undef CSS_PROP_INCLUDE_NOT_CSS
@@ -1807,17 +1805,16 @@ nsRuleNode::GetColumnData(nsStyleContext
 {
   nsRuleDataColumn columnData; // Declare a struct with null CSS values.
   nsRuleData ruleData(NS_STYLE_INHERIT_BIT(Column), mPresContext, aContext);
   ruleData.mColumnData = &columnData;
 
   return WalkRuleTree(eStyleStruct_Column, aContext, &ruleData, &columnData);
 }
 
-#ifdef MOZ_SVG
 const void*
 nsRuleNode::GetSVGData(nsStyleContext* aContext)
 {
   nsRuleDataSVG svgData; // Declare a struct with null CSS values.
   nsRuleData ruleData(NS_STYLE_INHERIT_BIT(SVG), mPresContext, aContext);
   ruleData.mSVGData = &svgData;
 
   const void *res = WalkRuleTree(eStyleStruct_SVG, aContext, &ruleData, &svgData);
@@ -1829,17 +1826,16 @@ const void*
 nsRuleNode::GetSVGResetData(nsStyleContext* aContext)
 {
   nsRuleDataSVG svgData; // Declare a struct with null CSS values.
   nsRuleData ruleData(NS_STYLE_INHERIT_BIT(SVGReset), mPresContext, aContext);
   ruleData.mSVGData = &svgData;
 
   return WalkRuleTree(eStyleStruct_SVGReset, aContext, &ruleData, &svgData);
 }
-#endif
 
 // If we need to restrict which properties apply to the style context,
 // return the bit to check in nsCSSProp's flags table.  Otherwise,
 // return 0.
 inline PRUint32
 GetPseudoRestriction(nsStyleContext *aContext)
 {
   // This needs to match nsStyleSet::WalkRestrictionRule.
@@ -2245,17 +2241,16 @@ nsRuleNode::SetDefaultOnRoot(const nsSty
     {
       nsStyleColumn* column = new (mPresContext) nsStyleColumn(mPresContext);
       if (NS_LIKELY(column != nsnull)) {
         aContext->SetStyle(eStyleStruct_Column, column);
       }
       return column;
     }
 
-#ifdef MOZ_SVG
     case eStyleStruct_SVG:
     {
       nsStyleSVG* svg = new (mPresContext) nsStyleSVG();
       if (NS_LIKELY(svg != nsnull)) {
         aContext->SetStyle(eStyleStruct_SVG, svg);
       }
       return svg;
     }
@@ -2263,17 +2258,16 @@ nsRuleNode::SetDefaultOnRoot(const nsSty
     case eStyleStruct_SVGReset:
     {
       nsStyleSVGReset* svgReset = new (mPresContext) nsStyleSVGReset();
       if (NS_LIKELY(svgReset != nsnull)) {
         aContext->SetStyle(eStyleStruct_SVGReset, svgReset);
       }
       return svgReset;
     }
-#endif
     default:
       /*
        * unhandled case: nsStyleStructID_Length.
        * last item of nsStyleStructID, to know its length.
        */
       return nsnull;
   }
   return nsnull;
@@ -5710,17 +5704,16 @@ nsRuleNode::ComputeColumnData(void* aSta
   else if (SetColor(colorValue, 0, mPresContext, aContext,
                     column->mColumnRuleColor, canStoreInRuleTree)) {
     column->mColumnRuleColorIsForeground = PR_FALSE;
   }
 
   COMPUTE_END_RESET(Column, column)
 }
 
-#ifdef MOZ_SVG
 static void
 SetSVGPaint(const nsCSSValuePair& aValue, const nsStyleSVGPaint& parentPaint,
             nsPresContext* aPresContext, nsStyleContext *aContext,
             nsStyleSVGPaint& aResult, nsStyleSVGPaintType aInitialPaintType,
             PRBool& aCanStoreInRuleTree)
 {
   nscolor color;
 
@@ -6018,17 +6011,16 @@ nsRuleNode::ComputeSVGResetData(void* aS
     svgReset->mMask = nsnull;
   } else if (eCSSUnit_Inherit == SVGData.mMask.GetUnit()) {
     canStoreInRuleTree = PR_FALSE;
     svgReset->mMask = parentSVGReset->mMask;
   }
 
   COMPUTE_END_RESET(SVGReset, svgReset)
 }
-#endif
 
 inline const void*
 nsRuleNode::GetParentData(const nsStyleStructID aSID)
 {
   NS_PRECONDITION(mDependentBits & nsCachedStyleData::GetBitForSID(aSID),
                   "should be called when node depends on parent data");
   NS_ASSERTION(mStyleData.GetStyleData(aSID) == nsnull,
                "both struct and dependent bits present");
--- a/layout/style/nsRuleNode.h
+++ b/layout/style/nsRuleNode.h
@@ -625,31 +625,29 @@ protected:
 
   NS_HIDDEN_(const void*)
     ComputeColumnData(void* aStartStruct,
                       const nsRuleDataStruct& aData,
                       nsStyleContext* aContext, nsRuleNode* aHighestNode,
                       RuleDetail aRuleDetail,
                       const PRBool aCanStoreInRuleTree);
 
-#ifdef MOZ_SVG
   NS_HIDDEN_(const void*)
     ComputeSVGData(void* aStartStruct,
                    const nsRuleDataStruct& aData, 
                    nsStyleContext* aContext, nsRuleNode* aHighestNode,
                    RuleDetail aRuleDetail,
                    const PRBool aCanStoreInRuleTree);
 
   NS_HIDDEN_(const void*)
     ComputeSVGResetData(void* aStartStruct,
                         const nsRuleDataStruct& aData, 
                         nsStyleContext* aContext, nsRuleNode* aHighestNode,
                         RuleDetail aRuleDetail,
                         const PRBool aCanStoreInRuleTree);
-#endif
 
   // helpers for |ComputeFontData| that need access to |mNoneBits|:
   static NS_HIDDEN_(void) SetFontSize(nsPresContext* aPresContext,
                                       const nsRuleDataFont& aFontData,
                                       const nsStyleFont* aFont,
                                       const nsStyleFont* aParentFont,
                                       nscoord* aSize,
                                       const nsFont& aSystemFont,
@@ -710,20 +708,18 @@ protected:
   NS_HIDDEN_(const void*) GetQuotesData(nsStyleContext* aContext);
   NS_HIDDEN_(const void*) GetTextData(nsStyleContext* aContext);
   NS_HIDDEN_(const void*) GetTextResetData(nsStyleContext* aContext);
   NS_HIDDEN_(const void*) GetUserInterfaceData(nsStyleContext* aContext);
 
   NS_HIDDEN_(const void*) GetUIResetData(nsStyleContext* aContext);
   NS_HIDDEN_(const void*) GetXULData(nsStyleContext* aContext);
   NS_HIDDEN_(const void*) GetColumnData(nsStyleContext* aContext);
-#ifdef MOZ_SVG
   NS_HIDDEN_(const void*) GetSVGData(nsStyleContext* aContext);
   NS_HIDDEN_(const void*) GetSVGResetData(nsStyleContext* aContext);
-#endif
 
   NS_HIDDEN_(already_AddRefed<nsCSSShadowArray>)
                           GetShadowData(nsCSSValueList* aList,
                                         nsStyleContext* aContext,
                                         PRBool aIsBoxShadow,
                                         PRBool& inherited);
 
 private:
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -437,21 +437,19 @@ nsStyleContext::CalcStyleDifference(nsSt
   DO_STRUCT_DIFFERENCE(Table);
   DO_STRUCT_DIFFERENCE(UIReset);
   DO_STRUCT_DIFFERENCE(Text);
   DO_STRUCT_DIFFERENCE(List);
   // 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.
   DO_STRUCT_DIFFERENCE(Quotes);
 
-#ifdef MOZ_SVG
   maxHint = nsChangeHint(NS_STYLE_HINT_REFLOW | nsChangeHint_UpdateEffects);
   DO_STRUCT_DIFFERENCE(SVGReset);
   DO_STRUCT_DIFFERENCE(SVG);
-#endif
 
   // At this point, we know that the worst kind of damage we could do is
   // a reflow.
   maxHint = NS_STYLE_HINT_REFLOW;
       
   // The following structs cause (as their maximal difference) a reflow
   // to occur.  REFLOW Structs: Font, Margin, Padding, Border, List,
   // Position, Text, TextReset
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -777,17 +777,16 @@ nsChangeHint nsStyleColumn::CalcDifferen
 #ifdef DEBUG
 /* static */
 nsChangeHint nsStyleColumn::MaxDifference()
 {
   return NS_STYLE_HINT_FRAMECHANGE;
 }
 #endif
 
-#ifdef MOZ_SVG
 // --------------------
 // nsStyleSVG
 //
 nsStyleSVG::nsStyleSVG() 
 {
     MOZ_COUNT_CTOR(nsStyleSVG);
     mFill.mType              = eStyleSVGPaintType_Color;
     mFill.mPaint.mColor      = NS_RGB(0,0,0);
@@ -1055,18 +1054,16 @@ PRBool nsStyleSVGPaint::operator==(const
   if (mType == eStyleSVGPaintType_Server)
     return EqualURIs(mPaint.mPaintServer, aOther.mPaint.mPaintServer) &&
            mFallbackColor == aOther.mFallbackColor;
   if (mType == eStyleSVGPaintType_None)
     return PR_TRUE;
   return mPaint.mColor == aOther.mPaint.mColor;
 }
 
-#endif // MOZ_SVG
-
 
 // --------------------
 // nsStylePosition
 //
 nsStylePosition::nsStylePosition(void) 
 { 
   MOZ_COUNT_CTOR(nsStylePosition);
   // positioning values not inherited
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -1792,17 +1792,16 @@ struct nsStyleColumn {
     return (IsVisibleBorderStyle(mColumnRuleStyle) ? mColumnRuleWidth : 0);
   }
 
 protected:
   nscoord mColumnRuleWidth;  // [reset] coord
   nscoord mTwipsPerPixel;
 };
 
-#ifdef MOZ_SVG
 enum nsStyleSVGPaintType {
   eStyleSVGPaintType_None = 1,
   eStyleSVGPaintType_Color,
   eStyleSVGPaintType_Server
 };
 
 struct nsStyleSVGPaint
 {
@@ -1896,11 +1895,10 @@ struct nsStyleSVGReset {
   nscolor          mFloodColor;       // [reset]
   nscolor          mLightingColor;    // [reset]
 
   float            mStopOpacity;      // [reset]
   float            mFloodOpacity;     // [reset]
 
   PRUint8          mDominantBaseline; // [reset] see nsStyleConsts.h
 };
-#endif
 
 #endif /* nsStyleStruct_h___ */
--- a/layout/style/nsStyleStructList.h
+++ b/layout/style/nsStyleStructList.h
@@ -135,29 +135,24 @@ STYLE_STRUCT_RESET(Border, nsnull, (SSAR
   STYLE_STRUCT_TEST_CODE(    })
   STYLE_STRUCT_TEST_CODE(  } else {)
   STYLE_STRUCT_TEST_CODE(    if (STYLE_STRUCT_TEST == 18) {)
 STYLE_STRUCT_RESET(Outline, nsnull, (SSARG_PRESCONTEXT))
   STYLE_STRUCT_TEST_CODE(    } else {)
 STYLE_STRUCT_RESET(XUL, nsnull, ())
   STYLE_STRUCT_TEST_CODE(    })
   STYLE_STRUCT_TEST_CODE(  })
-#ifndef MOZ_SVG
-  STYLE_STRUCT_TEST_CODE(} else {)
-  STYLE_STRUCT_TEST_CODE(  NS_ASSERTION(STYLE_STRUCT_TEST == 20, "out of range");)
-#else
   STYLE_STRUCT_TEST_CODE(} else if (STYLE_STRUCT_TEST < 22) {)
   STYLE_STRUCT_TEST_CODE(  if (STYLE_STRUCT_TEST == 20) {)
 STYLE_STRUCT_INHERITED(SVG, nsnull, ())
   STYLE_STRUCT_TEST_CODE(  } else {)
 STYLE_STRUCT_RESET(SVGReset,nsnull, ())
   STYLE_STRUCT_TEST_CODE(  })
   STYLE_STRUCT_TEST_CODE(} else {)
   STYLE_STRUCT_TEST_CODE(  NS_ASSERTION(STYLE_STRUCT_TEST == 22, "out of range");)
-#endif
   STYLE_STRUCT_RESET(Column, nsnull, (SSARG_PRESCONTEXT))
 STYLE_STRUCT_TEST_CODE(})
       
 #ifdef UNDEF_STYLE_STRUCT_INHERITED
 #undef STYLE_STRUCT_INHERITED
 #undef UNDEF_STYLE_STRUCT_INHERITED
 #endif