diff --git a/content/html/style/src/nsCSSRules.cpp b/content/html/style/src/nsCSSRules.cpp
index 5f0cc134d39..46b4497132c 100644
--- a/content/html/style/src/nsCSSRules.cpp
+++ b/content/html/style/src/nsCSSRules.cpp
@@ -396,10 +396,8 @@ CSSImportRuleImpl::CSSImportRuleImpl(const CSSImportRuleImpl& aCopy)
{
if (aCopy.mChildSheet) {
- aCopy.mChildSheet->Clone(*getter_AddRefs(mChildSheet));
- if (mChildSheet) {
- mChildSheet->SetOwnerRule(this);
- }
+ aCopy.mChildSheet->Clone(nsnull, this, nsnull, nsnull,
+ getter_AddRefs(mChildSheet));
}
NS_NewMediaList(getter_AddRefs(mMedia));
diff --git a/layout/style/nsCSSRules.cpp b/layout/style/nsCSSRules.cpp
index 5f0cc134d39..46b4497132c 100644
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -396,10 +396,8 @@ CSSImportRuleImpl::CSSImportRuleImpl(const CSSImportRuleImpl& aCopy)
{
if (aCopy.mChildSheet) {
- aCopy.mChildSheet->Clone(*getter_AddRefs(mChildSheet));
- if (mChildSheet) {
- mChildSheet->SetOwnerRule(this);
- }
+ aCopy.mChildSheet->Clone(nsnull, this, nsnull, nsnull,
+ getter_AddRefs(mChildSheet));
}
NS_NewMediaList(getter_AddRefs(mMedia));