Fix Thunderbird/--disable-svg bustage from bug 379178. rs=jwatt
authorjwalden@mit.edu
Mon, 06 Aug 2007 11:00:01 -0700
changeset 4314 8b96da4e125d2ed4997fb0f398843c8d07fa05e8
parent 4313 5981a4c540f27ca6f941886dffd7d23235693741
child 4315 b5106a98eb526b9cf447c96abb703bb941b0ef55
push idunknown
push userunknown
push dateunknown
reviewersjwatt
bugs379178
milestone1.9a8pre
Fix Thunderbird/--disable-svg bustage from bug 379178. rs=jwatt
content/base/src/nsStyledElement.cpp
--- a/content/base/src/nsStyledElement.cpp
+++ b/content/base/src/nsStyledElement.cpp
@@ -45,17 +45,20 @@
 #include "nsMutationEvent.h"
 #include "nsDOMCSSDeclaration.h"
 #include "nsICSSOMFactory.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIDocument.h"
 #include "nsICSSStyleRule.h"
 #include "nsICSSParser.h"
 #include "nsICSSLoader.h"
+
+#ifdef MOZ_SVG
 #include "nsIDOMSVGStylable.h"
+#endif
 
 //----------------------------------------------------------------------
 // nsIContent methods
 
 nsIAtom*
 nsStyledElement::GetClassAttributeName() const
 {
   return nsGkAtoms::_class;
@@ -78,18 +81,20 @@ nsStyledElement::ParseAttribute(PRInt32 
                                 const nsAString& aValue, nsAttrValue& aResult)
 {
   if (aNamespaceID == kNameSpaceID_None) {
     if (aAttribute == nsGkAtoms::style) {
       ParseStyleAttribute(this, aValue, aResult);
       return PR_TRUE;
     }
     if (aAttribute == nsGkAtoms::_class) {
+#ifdef MOZ_SVG
       NS_ASSERTION(!nsCOMPtr<nsIDOMSVGStylable>(do_QueryInterface(this)),
                    "SVG code should have handled this 'class' attribute!");
+#endif
       aResult.ParseAtomArray(aValue);
       return PR_TRUE;
     }
   }
 
   return nsStyledElementBase::ParseAttribute(aNamespaceID, aAttribute, aValue,
                                              aResult);
 }