From e616dd17f4f41f736dc1f634db9ece406367ce84 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Fri, 23 Jul 2010 11:00:32 -0700 Subject: [PATCH] Bug 569719 part 8: forward to nsStyledElement::GetStyle from nsXULElement::GetStyle. r=bzbarsky --- content/xul/content/src/nsXULElement.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 83dbaf8f8d97..cf9bb3b77696 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -102,7 +102,6 @@ #include "nsIServiceManager.h" #include "nsICSSStyleRule.h" #include "nsIStyleSheet.h" -#include "nsDOMCSSAttrDeclaration.h" #include "nsIURL.h" #include "nsIViewManager.h" #include "nsIWidget.h" @@ -1948,23 +1947,7 @@ nsXULElement::GetStyle(nsIDOMCSSStyleDeclaration** aStyle) } } - // XXXbz could this call nsStyledElement::GetStyle now? - nsDOMSlots* slots = GetDOMSlots(); - NS_ENSURE_TRUE(slots, NS_ERROR_OUT_OF_MEMORY); - - if (!slots->mStyle) { - slots->mStyle = new nsDOMCSSAttributeDeclaration(this -#ifdef MOZ_SMIL - , PR_FALSE -#endif // MOZ_SMIL - ); - NS_ENSURE_TRUE(slots->mStyle, NS_ERROR_OUT_OF_MEMORY); - SetFlags(NODE_MAY_HAVE_STYLE); - } - - NS_IF_ADDREF(*aStyle = slots->mStyle); - - return NS_OK; + return nsStyledElement::GetStyle(aStyle); } nsresult