diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp
index f9ebbd81dc5..99d477f5e8e 100644
--- a/content/html/style/src/nsHTMLStyleSheet.cpp
+++ b/content/html/style/src/nsHTMLStyleSheet.cpp
@@ -656,6 +656,8 @@ PRInt32 HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
matchCount++;
}
break;
+ default:
+ break;
}
}
NS_RELEASE(htmlContent);
@@ -875,6 +877,16 @@ NS_IMETHODIMP HTMLStyleSheetImpl::Reset(nsIURI* aURL)
mActiveRule->mSheet = nsnull;
NS_RELEASE(mActiveRule);
}
+ if (mDocumentColorRule) {
+ mDocumentColorRule->mSheet = nsnull;
+ NS_RELEASE(mDocumentColorRule);
+ }
+ if (mTableBackgroundRule) {
+ mTableBackgroundRule->mSheet = nsnull;
+ NS_RELEASE(mTableBackgroundRule);
+ }
+
+ mMappedAttrTable.Enumerate(MappedDropSheet);
mMappedAttrTable.Reset();
return NS_OK;
diff --git a/layout/html/style/src/nsHTMLStyleSheet.cpp b/layout/html/style/src/nsHTMLStyleSheet.cpp
index f9ebbd81dc5..99d477f5e8e 100644
--- a/layout/html/style/src/nsHTMLStyleSheet.cpp
+++ b/layout/html/style/src/nsHTMLStyleSheet.cpp
@@ -656,6 +656,8 @@ PRInt32 HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
matchCount++;
}
break;
+ default:
+ break;
}
}
NS_RELEASE(htmlContent);
@@ -875,6 +877,16 @@ NS_IMETHODIMP HTMLStyleSheetImpl::Reset(nsIURI* aURL)
mActiveRule->mSheet = nsnull;
NS_RELEASE(mActiveRule);
}
+ if (mDocumentColorRule) {
+ mDocumentColorRule->mSheet = nsnull;
+ NS_RELEASE(mDocumentColorRule);
+ }
+ if (mTableBackgroundRule) {
+ mTableBackgroundRule->mSheet = nsnull;
+ NS_RELEASE(mTableBackgroundRule);
+ }
+
+ mMappedAttrTable.Enumerate(MappedDropSheet);
mMappedAttrTable.Reset();
return NS_OK;
diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp
index f9ebbd81dc5..99d477f5e8e 100644
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -656,6 +656,8 @@ PRInt32 HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
matchCount++;
}
break;
+ default:
+ break;
}
}
NS_RELEASE(htmlContent);
@@ -875,6 +877,16 @@ NS_IMETHODIMP HTMLStyleSheetImpl::Reset(nsIURI* aURL)
mActiveRule->mSheet = nsnull;
NS_RELEASE(mActiveRule);
}
+ if (mDocumentColorRule) {
+ mDocumentColorRule->mSheet = nsnull;
+ NS_RELEASE(mDocumentColorRule);
+ }
+ if (mTableBackgroundRule) {
+ mTableBackgroundRule->mSheet = nsnull;
+ NS_RELEASE(mTableBackgroundRule);
+ }
+
+ mMappedAttrTable.Enumerate(MappedDropSheet);
mMappedAttrTable.Reset();
return NS_OK;