diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp index c4708d402ed..0558bb23a2b 100644 --- a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp +++ b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp @@ -95,7 +95,7 @@ NS_NewComputedDOMStyle(nsIComputedDOMStyle** aComputedStyle) } nsComputedDOMStyle::nsComputedDOMStyle() - : mInner(nsnull), mPresShellWeak(nsnull), mT2P(0.0f) + : mInner(this), mPresShellWeak(nsnull), mT2P(0.0f) { } @@ -116,55 +116,15 @@ nsComputedDOMStyle::Shutdown() } -NS_IMETHODIMP -nsComputedDOMStyle::QueryInterface(REFNSIID aIID, void** aInstancePtr) -{ - if (!aInstancePtr) { - NS_ERROR("QueryInterface requires a non-NULL destination!"); - return NS_ERROR_NULL_POINTER; - } - - nsISupports* inst; - - if (aIID.Equals(NS_GET_IID(nsIComputedDOMStyle))) { - inst = NS_STATIC_CAST(nsIComputedDOMStyle*, this); - } else if (aIID.Equals(NS_GET_IID(nsIDOMCSSStyleDeclaration))) { - inst = NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, this); - } else if (aIID.Equals(NS_GET_IID(nsIDOMCSS2Properties))) { - if (!mInner) { - mInner = new CSS2PropertiesTearoff(this); - NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); - } - inst = NS_STATIC_CAST(nsIDOMCSS2Properties*, - NS_STATIC_CAST(nsISupports*, mInner)); - } else if (aIID.Equals(NS_GET_IID(nsIDOMNSCSS2Properties))) { - if (!mInner) { - mInner = new CSS2PropertiesTearoff(this); - NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); - } - inst = NS_STATIC_CAST(nsIDOMNSCSS2Properties*, - NS_STATIC_CAST(nsISupports*, mInner)); - } else if (aIID.Equals(NS_GET_IID(nsISupports))) { - inst = NS_STATIC_CAST(nsISupports*, - NS_STATIC_CAST(nsIComputedDOMStyle*, this)); - } else if (aIID.Equals(NS_GET_IID(nsIClassInfo))) { - inst = nsContentUtils::GetClassInfoInstance(eDOMClassInfo_ComputedCSSStyleDeclaration_id); - NS_ENSURE_TRUE(inst, NS_ERROR_OUT_OF_MEMORY); - } else { - inst = nsnull; - } - - nsresult rv; - if (!inst) { - rv = NS_NOINTERFACE; - } else { - NS_ADDREF(inst); - rv = NS_OK; - } - - *aInstancePtr = inst; - return rv; -} +// QueryInterface implementation for nsComputedDOMStyle +NS_INTERFACE_MAP_BEGIN(nsComputedDOMStyle) + NS_INTERFACE_MAP_ENTRY(nsIComputedDOMStyle) + NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration) + NS_INTERFACE_MAP_ENTRY_AGGREGATED(nsIDOMCSS2Properties, &mInner) + NS_INTERFACE_MAP_ENTRY_AGGREGATED(nsIDOMNSCSS2Properties, &mInner) + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIComputedDOMStyle) + NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(ComputedCSSStyleDeclaration) +NS_INTERFACE_MAP_END static void doDestroyComputedDOMStyle(nsComputedDOMStyle *aComputedStyle) diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.h b/mozilla/content/html/style/src/nsComputedDOMStyle.h index 09dede074b1..51318bc05e0 100644 --- a/mozilla/content/html/style/src/nsComputedDOMStyle.h +++ b/mozilla/content/html/style/src/nsComputedDOMStyle.h @@ -292,7 +292,7 @@ private: static const ComputedStyleMapEntry* GetQueryablePropertyMap(PRUint32* aLength); - nsCOMPtr mInner; // CSS2Properties + CSS2PropertiesTearoff mInner; nsWeakPtr mPresShellWeak; nsCOMPtr mContent; diff --git a/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp b/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp index 850ef087d57..a2332b6e3b1 100644 --- a/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp @@ -50,7 +50,7 @@ nsDOMCSSDeclaration::nsDOMCSSDeclaration() - : mInner(nsnull) + : mInner(this) { } @@ -59,54 +59,14 @@ nsDOMCSSDeclaration::~nsDOMCSSDeclaration() } -NS_IMETHODIMP -nsDOMCSSDeclaration::QueryInterface(REFNSIID aIID, void** aInstancePtr) -{ - if (!aInstancePtr) { - NS_ERROR("QueryInterface requires a non-NULL destination!"); - return NS_ERROR_NULL_POINTER; - } - - nsISupports* inst; - - if (aIID.Equals(NS_GET_IID(nsIDOMCSSStyleDeclaration))) { - inst = NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, this); - } else if (aIID.Equals(NS_GET_IID(nsIDOMCSS2Properties))) { - if (!mInner) { - mInner = new CSS2PropertiesTearoff(this); - NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); - } - inst = NS_STATIC_CAST(nsIDOMCSS2Properties*, - NS_STATIC_CAST(nsISupports*, mInner)); - } else if (aIID.Equals(NS_GET_IID(nsIDOMNSCSS2Properties))) { - if (!mInner) { - mInner = new CSS2PropertiesTearoff(this); - NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); - } - inst = NS_STATIC_CAST(nsIDOMNSCSS2Properties*, - NS_STATIC_CAST(nsISupports*, mInner)); - } else if (aIID.Equals(NS_GET_IID(nsISupports))) { - inst = NS_STATIC_CAST(nsISupports*, - NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, this)); - } else if (aIID.Equals(NS_GET_IID(nsIClassInfo))) { - inst = nsContentUtils::GetClassInfoInstance(eDOMClassInfo_CSSStyleDeclaration_id); - NS_ENSURE_TRUE(inst, NS_ERROR_OUT_OF_MEMORY); - } else { - inst = nsnull; - } - - nsresult rv; - if (!inst) { - rv = NS_NOINTERFACE; - } else { - NS_ADDREF(inst); - rv = NS_OK; - } - - *aInstancePtr = inst; - return rv; -} - +// QueryInterface implementation for nsDOMCSSDeclaration +NS_INTERFACE_MAP_BEGIN(nsDOMCSSDeclaration) + NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration) + NS_INTERFACE_MAP_ENTRY_AGGREGATED(nsIDOMCSS2Properties, &mInner) + NS_INTERFACE_MAP_ENTRY_AGGREGATED(nsIDOMNSCSS2Properties, &mInner) + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCSSStyleDeclaration) + NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(CSSStyleDeclaration) +NS_INTERFACE_MAP_END NS_IMPL_ADDREF(nsDOMCSSDeclaration); NS_IMPL_RELEASE(nsDOMCSSDeclaration); @@ -338,22 +298,33 @@ nsDOMCSSDeclaration::ParseDeclaration(const nsAString& aDecl, ////////////////////////////////////////////////////////////////////////////// -CSS2PropertiesTearoff::CSS2PropertiesTearoff(nsISupports *aOuter) +CSS2PropertiesTearoff::CSS2PropertiesTearoff(nsIDOMCSSStyleDeclaration *aOuter) + : mOuter(aOuter) { - NS_INIT_AGGREGATED(aOuter); + NS_ASSERTION(mOuter, "must have outer"); } CSS2PropertiesTearoff::~CSS2PropertiesTearoff() { } -NS_IMPL_AGGREGATED(CSS2PropertiesTearoff); +NS_IMETHODIMP_(nsrefcnt) +CSS2PropertiesTearoff::AddRef(void) +{ + return mOuter->AddRef(); +} -NS_INTERFACE_MAP_BEGIN_AGGREGATED(CSS2PropertiesTearoff) - NS_INTERFACE_MAP_ENTRY(nsIDOMCSS2Properties) - NS_INTERFACE_MAP_ENTRY(nsIDOMNSCSS2Properties) -NS_INTERFACE_MAP_END_AGGREGATED(fOuter) +NS_IMETHODIMP_(nsrefcnt) +CSS2PropertiesTearoff::Release(void) +{ + return mOuter->Release(); +} +NS_IMETHODIMP +CSS2PropertiesTearoff::QueryInterface(REFNSIID aIID, void** aInstancePtr) +{ + return mOuter->QueryInterface(aIID, aInstancePtr); +} // nsIDOMCSS2Properties // nsIDOMNSCSS2Properties @@ -362,16 +333,14 @@ NS_INTERFACE_MAP_END_AGGREGATED(fOuter) NS_IMETHODIMP \ CSS2PropertiesTearoff::Get##method_(nsAString& aValue) \ { \ - return NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, fOuter)-> \ - GetPropertyValue(NS_LITERAL_STRING(#name_), aValue); \ + return mOuter->GetPropertyValue(NS_LITERAL_STRING(#name_), aValue); \ } \ \ NS_IMETHODIMP \ CSS2PropertiesTearoff::Set##method_(const nsAString& aValue) \ { \ - return NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, fOuter)-> \ - SetProperty(NS_LITERAL_STRING(#name_), aValue, \ - NS_LITERAL_STRING("")); \ + return mOuter->SetProperty(NS_LITERAL_STRING(#name_), aValue, \ + NS_LITERAL_STRING("")); \ } #define CSS_PROP_LIST_EXCLUDE_INTERNAL diff --git a/mozilla/content/html/style/src/nsDOMCSSDeclaration.h b/mozilla/content/html/style/src/nsDOMCSSDeclaration.h index b24fbdcebff..680810a87a4 100644 --- a/mozilla/content/html/style/src/nsDOMCSSDeclaration.h +++ b/mozilla/content/html/style/src/nsDOMCSSDeclaration.h @@ -38,18 +38,29 @@ #ifndef nsDOMCSSDeclaration_h___ #define nsDOMCSSSDeclaration_h___ -#include "nsISupports.h" #include "nsIDOMCSSStyleDeclaration.h" #include "nsIDOMCSS2Properties.h" -#include "nsAgg.h" -#include "nsCOMPtr.h" - class nsCSSDeclaration; class nsICSSParser; class nsICSSLoader; class nsIURI; +class CSS2PropertiesTearoff : public nsIDOMNSCSS2Properties +{ +public: + NS_DECL_ISUPPORTS_INHERITED + + NS_DECL_NSIDOMCSS2PROPERTIES + NS_DECL_NSIDOMNSCSS2PROPERTIES + + CSS2PropertiesTearoff(nsIDOMCSSStyleDeclaration *aOuter); + virtual ~CSS2PropertiesTearoff(); + +private: + nsIDOMCSSStyleDeclaration* mOuter; +}; + class nsDOMCSSDeclaration : public nsIDOMCSSStyleDeclaration { public: @@ -99,21 +110,7 @@ protected: virtual ~nsDOMCSSDeclaration(); private: - nsCOMPtr mInner; // CSS2Properties + CSS2PropertiesTearoff mInner; }; - -class CSS2PropertiesTearoff : public nsIDOMNSCSS2Properties -{ -public: - NS_DECL_AGGREGATED - - NS_DECL_NSIDOMCSS2PROPERTIES - NS_DECL_NSIDOMNSCSS2PROPERTIES - - CSS2PropertiesTearoff(nsISupports *aOuter); - virtual ~CSS2PropertiesTearoff(); -}; - - #endif // nsDOMCSSDeclaration_h___ diff --git a/mozilla/layout/style/nsComputedDOMStyle.cpp b/mozilla/layout/style/nsComputedDOMStyle.cpp index c4708d402ed..0558bb23a2b 100644 --- a/mozilla/layout/style/nsComputedDOMStyle.cpp +++ b/mozilla/layout/style/nsComputedDOMStyle.cpp @@ -95,7 +95,7 @@ NS_NewComputedDOMStyle(nsIComputedDOMStyle** aComputedStyle) } nsComputedDOMStyle::nsComputedDOMStyle() - : mInner(nsnull), mPresShellWeak(nsnull), mT2P(0.0f) + : mInner(this), mPresShellWeak(nsnull), mT2P(0.0f) { } @@ -116,55 +116,15 @@ nsComputedDOMStyle::Shutdown() } -NS_IMETHODIMP -nsComputedDOMStyle::QueryInterface(REFNSIID aIID, void** aInstancePtr) -{ - if (!aInstancePtr) { - NS_ERROR("QueryInterface requires a non-NULL destination!"); - return NS_ERROR_NULL_POINTER; - } - - nsISupports* inst; - - if (aIID.Equals(NS_GET_IID(nsIComputedDOMStyle))) { - inst = NS_STATIC_CAST(nsIComputedDOMStyle*, this); - } else if (aIID.Equals(NS_GET_IID(nsIDOMCSSStyleDeclaration))) { - inst = NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, this); - } else if (aIID.Equals(NS_GET_IID(nsIDOMCSS2Properties))) { - if (!mInner) { - mInner = new CSS2PropertiesTearoff(this); - NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); - } - inst = NS_STATIC_CAST(nsIDOMCSS2Properties*, - NS_STATIC_CAST(nsISupports*, mInner)); - } else if (aIID.Equals(NS_GET_IID(nsIDOMNSCSS2Properties))) { - if (!mInner) { - mInner = new CSS2PropertiesTearoff(this); - NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); - } - inst = NS_STATIC_CAST(nsIDOMNSCSS2Properties*, - NS_STATIC_CAST(nsISupports*, mInner)); - } else if (aIID.Equals(NS_GET_IID(nsISupports))) { - inst = NS_STATIC_CAST(nsISupports*, - NS_STATIC_CAST(nsIComputedDOMStyle*, this)); - } else if (aIID.Equals(NS_GET_IID(nsIClassInfo))) { - inst = nsContentUtils::GetClassInfoInstance(eDOMClassInfo_ComputedCSSStyleDeclaration_id); - NS_ENSURE_TRUE(inst, NS_ERROR_OUT_OF_MEMORY); - } else { - inst = nsnull; - } - - nsresult rv; - if (!inst) { - rv = NS_NOINTERFACE; - } else { - NS_ADDREF(inst); - rv = NS_OK; - } - - *aInstancePtr = inst; - return rv; -} +// QueryInterface implementation for nsComputedDOMStyle +NS_INTERFACE_MAP_BEGIN(nsComputedDOMStyle) + NS_INTERFACE_MAP_ENTRY(nsIComputedDOMStyle) + NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration) + NS_INTERFACE_MAP_ENTRY_AGGREGATED(nsIDOMCSS2Properties, &mInner) + NS_INTERFACE_MAP_ENTRY_AGGREGATED(nsIDOMNSCSS2Properties, &mInner) + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIComputedDOMStyle) + NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(ComputedCSSStyleDeclaration) +NS_INTERFACE_MAP_END static void doDestroyComputedDOMStyle(nsComputedDOMStyle *aComputedStyle) diff --git a/mozilla/layout/style/nsComputedDOMStyle.h b/mozilla/layout/style/nsComputedDOMStyle.h index 09dede074b1..51318bc05e0 100644 --- a/mozilla/layout/style/nsComputedDOMStyle.h +++ b/mozilla/layout/style/nsComputedDOMStyle.h @@ -292,7 +292,7 @@ private: static const ComputedStyleMapEntry* GetQueryablePropertyMap(PRUint32* aLength); - nsCOMPtr mInner; // CSS2Properties + CSS2PropertiesTearoff mInner; nsWeakPtr mPresShellWeak; nsCOMPtr mContent; diff --git a/mozilla/layout/style/nsDOMCSSDeclaration.cpp b/mozilla/layout/style/nsDOMCSSDeclaration.cpp index 850ef087d57..a2332b6e3b1 100644 --- a/mozilla/layout/style/nsDOMCSSDeclaration.cpp +++ b/mozilla/layout/style/nsDOMCSSDeclaration.cpp @@ -50,7 +50,7 @@ nsDOMCSSDeclaration::nsDOMCSSDeclaration() - : mInner(nsnull) + : mInner(this) { } @@ -59,54 +59,14 @@ nsDOMCSSDeclaration::~nsDOMCSSDeclaration() } -NS_IMETHODIMP -nsDOMCSSDeclaration::QueryInterface(REFNSIID aIID, void** aInstancePtr) -{ - if (!aInstancePtr) { - NS_ERROR("QueryInterface requires a non-NULL destination!"); - return NS_ERROR_NULL_POINTER; - } - - nsISupports* inst; - - if (aIID.Equals(NS_GET_IID(nsIDOMCSSStyleDeclaration))) { - inst = NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, this); - } else if (aIID.Equals(NS_GET_IID(nsIDOMCSS2Properties))) { - if (!mInner) { - mInner = new CSS2PropertiesTearoff(this); - NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); - } - inst = NS_STATIC_CAST(nsIDOMCSS2Properties*, - NS_STATIC_CAST(nsISupports*, mInner)); - } else if (aIID.Equals(NS_GET_IID(nsIDOMNSCSS2Properties))) { - if (!mInner) { - mInner = new CSS2PropertiesTearoff(this); - NS_ENSURE_TRUE(mInner, NS_ERROR_OUT_OF_MEMORY); - } - inst = NS_STATIC_CAST(nsIDOMNSCSS2Properties*, - NS_STATIC_CAST(nsISupports*, mInner)); - } else if (aIID.Equals(NS_GET_IID(nsISupports))) { - inst = NS_STATIC_CAST(nsISupports*, - NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, this)); - } else if (aIID.Equals(NS_GET_IID(nsIClassInfo))) { - inst = nsContentUtils::GetClassInfoInstance(eDOMClassInfo_CSSStyleDeclaration_id); - NS_ENSURE_TRUE(inst, NS_ERROR_OUT_OF_MEMORY); - } else { - inst = nsnull; - } - - nsresult rv; - if (!inst) { - rv = NS_NOINTERFACE; - } else { - NS_ADDREF(inst); - rv = NS_OK; - } - - *aInstancePtr = inst; - return rv; -} - +// QueryInterface implementation for nsDOMCSSDeclaration +NS_INTERFACE_MAP_BEGIN(nsDOMCSSDeclaration) + NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration) + NS_INTERFACE_MAP_ENTRY_AGGREGATED(nsIDOMCSS2Properties, &mInner) + NS_INTERFACE_MAP_ENTRY_AGGREGATED(nsIDOMNSCSS2Properties, &mInner) + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCSSStyleDeclaration) + NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(CSSStyleDeclaration) +NS_INTERFACE_MAP_END NS_IMPL_ADDREF(nsDOMCSSDeclaration); NS_IMPL_RELEASE(nsDOMCSSDeclaration); @@ -338,22 +298,33 @@ nsDOMCSSDeclaration::ParseDeclaration(const nsAString& aDecl, ////////////////////////////////////////////////////////////////////////////// -CSS2PropertiesTearoff::CSS2PropertiesTearoff(nsISupports *aOuter) +CSS2PropertiesTearoff::CSS2PropertiesTearoff(nsIDOMCSSStyleDeclaration *aOuter) + : mOuter(aOuter) { - NS_INIT_AGGREGATED(aOuter); + NS_ASSERTION(mOuter, "must have outer"); } CSS2PropertiesTearoff::~CSS2PropertiesTearoff() { } -NS_IMPL_AGGREGATED(CSS2PropertiesTearoff); +NS_IMETHODIMP_(nsrefcnt) +CSS2PropertiesTearoff::AddRef(void) +{ + return mOuter->AddRef(); +} -NS_INTERFACE_MAP_BEGIN_AGGREGATED(CSS2PropertiesTearoff) - NS_INTERFACE_MAP_ENTRY(nsIDOMCSS2Properties) - NS_INTERFACE_MAP_ENTRY(nsIDOMNSCSS2Properties) -NS_INTERFACE_MAP_END_AGGREGATED(fOuter) +NS_IMETHODIMP_(nsrefcnt) +CSS2PropertiesTearoff::Release(void) +{ + return mOuter->Release(); +} +NS_IMETHODIMP +CSS2PropertiesTearoff::QueryInterface(REFNSIID aIID, void** aInstancePtr) +{ + return mOuter->QueryInterface(aIID, aInstancePtr); +} // nsIDOMCSS2Properties // nsIDOMNSCSS2Properties @@ -362,16 +333,14 @@ NS_INTERFACE_MAP_END_AGGREGATED(fOuter) NS_IMETHODIMP \ CSS2PropertiesTearoff::Get##method_(nsAString& aValue) \ { \ - return NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, fOuter)-> \ - GetPropertyValue(NS_LITERAL_STRING(#name_), aValue); \ + return mOuter->GetPropertyValue(NS_LITERAL_STRING(#name_), aValue); \ } \ \ NS_IMETHODIMP \ CSS2PropertiesTearoff::Set##method_(const nsAString& aValue) \ { \ - return NS_STATIC_CAST(nsIDOMCSSStyleDeclaration*, fOuter)-> \ - SetProperty(NS_LITERAL_STRING(#name_), aValue, \ - NS_LITERAL_STRING("")); \ + return mOuter->SetProperty(NS_LITERAL_STRING(#name_), aValue, \ + NS_LITERAL_STRING("")); \ } #define CSS_PROP_LIST_EXCLUDE_INTERNAL diff --git a/mozilla/layout/style/nsDOMCSSDeclaration.h b/mozilla/layout/style/nsDOMCSSDeclaration.h index b24fbdcebff..680810a87a4 100644 --- a/mozilla/layout/style/nsDOMCSSDeclaration.h +++ b/mozilla/layout/style/nsDOMCSSDeclaration.h @@ -38,18 +38,29 @@ #ifndef nsDOMCSSDeclaration_h___ #define nsDOMCSSSDeclaration_h___ -#include "nsISupports.h" #include "nsIDOMCSSStyleDeclaration.h" #include "nsIDOMCSS2Properties.h" -#include "nsAgg.h" -#include "nsCOMPtr.h" - class nsCSSDeclaration; class nsICSSParser; class nsICSSLoader; class nsIURI; +class CSS2PropertiesTearoff : public nsIDOMNSCSS2Properties +{ +public: + NS_DECL_ISUPPORTS_INHERITED + + NS_DECL_NSIDOMCSS2PROPERTIES + NS_DECL_NSIDOMNSCSS2PROPERTIES + + CSS2PropertiesTearoff(nsIDOMCSSStyleDeclaration *aOuter); + virtual ~CSS2PropertiesTearoff(); + +private: + nsIDOMCSSStyleDeclaration* mOuter; +}; + class nsDOMCSSDeclaration : public nsIDOMCSSStyleDeclaration { public: @@ -99,21 +110,7 @@ protected: virtual ~nsDOMCSSDeclaration(); private: - nsCOMPtr mInner; // CSS2Properties + CSS2PropertiesTearoff mInner; }; - -class CSS2PropertiesTearoff : public nsIDOMNSCSS2Properties -{ -public: - NS_DECL_AGGREGATED - - NS_DECL_NSIDOMCSS2PROPERTIES - NS_DECL_NSIDOMNSCSS2PROPERTIES - - CSS2PropertiesTearoff(nsISupports *aOuter); - virtual ~CSS2PropertiesTearoff(); -}; - - #endif // nsDOMCSSDeclaration_h___