Bug 566808 - "DeCOMtaminate nsIStyleRule method signatures" [r=dbaron]
authorCraig Topper <craig.topper@gmail.com>
Wed, 19 May 2010 22:28:00 -0400
changeset 43120 9a7be1835b530c72a46069a5c3951b80b16804a3
parent 43119 4153cd536a731cf51eb7b40693213b79b0fbe5ec
child 43121 63b89b3114614929b80a358163a2d1ae9feea91b
push idunknown
push userunknown
push dateunknown
reviewersdbaron
bugs566808
milestone1.9.3a5pre
Bug 566808 - "DeCOMtaminate nsIStyleRule method signatures" [r=dbaron]
content/base/src/nsMappedAttributes.cpp
content/base/src/nsMappedAttributes.h
content/html/content/src/nsHTMLBodyElement.cpp
content/svg/content/src/nsSVGElement.h
layout/style/nsCSSDataBlock.cpp
layout/style/nsCSSDataBlock.h
layout/style/nsCSSRule.cpp
layout/style/nsCSSRule.h
layout/style/nsCSSRules.cpp
layout/style/nsCSSRules.h
layout/style/nsCSSStyleRule.cpp
layout/style/nsHTMLStyleSheet.cpp
layout/style/nsHTMLStyleSheet.h
layout/style/nsICSSGroupRule.h
layout/style/nsICSSImportRule.h
layout/style/nsICSSNameSpaceRule.h
layout/style/nsICSSRule.h
layout/style/nsICSSStyleRule.h
layout/style/nsIStyleRule.h
layout/style/nsStyleSet.cpp
layout/style/nsStyleSet.h
layout/style/nsTransitionManager.cpp
--- a/content/base/src/nsMappedAttributes.cpp
+++ b/content/base/src/nsMappedAttributes.cpp
@@ -190,27 +190,26 @@ void
 nsMappedAttributes::SetStyleSheet(nsHTMLStyleSheet* aSheet)
 {
   if (mSheet) {
     mSheet->DropMappedAttributes(this);
   }
   mSheet = aSheet;  // not ref counted
 }
 
-NS_IMETHODIMP
+/* virtual */ void
 nsMappedAttributes::MapRuleInfoInto(nsRuleData* aRuleData)
 {
   if (mRuleMapper) {
     (*mRuleMapper)(this, aRuleData);
   }
-  return NS_OK;
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 nsMappedAttributes::List(FILE* out, PRInt32 aIndent) const
 {
   nsAutoString buffer;
   PRUint32 i;
 
   for (i = 0; i < mAttrCount; ++i) {
     PRInt32 indent;
     for (indent = aIndent; indent > 0; --indent)
@@ -223,18 +222,16 @@ nsMappedAttributes::List(FILE* out, PRIn
       Attrs()[i].mName.NodeInfo()->GetQualifiedName(buffer);
     }
     fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
 
     Attrs()[i].mValue.ToString(buffer);
     fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
     fputs("\n", out);
   }
-
-  return NS_OK;
 }
 #endif
 
 void
 nsMappedAttributes::RemoveAttrAt(PRUint32 aPos, nsAttrValue& aValue)
 {
   Attrs()[aPos].mValue.SwapValueWith(aValue);
   Attrs()[aPos].~InternalAttr();
--- a/content/base/src/nsMappedAttributes.h
+++ b/content/base/src/nsMappedAttributes.h
@@ -98,19 +98,19 @@ public:
   // Remove the attr at position aPos.  The value of the attr is placed in
   // aValue; any value that was already in aValue is destroyed.
   void RemoveAttrAt(PRUint32 aPos, nsAttrValue& aValue);
   const nsAttrName* GetExistingAttrNameFromQName(const nsAString& aName) const;
   PRInt32 IndexOfAttr(nsIAtom* aLocalName, PRInt32 aNamespaceID) const;
   
 
   // nsIStyleRule 
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 #ifdef DEBUG
-  NS_METHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
 private:
   nsMappedAttributes(const nsMappedAttributes& aCopy);
   ~nsMappedAttributes();
 
   struct InternalAttr
   {
--- a/content/html/content/src/nsHTMLBodyElement.cpp
+++ b/content/html/content/src/nsHTMLBodyElement.cpp
@@ -64,19 +64,19 @@ class nsHTMLBodyElement;
 class BodyRule: public nsIStyleRule {
 public:
   BodyRule(nsHTMLBodyElement* aPart);
   virtual ~BodyRule();
 
   NS_DECL_ISUPPORTS
 
   // nsIStyleRule interface
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   nsHTMLBodyElement*  mPart;  // not ref-counted, cleared by content 
 };
 
 //----------------------------------------------------------------------
 
 class nsHTMLBodyElement : public nsGenericHTMLElement,
@@ -127,21 +127,21 @@ BodyRule::BodyRule(nsHTMLBodyElement* aP
 }
 
 BodyRule::~BodyRule()
 {
 }
 
 NS_IMPL_ISUPPORTS1(BodyRule, nsIStyleRule)
 
-NS_IMETHODIMP
+/* virtual */ void
 BodyRule::MapRuleInfoInto(nsRuleData* aData)
 {
   if (!aData || !(aData->mSIDs & NS_STYLE_INHERIT_BIT(Margin)) || !aData->mMarginData || !mPart)
-    return NS_OK; // We only care about margins.
+    return; // We only care about margins.
 
   PRInt32 bodyMarginWidth  = -1;
   PRInt32 bodyMarginHeight = -1;
   PRInt32 bodyTopMargin = -1;
   PRInt32 bodyBottomMargin = -1;
   PRInt32 bodyLeftMargin = -1;
   PRInt32 bodyRightMargin = -1;
 
@@ -256,24 +256,22 @@ BodyRule::MapRuleInfoInto(nsRuleData* aD
           if (margin.mTop.GetUnit() == eCSSUnit_Null)
             margin.mTop.SetFloatValue((float)frameMarginHeight, eCSSUnit_Pixel);
           if (margin.mBottom.GetUnit() == eCSSUnit_Null)
             margin.mBottom.SetFloatValue((float)frameMarginHeight, eCSSUnit_Pixel);
         }
       }
     }
   }
-  return NS_OK;
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 BodyRule::List(FILE* out, PRInt32 aIndent) const
 {
-  return NS_OK;
 }
 #endif
 
 //----------------------------------------------------------------------
 
 
 NS_IMPL_NS_NEW_HTML_ELEMENT(Body)
 
--- a/content/svg/content/src/nsSVGElement.h
+++ b/content/svg/content/src/nsSVGElement.h
@@ -65,16 +65,17 @@ class nsSVGNumber2;
 class nsSVGInteger;
 class nsSVGAngle;
 class nsSVGBoolean;
 class nsSVGEnum;
 struct nsSVGEnumMapping;
 class nsSVGViewBox;
 class nsSVGPreserveAspectRatio;
 class nsSVGString;
+struct gfxMatrix;
 
 typedef nsStyledElement nsSVGElementBase;
 
 class nsSVGElement : public nsSVGElementBase,    // nsIContent
                      public nsISVGValueObserver  // :nsISupportsWeakReference
 {
 protected:
   nsSVGElement(nsINodeInfo *aNodeInfo);
--- a/layout/style/nsCSSDataBlock.cpp
+++ b/layout/style/nsCSSDataBlock.cpp
@@ -213,25 +213,25 @@ ShouldStartImageLoads(nsRuleData *aRuleD
   //  (2) in some cases we'd start the image load on a style change
   //      where we wouldn't have started the load initially, which makes
   //      which links are visited detectable to Web pages (see bug
   //      557287)
   return !aRuleData->mStyleContext->IsStyleIfVisited() &&
          nsCSSProps::PropHasFlags(aProperty, CSS_PROPERTY_START_IMAGE_LOADS);
 }
 
-nsresult
+void
 nsCSSCompressedDataBlock::MapRuleInfoInto(nsRuleData *aRuleData) const
 {
     // If we have no data for these structs, then return immediately.
     // This optimization should make us return most of the time, so we
     // have to worry much less (although still some) about the speed of
     // the rest of the function.
     if (!(aRuleData->mSIDs & mStyleBits))
-        return NS_OK;
+        return;
 
     nsIDocument* doc = aRuleData->mPresContext->Document();
 
     const char* cursor = Block();
     const char* cursor_end = BlockEnd();
     while (cursor < cursor_end) {
         nsCSSProperty iProp = PropertyAtCursor(cursor);
         NS_ASSERTION(0 <= iProp && iProp < eCSSProperty_COUNT_no_shorthands,
@@ -353,18 +353,16 @@ nsCSSCompressedDataBlock::MapRuleInfoInt
                 case eCSSType_ValueList:
                 case eCSSType_ValuePairList: {
                     cursor += CDBPointerStorage_advance;
                 } break;
             }
         }
     }
     NS_ASSERTION(cursor == cursor_end, "inconsistent data");
-
-    return NS_OK;
 }
 
 const void*
 nsCSSCompressedDataBlock::StorageFor(nsCSSProperty aProperty) const
 {
     NS_PRECONDITION(!nsCSSProps::IsShorthand(aProperty),
                     "Don't call for shorthands");
 
--- a/layout/style/nsCSSDataBlock.h
+++ b/layout/style/nsCSSDataBlock.h
@@ -67,17 +67,17 @@ class nsCSSCompressedDataBlock {
 public:
     friend class nsCSSExpandedDataBlock;
     friend class nsCSSDeclaration;
 
     /**
      * Do what |nsIStyleRule::MapRuleInfoInto| needs to do for a style
      * rule using this block for storage.
      */
-    nsresult MapRuleInfoInto(nsRuleData *aRuleData) const;
+    void MapRuleInfoInto(nsRuleData *aRuleData) const;
 
     /**
      * Return the location at which the *value* for the property is
      * stored, or null if the block does not contain a value for the
      * property.  This is either an |nsCSSValue*|, |nsCSSRect*|, or an
      * |nsCSSValueList**|, etc.
      *
      * Inefficient (by design).
--- a/layout/style/nsCSSRule.cpp
+++ b/layout/style/nsCSSRule.cpp
@@ -84,15 +84,14 @@ nsCSSRule::SetParentRule(nsICSSGroupRule
 {
   // We don't reference count this up reference. The group rule
   // will tell us when it's going away or when we're detached from
   // it.
   mParentRule = aRule;
   return NS_OK;
 }
 
-NS_IMETHODIMP
+/* virtual */ void
 nsCSSRule::MapRuleInfoInto(nsRuleData* aRuleData)
 {
   // The nsIStyleRule contract is not appropriate for all CSS rules.
   NS_NOTREACHED("nsCSSRule::MapRuleInfoInto");
-  return NS_OK;
 }
--- a/layout/style/nsCSSRule.h
+++ b/layout/style/nsCSSRule.h
@@ -63,17 +63,17 @@ public:
 
   NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
   NS_IMETHOD SetStyleSheet(nsCSSStyleSheet* aSheet);
 
   NS_IMETHOD SetParentRule(nsICSSGroupRule* aRule);
 
   // nsIStyleRule methods
   // The new mapping function.
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 
 protected:
   nsCSSStyleSheet*    mSheet;
   nsICSSGroupRule*    mParentRule;
 #ifdef DEBUG_REFS
   PRInt32 mInstance;
 #endif
 };
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -73,22 +73,22 @@
 #include "nsCSSDeclaration.h"
 #include "nsPrintfCString.h"
 
 #define IMPL_STYLE_RULE_INHERIT(_class, super) \
 NS_IMETHODIMP _class::GetStyleSheet(nsIStyleSheet*& aSheet) const { return super::GetStyleSheet(aSheet); }  \
 NS_IMETHODIMP _class::SetStyleSheet(nsCSSStyleSheet* aSheet) { return super::SetStyleSheet(aSheet); }  \
 NS_IMETHODIMP _class::SetParentRule(nsICSSGroupRule* aRule) { return super::SetParentRule(aRule); }  \
 nsIDOMCSSRule* _class::GetDOMRuleWeak(nsresult *aResult) { *aResult = NS_OK; return this; }  \
-NS_IMETHODIMP _class::MapRuleInfoInto(nsRuleData* aRuleData) { return NS_OK; } 
+/* virtual */ void _class::MapRuleInfoInto(nsRuleData* aRuleData) { }
 
 #define IMPL_STYLE_RULE_INHERIT2(_class, super) \
 NS_IMETHODIMP _class::GetStyleSheet(nsIStyleSheet*& aSheet) const { return super::GetStyleSheet(aSheet); }  \
 NS_IMETHODIMP _class::SetParentRule(nsICSSGroupRule* aRule) { return super::SetParentRule(aRule); }  \
-NS_IMETHODIMP _class::MapRuleInfoInto(nsRuleData* aRuleData) { return NS_OK; } 
+/* virtual */ void _class::MapRuleInfoInto(nsRuleData* aRuleData) { }
 
 // -------------------------------
 // Style Rule List for group rules
 //
 class CSSGroupRuleRuleListImpl : public nsICSSRuleList
 {
 public:
   CSSGroupRuleRuleListImpl(nsICSSGroupRule *aGroupRule);
@@ -195,17 +195,17 @@ public:
   virtual ~CSSCharsetRuleImpl(void);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   DECL_STYLE_RULE_INHERIT
 
   // nsIStyleRule methods
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   // nsICSSRule methods
   NS_IMETHOD GetType(PRInt32& aType) const;
   NS_IMETHOD Clone(nsICSSRule*& aClone) const;
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
@@ -247,27 +247,25 @@ NS_INTERFACE_MAP_BEGIN(CSSCharsetRuleImp
   NS_INTERFACE_MAP_ENTRY(nsIDOMCSSCharsetRule)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsICSSRule)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSCharsetRule)
 NS_INTERFACE_MAP_END
 
 IMPL_STYLE_RULE_INHERIT(CSSCharsetRuleImpl, nsCSSRule)
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 CSSCharsetRuleImpl::List(FILE* out, PRInt32 aIndent) const
 {
   // Indent
   for (PRInt32 indent = aIndent; --indent >= 0; ) fputs("  ", out);
 
   fputs("@charset \"", out);
   fputs(NS_LossyConvertUTF16toASCII(mEncoding).get(), out);
   fputs("\"\n", out);
-
-  return NS_OK;
 }
 #endif
 
 NS_IMETHODIMP
 CSSCharsetRuleImpl::GetType(PRInt32& aType) const
 {
   aType = nsICSSRule::CHARSET_RULE;
   return NS_OK;
@@ -371,17 +369,17 @@ public:
   virtual ~CSSImportRuleImpl(void);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   DECL_STYLE_RULE_INHERIT
 
   // nsIStyleRule methods
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   // nsICSSRule methods
   NS_IMETHOD GetType(PRInt32& aType) const;
   NS_IMETHOD Clone(nsICSSRule*& aClone) const;
 
   // nsICSSImportRule methods
   NS_IMETHOD SetURLSpec(const nsString& aURLSpec);
@@ -447,32 +445,30 @@ NS_INTERFACE_MAP_BEGIN(CSSImportRuleImpl
   NS_INTERFACE_MAP_ENTRY(nsIDOMCSSImportRule)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsICSSImportRule)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSImportRule)
 NS_INTERFACE_MAP_END
 
 IMPL_STYLE_RULE_INHERIT(CSSImportRuleImpl, nsCSSRule)
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 CSSImportRuleImpl::List(FILE* out, PRInt32 aIndent) const
 {
   // Indent
   for (PRInt32 indent = aIndent; --indent >= 0; ) fputs("  ", out);
 
   fputs("@import \"", out);
   fputs(NS_LossyConvertUTF16toASCII(mURLSpec).get(), out);
   fputs("\" ", out);
 
   nsAutoString mediaText;
   mMedia->GetText(mediaText);
   fputs(NS_LossyConvertUTF16toASCII(mediaText).get(), out);
   fputs("\n", out);
-
-  return NS_OK;
 }
 #endif
 
 NS_IMETHODIMP
 CSSImportRuleImpl::GetType(PRInt32& aType) const
 {
   aType = nsICSSRule::IMPORT_RULE;
   return NS_OK;
@@ -695,26 +691,25 @@ SetStyleSheetReference(nsICSSRule* aRule
 NS_IMETHODIMP
 nsCSSGroupRule::SetStyleSheet(nsCSSStyleSheet* aSheet)
 {
   mRules.EnumerateForwards(SetStyleSheetReference, aSheet);
   return nsCSSRule::SetStyleSheet(aSheet);
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 nsCSSGroupRule::List(FILE* out, PRInt32 aIndent) const
 {
   fputs(" {\n", out);
 
   for (PRInt32 index = 0, count = mRules.Count(); index < count; ++index) {
     mRules.ObjectAt(index)->List(out, aIndent + 1);
   }
   fputs("}\n", out);
-  return NS_OK;
 }
 #endif
 
 NS_IMETHODIMP
 nsCSSGroupRule::AppendStyleRule(nsICSSRule* aRule)
 {
   mRules.AppendObject(aRule);
   aRule->SetStyleSheet(mSheet);
@@ -929,32 +924,32 @@ nsCSSMediaRule::SetStyleSheet(nsCSSStyle
     mMedia->SetStyleSheet(nsnull);
     mMedia->SetStyleSheet(aSheet);
   }
 
   return nsCSSGroupRule::SetStyleSheet(aSheet);
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 nsCSSMediaRule::List(FILE* out, PRInt32 aIndent) const
 {
   for (PRInt32 indent = aIndent; --indent >= 0; ) fputs("  ", out);
 
   nsAutoString  buffer;
 
   fputs("@media ", out);
 
   if (mMedia) {
     nsAutoString mediaText;
     mMedia->GetText(mediaText);
     fputs(NS_LossyConvertUTF16toASCII(mediaText).get(), out);
   }
 
-  return nsCSSGroupRule::List(out, aIndent);
+  nsCSSGroupRule::List(out, aIndent);
 }
 #endif
 
 NS_IMETHODIMP
 nsCSSMediaRule::GetType(PRInt32& aType) const
 {
   aType = nsICSSRule::MEDIA_RULE;
   return NS_OK;
@@ -1089,17 +1084,17 @@ NS_INTERFACE_MAP_BEGIN(nsCSSDocumentRule
   NS_INTERFACE_MAP_ENTRY(nsIStyleRule)
   NS_INTERFACE_MAP_ENTRY(nsIDOMCSSRule)
   NS_INTERFACE_MAP_ENTRY(nsIDOMCSSMozDocumentRule)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsCSSGroupRule)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSMozDocumentRule)
 NS_INTERFACE_MAP_END
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 nsCSSDocumentRule::List(FILE* out, PRInt32 aIndent) const
 {
   for (PRInt32 indent = aIndent; --indent >= 0; ) fputs("  ", out);
 
   nsCAutoString str;
   str.AssignLiteral("@-moz-document ");
   for (URL *url = mURLs; url; url = url->next) {
     switch (url->func) {
@@ -1116,17 +1111,17 @@ nsCSSDocumentRule::List(FILE* out, PRInt
     nsCAutoString escapedURL(url->url);
     escapedURL.ReplaceSubstring("\"", "\\\""); // escape quotes
     str.Append(escapedURL);
     str.AppendLiteral("\"), ");
   }
   str.Cut(str.Length() - 2, 1); // remove last ,
   fputs(str.get(), out);
 
-  return nsCSSGroupRule::List(out, aIndent);
+  nsCSSGroupRule::List(out, aIndent);
 }
 #endif
 
 NS_IMETHODIMP
 nsCSSDocumentRule::GetType(PRInt32& aType) const
 {
   aType = nsICSSRule::DOCUMENT_RULE;
   return NS_OK;
@@ -1271,17 +1266,17 @@ public:
   virtual ~CSSNameSpaceRuleImpl(void);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   DECL_STYLE_RULE_INHERIT
 
   // nsIStyleRule methods
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   // nsICSSRule methods
   NS_IMETHOD GetType(PRInt32& aType) const;
   NS_IMETHOD Clone(nsICSSRule*& aClone) const;
 
   // nsICSSNameSpaceRule methods
   NS_IMETHOD GetPrefix(nsIAtom*& aPrefix) const;
@@ -1331,17 +1326,17 @@ NS_INTERFACE_MAP_BEGIN(CSSNameSpaceRuleI
   NS_INTERFACE_MAP_ENTRY(nsIDOMCSSRule)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsICSSNameSpaceRule)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSNameSpaceRule)
 NS_INTERFACE_MAP_END
 
 IMPL_STYLE_RULE_INHERIT(CSSNameSpaceRuleImpl, nsCSSRule)
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 CSSNameSpaceRuleImpl::List(FILE* out, PRInt32 aIndent) const
 {
   for (PRInt32 indent = aIndent; --indent >= 0; ) fputs("  ", out);
 
   nsAutoString  buffer;
 
   fputs("@namespace ", out);
 
@@ -1349,17 +1344,16 @@ CSSNameSpaceRuleImpl::List(FILE* out, PR
     mPrefix->ToString(buffer);
     fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
     fputs(" ", out);
   }
 
   fputs("url(", out);
   fputs(NS_LossyConvertUTF16toASCII(mURLSpec).get(), out);
   fputs(")\n", out);
-  return NS_OK;
 }
 #endif
 
 NS_IMETHODIMP
 CSSNameSpaceRuleImpl::GetType(PRInt32& aType) const
 {
   aType = nsICSSRule::NAMESPACE_RULE;
   return NS_OK;
@@ -1820,17 +1814,17 @@ NS_INTERFACE_MAP_BEGIN(nsCSSFontFaceRule
   NS_INTERFACE_MAP_ENTRY(nsIDOMCSSRule)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsICSSRule)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSFontFaceRule)
 NS_INTERFACE_MAP_END
 
 IMPL_STYLE_RULE_INHERIT(nsCSSFontFaceRule, nsCSSRule)
 
 #ifdef DEBUG
-NS_IMETHODIMP
+void
 nsCSSFontFaceRule::List(FILE* out, PRInt32 aIndent) const
 {
   nsCString baseInd, descInd;
   for (PRInt32 indent = aIndent; --indent >= 0; ) {
     baseInd.AppendLiteral("  ");
     descInd.AppendLiteral("  ");
   }
   descInd.AppendLiteral("  ");
@@ -1847,17 +1841,16 @@ nsCSSFontFaceRule::List(FILE* out, PRInt
         descStr.AssignLiteral("#<serialization error>");
       else if (descStr.Length() == 0)
         descStr.AssignLiteral("#<serialization missing>");
       fprintf(out, "%s%s: %s\n",
               descInd.get(), nsCSSProps::GetStringValue(id).get(),
               NS_ConvertUTF16toUTF8(descStr).get());
     }
   fprintf(out, "%s}\n", baseInd.get());
-  return NS_OK;
 }
 #endif
 
 NS_IMETHODIMP
 nsCSSFontFaceRule::GetType(PRInt32& aType) const
 {
   aType = nsICSSRule::FONT_FACE_RULE;
   return NS_OK;
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -55,17 +55,17 @@
 
 class CSSGroupRuleRuleListImpl;
 class nsMediaList;
 
 #define DECL_STYLE_RULE_INHERIT_NO_DOMRULE  \
 NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const; \
 NS_IMETHOD SetStyleSheet(nsCSSStyleSheet* aSheet); \
 NS_IMETHOD SetParentRule(nsICSSGroupRule* aRule); \
-NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 
 #define DECL_STYLE_RULE_INHERIT  \
 DECL_STYLE_RULE_INHERIT_NO_DOMRULE \
 nsIDOMCSSRule* GetDOMRuleWeak(nsresult* aResult);
 
 // inherits from nsCSSRule and also implements methods on nsICSSGroupRule
 // so they can be shared between nsCSSMediaRule and nsCSSDocumentRule
 class nsCSSGroupRule : public nsCSSRule, public nsICSSGroupRule
@@ -75,17 +75,17 @@ protected:
   nsCSSGroupRule(const nsCSSGroupRule& aCopy);
   ~nsCSSGroupRule();
 
   // implement part of nsIStyleRule and nsICSSRule
   DECL_STYLE_RULE_INHERIT_NO_DOMRULE
 
   // to help implement nsIStyleRule
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
 public:
   // implement nsICSSGroupRule
   NS_IMETHOD AppendStyleRule(nsICSSRule* aRule);
   NS_IMETHOD StyleRuleCount(PRInt32& aCount) const;
   NS_IMETHOD GetStyleRuleAt(PRInt32 aIndex, nsICSSRule*& aRule) const;
   NS_IMETHOD_(PRBool) EnumerateRulesForwards(RuleEnumFunc aFunc, void * aData) const;
@@ -119,17 +119,17 @@ public:
   nsCSSMediaRule();
   nsCSSMediaRule(const nsCSSMediaRule& aCopy);
   virtual ~nsCSSMediaRule();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIStyleRule methods
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   // nsICSSRule methods
   NS_IMETHOD SetStyleSheet(nsCSSStyleSheet* aSheet); //override nsCSSGroupRule
   NS_IMETHOD GetType(PRInt32& aType) const;
   NS_IMETHOD Clone(nsICSSRule*& aClone) const;
   nsIDOMCSSRule* GetDOMRuleWeak(nsresult *aResult)
   {
@@ -161,17 +161,17 @@ public:
   nsCSSDocumentRule(void);
   nsCSSDocumentRule(const nsCSSDocumentRule& aCopy);
   virtual ~nsCSSDocumentRule(void);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIStyleRule methods
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   // nsICSSRule methods
   NS_IMETHOD GetType(PRInt32& aType) const;
   NS_IMETHOD Clone(nsICSSRule*& aClone) const;
   nsIDOMCSSRule* GetDOMRuleWeak(nsresult *aResult)
   {
     *aResult = NS_OK;
@@ -250,17 +250,17 @@ class nsCSSFontFaceRule : public nsCSSRu
                           public nsICSSRule,
                           public nsIDOMCSSFontFaceRule
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIStyleRule methods
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   // nsICSSRule methods
   DECL_STYLE_RULE_INHERIT
 
   NS_IMETHOD GetType(PRInt32& aType) const;
   NS_IMETHOD Clone(nsICSSRule*& aClone) const;
 
--- a/layout/style/nsCSSStyleRule.cpp
+++ b/layout/style/nsCSSStyleRule.cpp
@@ -898,19 +898,19 @@ class CSSStyleRuleImpl;
 
 class CSSImportantRule : public nsIStyleRule {
 public:
   CSSImportantRule(nsCSSCompressedDataBlock *aImportantBlock);
 
   NS_DECL_ISUPPORTS
 
   // nsIStyleRule interface
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
 protected:
   virtual ~CSSImportantRule(void);
 
   nsRefPtr<nsCSSCompressedDataBlock> mImportantBlock;
 
   friend class CSSStyleRuleImpl;
@@ -922,32 +922,31 @@ CSSImportantRule::CSSImportantRule(nsCSS
 }
 
 CSSImportantRule::~CSSImportantRule(void)
 {
 }
 
 NS_IMPL_ISUPPORTS1(CSSImportantRule, nsIStyleRule)
 
-NS_IMETHODIMP
+/* virtual */ void
 CSSImportantRule::MapRuleInfoInto(nsRuleData* aRuleData)
 {
-  return mImportantBlock->MapRuleInfoInto(aRuleData);
+  mImportantBlock->MapRuleInfoInto(aRuleData);
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 CSSImportantRule::List(FILE* out, PRInt32 aIndent) const
 {
   // Indent
   for (PRInt32 index = aIndent; --index >= 0; ) fputs("  ", out);
 
   fprintf(out, "! Important rule block=%p\n",
           static_cast<void*>(mImportantBlock.get()));
-  return NS_OK;
 }
 #endif
 
 // --------------------------------------------------------
 
 class DOMCSSStyleRuleImpl;
 
 class DOMCSSDeclarationImpl : public nsDOMCSSDeclaration
@@ -1314,20 +1313,20 @@ public:
   NS_IMETHOD Clone(nsICSSRule*& aClone) const;
 
   nsIDOMCSSRule* GetDOMRuleWeak(nsresult* aResult);
 
   virtual already_AddRefed<nsICSSStyleRule>
     DeclarationChanged(PRBool aHandleContainer);
 
   // The new mapping function.
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
 private: 
   // These are not supported and are not implemented! 
   CSSStyleRuleImpl& operator=(const CSSStyleRuleImpl& aCopy); 
 
 protected:
   virtual ~CSSStyleRuleImpl(void);
@@ -1545,26 +1544,26 @@ CSSStyleRuleImpl::DeclarationChanged(PRB
     } else {
       mSheet->ReplaceStyleRule(this, clone);
     }
   }
 
   return clone;
 }
 
-NS_IMETHODIMP
+/* virtual */ void
 CSSStyleRuleImpl::MapRuleInfoInto(nsRuleData* aRuleData)
 {
   NS_ABORT_IF_FALSE(mNormalBlock,
                     "somebody forgot to call nsICSSStyleRule::RuleMatched");
-  return mNormalBlock->MapRuleInfoInto(aRuleData);
+  mNormalBlock->MapRuleInfoInto(aRuleData);
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 CSSStyleRuleImpl::List(FILE* out, PRInt32 aIndent) const
 {
   // Indent
   for (PRInt32 index = aIndent; --index >= 0; ) fputs("  ", out);
 
   nsAutoString buffer;
   if (mSelector)
     mSelector->ToString(buffer, mSheet);
@@ -1573,18 +1572,16 @@ CSSStyleRuleImpl::List(FILE* out, PRInt3
   fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
   if (nsnull != mDeclaration) {
     mDeclaration->List(out);
   }
   else {
     fputs("{ null declaration }", out);
   }
   fputs("\n", out);
-
-  return NS_OK;
 }
 #endif
 
 /* virtual */ nsresult
 CSSStyleRuleImpl::GetCssText(nsAString& aCssText)
 {
   if (mSelector) {
     mSelector->ToString(aCssText, mSheet);
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -71,64 +71,59 @@
 #include "nsContentErrors.h"
 #include "nsRuleProcessorData.h"
 #include "mozilla/dom/Element.h"
 
 using namespace mozilla::dom;
 
 NS_IMPL_ISUPPORTS1(nsHTMLStyleSheet::HTMLColorRule, nsIStyleRule)
 
-NS_IMETHODIMP
+/* virtual */ void
 nsHTMLStyleSheet::HTMLColorRule::MapRuleInfoInto(nsRuleData* aRuleData)
 {
   if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Color)) {
     if (aRuleData->mColorData->mColor.GetUnit() == eCSSUnit_Null &&
         aRuleData->mPresContext->UseDocumentColors())
       aRuleData->mColorData->mColor.SetColorValue(mColor);
   }
-  return NS_OK;
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 nsHTMLStyleSheet::HTMLColorRule::List(FILE* out, PRInt32 aIndent) const
 {
-  return NS_OK;
 }
 #endif
 
  
 NS_IMPL_ISUPPORTS1(nsHTMLStyleSheet::GenericTableRule, nsIStyleRule)
 
-NS_IMETHODIMP
+/* virtual */ void
 nsHTMLStyleSheet::GenericTableRule::MapRuleInfoInto(nsRuleData* aRuleData)
 {
   // Nothing to do.
-  return NS_OK;
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 nsHTMLStyleSheet::GenericTableRule::List(FILE* out, PRInt32 aIndent) const
 {
-  return NS_OK;
 }
 #endif
 
-NS_IMETHODIMP
+/* virtual */ void
 nsHTMLStyleSheet::TableTHRule::MapRuleInfoInto(nsRuleData* aRuleData)
 {
   if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Text)) {
     if (aRuleData->mTextData->mTextAlign.GetUnit() == eCSSUnit_Null) {
       aRuleData->mTextData->mTextAlign.
         SetIntValue(NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT,
                     eCSSUnit_Enumerated);
     }
   }
-  return NS_OK;
 }
 
 // -----------------------------------------------------------
 
 struct MappedAttrTableEntry : public PLDHashEntryHdr {
   nsMappedAttributes *mAttributes;
 };
 
--- a/layout/style/nsHTMLStyleSheet.h
+++ b/layout/style/nsHTMLStyleSheet.h
@@ -114,48 +114,48 @@ private:
   friend class HTMLColorRule;
   class HTMLColorRule : public nsIStyleRule {
   public:
     HTMLColorRule() {}
 
     NS_DECL_ISUPPORTS
 
     // nsIStyleRule interface
-    NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+    virtual void MapRuleInfoInto(nsRuleData* aRuleData);
   #ifdef DEBUG
-    NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+    virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
   #endif
 
     nscolor             mColor;
   };
 
 
   class GenericTableRule;
   friend class GenericTableRule;
   class GenericTableRule: public nsIStyleRule {
   public:
     GenericTableRule() {}
 
     NS_DECL_ISUPPORTS
 
     // nsIStyleRule interface
-    NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+    virtual void MapRuleInfoInto(nsRuleData* aRuleData);
   #ifdef DEBUG
-    NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+    virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
   #endif
   };
 
   // this rule handles <th> inheritance
   class TableTHRule;
   friend class TableTHRule;
   class TableTHRule: public GenericTableRule {
   public:
     TableTHRule() {}
 
-    NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+    virtual void MapRuleInfoInto(nsRuleData* aRuleData);
   };
 
   nsCOMPtr<nsIURI>        mURL;
   nsIDocument*            mDocument;
   nsRefPtr<HTMLColorRule> mLinkRule;
   nsRefPtr<HTMLColorRule> mVisitedRule;
   nsRefPtr<HTMLColorRule> mActiveRule;
   nsRefPtr<HTMLColorRule> mDocumentColorRule;
--- a/layout/style/nsICSSGroupRule.h
+++ b/layout/style/nsICSSGroupRule.h
@@ -41,23 +41,23 @@
  */
 
 #ifndef nsICSSGroupRule_h___
 #define nsICSSGroupRule_h___
 
 #include "nsICSSRule.h"
 #include "nsCOMArray.h"
 
-class nsIAtom;
 class nsPresContext;
 class nsMediaQueryResultCacheKey;
 
-// IID for the nsICSSGroupRule interface {d0f07b17-e9c7-4a54-aaa4-622425b38d27}
+// IID for the nsICSSGroupRule interface {4d5e7eca-433e-491a-b226-39a200390ea1}
 #define NS_ICSS_GROUP_RULE_IID     \
-{0xd0f07b17, 0xe9c7, 0x4a54, {0xaa, 0xa4, 0x62, 0x24, 0x25, 0xb3, 0x8d, 0x27}}
+{0x4d5e7eca, 0x433e, 0x491a, {0xb2, 0x26, 0x39, 0xa2, 0x00, 0x39, 0x0e, 0xa1}}
+
 
 class nsICSSGroupRule : public nsICSSRule {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSS_GROUP_RULE_IID)
 
   NS_IMETHOD  AppendStyleRule(nsICSSRule* aRule) = 0;
 
   NS_IMETHOD  StyleRuleCount(PRInt32& aCount) const = 0;
--- a/layout/style/nsICSSImportRule.h
+++ b/layout/style/nsICSSImportRule.h
@@ -36,25 +36,24 @@
  * ***** END LICENSE BLOCK ***** */
 
 /* internal interface for CSS @import rules */
 
 #ifndef nsICSSImportRule_h___
 #define nsICSSImportRule_h___
 
 #include "nsICSSRule.h"
-#include "nsString.h"
 
-class nsIAtom;
-class nsIURI;
 class nsMediaList;
+class nsString;
 
-// IID for the nsICSSImportRule interface {b2e65d15-6673-4548-a65a-c45ce87304f2}
+// IID for the nsICSSImportRule interface {1d7a658b-2f7b-423d-a3d9-dd5b553f69a9}
 #define NS_ICSS_IMPORT_RULE_IID     \
-{0xb2e65d15, 0x6673, 0x4548, {0xa6, 0x5a, 0xc4, 0x5c, 0xe8, 0x73, 0x04, 0xf2}}
+{0x1d7a658b, 0x2f7b, 0x423d, {0xa3, 0xd9, 0xdd, 0x5b, 0x55, 0x3f, 0x69, 0xa9}}
+
 
 class nsICSSImportRule : public nsICSSRule {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSS_IMPORT_RULE_IID)
 
   NS_IMETHOD SetURLSpec(const nsString& aURLSpec) = 0;
   NS_IMETHOD GetURLSpec(nsString& aURLSpec) const = 0;
 
--- a/layout/style/nsICSSNameSpaceRule.h
+++ b/layout/style/nsICSSNameSpaceRule.h
@@ -36,23 +36,23 @@
  * ***** END LICENSE BLOCK ***** */
 
 /* internal interface for CSS @namespace rules */
 
 #ifndef nsICSSNameSpaceRule_h___
 #define nsICSSNameSpaceRule_h___
 
 #include "nsICSSRule.h"
-//#include "nsString.h"
 
 class nsIAtom;
 
-// IID for the nsICSSNameSpaceRule interface {c2116a9f-370d-458a-80c1-c6445089a8b7}
+// IID for the nsICSSNameSpaceRule interface {153392d4-90bb-424e-b737-1bf5bc775394}
 #define NS_ICSS_NAMESPACE_RULE_IID     \
-{0xc2116a9f, 0x370d, 0x458a, {0x80, 0xc1, 0xc6, 0x44, 0x50, 0x89, 0xa8, 0xb7}}
+{0x153392d4, 0x90bb, 0x424e, {0xb7, 0x37, 0x1b, 0xf5, 0xbc, 0x77, 0x53, 0x94}}
+
 
 class nsICSSNameSpaceRule : public nsICSSRule {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSS_NAMESPACE_RULE_IID)
 
   NS_IMETHOD  GetPrefix(nsIAtom*& aPrefix) const = 0;
   NS_IMETHOD  SetPrefix(nsIAtom* aPrefix) = 0;
 
--- a/layout/style/nsICSSRule.h
+++ b/layout/style/nsICSSRule.h
@@ -42,20 +42,21 @@
 
 #include "nsIStyleRule.h"
 #include "nsIDOMCSSRule.h"
 
 class nsCSSStyleSheet;
 class nsICSSGroupRule;
 class nsAString;
 
-// IID for the nsICSSRule interface {72250d73-dbb2-4409-90fe-e8e0283a2510}
+// IID for the nsICSSRule interface {2a1fef35-eee9-4a5d-bc87-e2228acc926b}
 #define NS_ICSS_RULE_IID     \
-{ 0x72250d73, 0xdbb2, 0x4409, \
- { 0x90, 0xfe, 0xe8, 0xe0, 0x28, 0x3a, 0x25, 0x10 } }
+{ 0x2a1fef35, 0xeee9, 0x4a5d, \
+ { 0xbc, 0x87, 0xe2, 0x22, 0x8a, 0xcc, 0x92, 0x6b } }
+
 
 // inheriting from nsIStyleRule is only for style rules, not other rule types
 class nsICSSRule : public nsIStyleRule {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSS_RULE_IID)
   // The constants in this list must maintain the following invariants:
   //   If a rule of type N must appear before a rule of type M in stylesheets
   //   then N < M
--- a/layout/style/nsICSSStyleRule.h
+++ b/layout/style/nsICSSStyleRule.h
@@ -44,19 +44,17 @@
 
 #ifndef nsICSSStyleRule_h___
 #define nsICSSStyleRule_h___
 
 //#include <stdio.h>
 #include "nsICSSRule.h"
 #include "nsString.h"
 #include "nsCOMPtr.h"
-#include "nsCSSProps.h"
 #include "nsCSSValue.h"
-#include "nsIAtom.h"
 #include "nsCSSPseudoElements.h"
 #include "nsCSSPseudoClasses.h"
 
 class nsIAtom;
 class nsCSSDeclaration;
 class nsCSSStyleSheet;
 struct nsCSSSelectorList;
 
@@ -284,20 +282,21 @@ struct nsCSSSelectorList {
 private: 
   nsCSSSelectorList* Clone(PRBool aDeep) const;
 
   // These are not supported and are not implemented! 
   nsCSSSelectorList(const nsCSSSelectorList& aCopy);
   nsCSSSelectorList& operator=(const nsCSSSelectorList& aCopy); 
 };
 
-// 1aae9e9d-21c3-4993-90b1-66aa6809f597
+// c6065b5e-4870-4dc5-9be3-747b6e317b25
 #define NS_ICSS_STYLE_RULE_IID \
-{ 0x1aae9e9d, 0x21c3, 0x4993, \
-  { 0x90, 0xb1, 0x66, 0xaa, 0x68, 0x09, 0xf5, 0x97 } }
+{ 0xc6065b5e, 0x4870, 0x4dc5, \
+  { 0x9b, 0xe3, 0x74, 0x7b, 0x6e, 0x31, 0x7b, 0x25 } }
+
 
 class nsICSSStyleRule : public nsICSSRule {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSS_STYLE_RULE_IID)
 
   // null for style attribute
   virtual nsCSSSelectorList* Selector(void) = 0;
 
--- a/layout/style/nsIStyleRule.h
+++ b/layout/style/nsIStyleRule.h
@@ -98,20 +98,20 @@ public:
    *     struct ID bits)
    *   + are not already filled into the data struct
    * into the appropriate data struct in |aRuleData|.  It is important
    * that only empty data are filled in, since the rule tree is walked
    * from highest priority rule to least, so that the walk can stop if
    * all needed data are found.  Thus overwriting non-empty data will
    * break CSS cascading rules.
    */
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData)=0;
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData)=0;
 
   virtual nsIStyleRule* GetImportantRule(void) { return nsnull; }
 
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
 #endif
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIStyleRule, NS_ISTYLE_RULE_IID)
 
 #endif /* nsIStyleRule_h___ */
--- a/layout/style/nsStyleSet.cpp
+++ b/layout/style/nsStyleSet.cpp
@@ -61,27 +61,25 @@
 #include "nsTransitionManager.h"
 #include "nsIEventStateManager.h"
 #include "mozilla/dom/Element.h"
 
 using namespace mozilla::dom;
 
 NS_IMPL_ISUPPORTS1(nsEmptyStyleRule, nsIStyleRule)
 
-NS_IMETHODIMP
+/* virtual */ void
 nsEmptyStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
 {
-  return NS_OK;
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 nsEmptyStyleRule::List(FILE* out, PRInt32 aIndent) const
 {
-  return NS_OK;
 }
 #endif
 
 static const nsStyleSet::sheetType gCSSSheetTypes[] = {
   nsStyleSet::eAgentSheet,
   nsStyleSet::eUserSheet,
   nsStyleSet::eDocSheet,
   nsStyleSet::eOverrideSheet
--- a/layout/style/nsStyleSet.h
+++ b/layout/style/nsStyleSet.h
@@ -61,19 +61,19 @@
 class nsIURI;
 class nsCSSFontFaceRule;
 class nsRuleWalker;
 struct RuleProcessorData;
 
 class nsEmptyStyleRule : public nsIStyleRule
 {
   NS_DECL_ISUPPORTS
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 };
 
 // The style set object is created by the document viewer and ownership is
 // then handed off to the PresShell.  Only the PresShell should delete a
 // style set.
 
 class nsStyleSet
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -101,19 +101,19 @@ struct ElementPropertyTransition
  */
 class ElementTransitionsStyleRule : public nsIStyleRule
 {
 public:
   // nsISupportsImplementation
   NS_DECL_ISUPPORTS
 
   // nsIStyleRule implementation
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   ElementTransitionsStyleRule(ElementTransitions *aOwner,
                            TimeStamp aRefreshTime)
     : mElementTransitions(aOwner)
     , mRefreshTime(aRefreshTime)
   {}
 
@@ -137,19 +137,19 @@ private:
  */
 class CoverTransitionStartStyleRule : public nsIStyleRule
 {
 public:
   // nsISupportsImplementation
   NS_DECL_ISUPPORTS
 
   // nsIStyleRule implementation
-  NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
+  virtual void MapRuleInfoInto(nsRuleData* aRuleData);
 #ifdef DEBUG
-  NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
+  virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
 #endif
 
   void CoverValue(nsCSSProperty aProperty, nsStyleAnimation::Value &aStartValue)
   {
     CoveredValue v = { aProperty, aStartValue };
     mCoveredValues.AppendElement(v);
   }
 
@@ -212,28 +212,32 @@ ElementTransitionsPropertyDtor(void     
                                void           *aData)
 {
   ElementTransitions *et = static_cast<ElementTransitions*>(aPropertyValue);
   delete et;
 }
 
 NS_IMPL_ISUPPORTS1(ElementTransitionsStyleRule, nsIStyleRule)
 
-NS_IMETHODIMP
+/* virtual */ void
 ElementTransitionsStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
 {
   nsStyleContext *contextParent = aRuleData->mStyleContext->GetParent();
   if (contextParent && contextParent->HasPseudoElementData()) {
     // Don't apply transitions to things inside of pseudo-elements.
     // FIXME (Bug 522599): Add tests for this.
-    return NS_OK;
+    return;
   }
 
   ElementTransitions *et = ElementData();
-  NS_ENSURE_TRUE(et, NS_OK); // FIXME (Bug 522597): Why can this be null?
+  if (NS_UNLIKELY(!et)) { // FIXME (Bug 522597): Why can this be null? 
+     NS_WARNING("ElementData returned null");
+     return;
+  }
+
   for (PRUint32 i = 0, i_end = et->mPropertyTransitions.Length();
        i < i_end; ++i)
   {
     ElementPropertyTransition &pt = et->mPropertyTransitions[i];
     if (pt.IsRemovedSentinel()) {
       continue;
     }
 
@@ -262,26 +266,23 @@ ElementTransitionsStyleRule::MapRuleInfo
 #ifdef DEBUG
       ok =
 #endif
         nsStyleAnimation::UncomputeValue(pt.mProperty, aRuleData->mPresContext,
                                          pt.mCurrentValue, prop);
       NS_ABORT_IF_FALSE(ok, "could not store computed value");
     }
   }
-
-  return NS_OK;
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 ElementTransitionsStyleRule::List(FILE* out, PRInt32 aIndent) const
 {
   // WRITE ME?
-  return NS_OK;
 }
 #endif
 
 void
 ElementTransitions::DropStyleRule()
 {
   if (mStyleRule) {
     mStyleRule->Disconnect();
@@ -305,17 +306,17 @@ ElementTransitions::EnsureStyleRuleFor(T
     mStyleRule = newRule;
   }
 
   return PR_TRUE;
 }
 
 NS_IMPL_ISUPPORTS1(CoverTransitionStartStyleRule, nsIStyleRule)
 
-NS_IMETHODIMP
+/* virtual */ void
 CoverTransitionStartStyleRule::MapRuleInfoInto(nsRuleData* aRuleData)
 {
   for (PRUint32 i = 0, i_end = mCoveredValues.Length(); i < i_end; ++i) {
     CoveredValue &cv = mCoveredValues[i];
     if (aRuleData->mSIDs & nsCachedStyleData::GetBitForSID(
                              nsCSSProps::kSIDTable[cv.mProperty]))
     {
       void *prop =
@@ -323,26 +324,23 @@ CoverTransitionStartStyleRule::MapRuleIn
 #ifdef DEBUG
       PRBool ok =
 #endif
         nsStyleAnimation::UncomputeValue(cv.mProperty, aRuleData->mPresContext,
                                          cv.mCoveredValue, prop);
       NS_ABORT_IF_FALSE(ok, "could not store computed value");
     }
   }
-
-  return NS_OK;
 }
 
 #ifdef DEBUG
-NS_IMETHODIMP
+/* virtual */ void
 CoverTransitionStartStyleRule::List(FILE* out, PRInt32 aIndent) const
 {
   // WRITE ME?
-  return NS_OK;
 }
 #endif
 
 /*****************************************************************************
  * nsTransitionManager                                                       *
  *****************************************************************************/
 
 nsTransitionManager::nsTransitionManager(nsPresContext *aPresContext)