Part 1 of fix for bug 500850 (Make inline style use wrapper cache and slimwrappers). r/sr=bz.

--HG--
extra : rebase_source : 21f9c86dc4024e0e23882226e8395d61d5b0c518
This commit is contained in:
Peter Van der Beken 2009-07-13 13:14:57 +02:00
parent 9eeb6bea74
commit 3145f88586
16 changed files with 137 additions and 142 deletions

View File

@ -1753,10 +1753,6 @@ nsGenericElement::nsDOMSlots::nsDOMSlots(PtrBits aFlags)
nsGenericElement::nsDOMSlots::~nsDOMSlots()
{
if (mStyle) {
mStyle->DropReference();
}
if (mAttributeMap) {
mAttributeMap->DropReference();
}
@ -4057,7 +4053,12 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsGenericElement)
{
nsDOMSlots *slots = tmp->GetExistingDOMSlots();
if (slots) {
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "slots mStyle");
cb.NoteXPCOMChild(slots->mStyle.get());
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "slots mAttributeMap");
cb.NoteXPCOMChild(slots->mAttributeMap.get());
if (tmp->IsNodeOfType(nsINode::eXUL))
cb.NoteXPCOMChild(slots->mControllers);
cb.NoteXPCOMChild(

View File

@ -175,6 +175,7 @@
#include "nsIDOMRect.h"
#include "nsIDOMRGBColor.h"
#include "nsIDOMNSRGBAColor.h"
#include "nsDOMCSSAttrDeclaration.h"
// XBL related includes.
#include "nsIXBLService.h"
@ -10040,6 +10041,31 @@ nsCSSValueListSH::GetItemAt(nsISupports *aNative, PRUint32 aIndex,
// CSSStyleDeclaration helper
NS_IMETHODIMP
nsCSSStyleDeclSH::PreCreate(nsISupports *nativeObj, JSContext *cx,
JSObject *globalObj, JSObject **parentObj)
{
nsWrapperCache* cache = nsnull;
CallQueryInterface(nativeObj, &cache);
if (!cache) {
return nsDOMClassInfo::PreCreate(nativeObj, cx, globalObj, parentObj);
}
nsICSSDeclaration *declaration = static_cast<nsICSSDeclaration*>(nativeObj);
nsISupports *native_parent = declaration->GetParentObject();
if (!native_parent) {
return NS_ERROR_FAILURE;
}
jsval v;
nsresult rv = WrapNative(cx, globalObj, native_parent, &v);
NS_ENSURE_SUCCESS(rv, rv);
*parentObj = JSVAL_TO_OBJECT(v);
return NS_SUCCESS_ALLOW_SLIM_WRAPPERS;
}
nsresult
nsCSSStyleDeclSH::GetStringAt(nsISupports *aNative, PRInt32 aIndex,
nsAString& aResult)

View File

@ -1423,6 +1423,9 @@ protected:
nsAString& aResult);
public:
NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
JSObject *globalObj, JSObject **parentObj);
static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
{
return new nsCSSStyleDeclSH(aData);

View File

@ -139,7 +139,7 @@
#include "nsIWebBrowserFind.h" // For window.find()
#include "nsIWebContentHandlerRegistrar.h"
#include "nsIWindowMediator.h" // For window.find()
#include "nsIComputedDOMStyle.h"
#include "nsComputedDOMStyle.h"
#include "nsIEntropyCollector.h"
#include "nsDOMCID.h"
#include "nsDOMError.h"
@ -207,7 +207,6 @@
static PRLogModuleInfo* gDOMLeakPRLog;
#endif
nsIFactory *nsGlobalWindow::sComputedDOMStyleFactory = nsnull;
nsIDOMStorageList *nsGlobalWindow::sGlobalStorageList = nsnull;
static nsIEntropyCollector *gEntropyCollector = nsnull;
@ -803,7 +802,6 @@ nsGlobalWindow::~nsGlobalWindow()
void
nsGlobalWindow::ShutDown()
{
NS_IF_RELEASE(sComputedDOMStyleFactory);
NS_IF_RELEASE(sGlobalStorageList);
if (gDumpFile && gDumpFile != stdout) {
@ -6899,27 +6897,14 @@ nsGlobalWindow::GetComputedStyle(nsIDOMElement* aElt,
return NS_OK;
}
nsresult rv = NS_OK;
nsCOMPtr<nsIComputedDOMStyle> compStyle;
if (!sComputedDOMStyleFactory) {
rv = CallGetClassObject("@mozilla.org/DOM/Level2/CSS/computedStyleDeclaration;1",
&sComputedDOMStyleFactory);
NS_ENSURE_SUCCESS(rv, rv);
}
rv =
sComputedDOMStyleFactory->CreateInstance(nsnull,
NS_GET_IID(nsIComputedDOMStyle),
getter_AddRefs(compStyle));
nsRefPtr<nsComputedDOMStyle> compStyle;
nsresult rv = NS_NewComputedDOMStyle(aElt, aPseudoElt, presShell,
getter_AddRefs(compStyle));
NS_ENSURE_SUCCESS(rv, rv);
rv = compStyle->Init(aElt, aPseudoElt, presShell);
NS_ENSURE_SUCCESS(rv, rv);
*aReturn = compStyle.forget().get();
return compStyle->QueryInterface(NS_GET_IID(nsIDOMCSSStyleDeclaration),
(void **) aReturn);
return NS_OK;
}
//*****************************************************************************

View File

@ -781,7 +781,6 @@ protected:
friend class nsDOMScriptableHelper;
friend class nsDOMWindowUtils;
friend class PostMessageEvent;
static nsIFactory *sComputedDOMStyleFactory;
static nsIDOMStorageList* sGlobalStorageList;
};

View File

@ -52,7 +52,6 @@
#include "nsICSSStyleSheet.h"
#include "nsICategoryManager.h"
#include "nsIComponentManager.h"
#include "nsIComputedDOMStyle.h"
#include "nsIContentIterator.h"
#include "nsIContentSerializer.h"
#include "nsIController.h"
@ -517,7 +516,6 @@ MAKE_CTOR(CreateXHTMLParanoidFragmentSink,nsIFragmentContentSink, NS_NewXHT
MAKE_CTOR(CreateSanitizingHTMLSerializer, nsIContentSerializer, NS_NewSanitizingHTMLSerializer)
MAKE_CTOR(CreateXBLService, nsIXBLService, NS_NewXBLService)
MAKE_CTOR(CreateContentPolicy, nsIContentPolicy, NS_NewContentPolicy)
MAKE_CTOR(CreateComputedDOMStyle, nsIComputedDOMStyle, NS_NewComputedDOMStyle)
#ifdef MOZ_XUL
MAKE_CTOR(CreateXULSortService, nsIXULSortService, NS_NewXULSortService)
// NS_NewXULContentBuilder
@ -1235,11 +1233,6 @@ static const nsModuleComponentInfo gComponents[] = {
RegisterNoDataProtocolContentPolicy,
UnregisterNoDataProtocolContentPolicy },
{ "DOM CSS Computed Style Declaration",
NS_COMPUTEDDOMSTYLE_CID,
"@mozilla.org/DOM/Level2/CSS/computedStyleDeclaration;1",
CreateComputedDOMStyle },
{ "XUL Controllers",
NS_XULCONTROLLERS_CID,
"@mozilla.org/xul/xul-controllers;1",

View File

@ -106,7 +106,6 @@ EXPORTS = \
nsICSSStyleRule.h \
nsICSSStyleRuleDOMWrapper.h \
nsICSSStyleSheet.h \
nsIComputedDOMStyle.h \
nsIHTMLCSSStyleSheet.h \
nsIInspectorCSSUtils.h \
nsIStyleRule.h \

View File

@ -859,7 +859,7 @@ public:
virtual ~DOMCSSDeclarationImpl(void);
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent);
virtual void DropReference(void);
void DropReference(void);
virtual nsresult GetCSSDeclaration(nsCSSDeclaration **aDecl,
PRBool aAllocate);
virtual nsresult GetCSSParsingEnvironment(nsIURI** aSheetURI,
@ -874,6 +874,11 @@ public:
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
virtual nsISupports *GetParentObject()
{
return nsnull;
}
friend class DOMCSSStyleRuleImpl;
protected:

View File

@ -77,6 +77,7 @@
#include "nsCSSKeywords.h"
#include "nsStyleCoord.h"
#include "nsDisplayList.h"
#include "nsDOMCSSDeclaration.h"
#if defined(DEBUG_bzbarsky) || defined(DEBUG_caillon)
#define DEBUG_ComputedDOMStyle
@ -90,27 +91,34 @@
static nsComputedDOMStyle *sCachedComputedDOMStyle;
nsresult
NS_NewComputedDOMStyle(nsIComputedDOMStyle** aComputedStyle)
NS_NewComputedDOMStyle(nsIDOMElement *aElement, const nsAString &aPseudoElt,
nsIPresShell *aPresShell,
nsComputedDOMStyle **aComputedStyle)
{
NS_ENSURE_ARG_POINTER(aComputedStyle);
nsRefPtr<nsComputedDOMStyle> computedStyle;
if (sCachedComputedDOMStyle) {
// There's an unused nsComputedDOMStyle cached, use it.
// But before we use it, re-initialize the object.
// Oh yeah baby, placement new!
*aComputedStyle = new (sCachedComputedDOMStyle) nsComputedDOMStyle();
computedStyle = new (sCachedComputedDOMStyle) nsComputedDOMStyle();
sCachedComputedDOMStyle = nsnull;
} else {
// No nsComputedDOMStyle cached, create a new one.
*aComputedStyle = new nsComputedDOMStyle();
NS_ENSURE_TRUE(*aComputedStyle, NS_ERROR_OUT_OF_MEMORY);
computedStyle = new nsComputedDOMStyle();
NS_ENSURE_TRUE(computedStyle, NS_ERROR_OUT_OF_MEMORY);
}
NS_ADDREF(*aComputedStyle);
nsresult rv = computedStyle->Init(aElement, aPseudoElt, aPresShell);
NS_ENSURE_SUCCESS(rv, rv);
*aComputedStyle = nsnull;
computedStyle.swap(*aComputedStyle);
return NS_OK;
}
@ -131,6 +139,7 @@ nsComputedDOMStyle::nsComputedDOMStyle()
nsComputedDOMStyle::~nsComputedDOMStyle()
{
ClearWrapper();
}
void
@ -146,19 +155,30 @@ nsComputedDOMStyle::Shutdown()
NS_IMPL_CYCLE_COLLECTION_CLASS(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTION_ROOT_BEGIN(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_ROOT_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_0(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsComputedDOMStyle)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mContent)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
// QueryInterface implementation for nsComputedDOMStyle
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsComputedDOMStyle)
NS_INTERFACE_MAP_ENTRY(nsIComputedDOMStyle)
NS_INTERFACE_MAP_ENTRY(nsICSSDeclaration)
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
NS_INTERFACE_TABLE_HEAD(nsComputedDOMStyle)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_OFFSET_AND_INTERFACE_TABLE_BEGIN(nsComputedDOMStyle)
NS_INTERFACE_TABLE_ENTRY(nsComputedDOMStyle, nsICSSDeclaration)
NS_INTERFACE_TABLE_ENTRY(nsComputedDOMStyle,
nsIDOMCSSStyleDeclaration)
NS_INTERFACE_TABLE_ENTRY(nsComputedDOMStyle, nsISupports)
NS_OFFSET_AND_INTERFACE_TABLE_END
NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsComputedDOMStyle)
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

View File

@ -41,7 +41,7 @@
#ifndef nsComputedDOMStyle_h__
#define nsComputedDOMStyle_h__
#include "nsIComputedDOMStyle.h"
#include "nsICSSDeclaration.h"
#include "nsROCSSPrimitiveValue.h"
#include "nsDOMCSSDeclaration.h"
@ -57,11 +57,12 @@
#include "nsAutoPtr.h"
#include "nsStyleStruct.h"
class nsComputedDOMStyle : public nsIComputedDOMStyle
class nsComputedDOMStyle : public nsICSSDeclaration,
public nsWrapperCache
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(nsComputedDOMStyle)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsComputedDOMStyle)
NS_IMETHOD Init(nsIDOMElement *aElement,
const nsAString& aPseudoElt,
@ -76,6 +77,11 @@ public:
static void Shutdown();
virtual nsISupports *GetParentObject()
{
return mContent;
}
private:
void AssertFlushedPendingReflows() {
NS_ASSERTION(mFlushedPendingReflows,
@ -448,5 +454,10 @@ private:
#endif
};
nsresult
NS_NewComputedDOMStyle(nsIDOMElement *aElement, const nsAString &aPseudoElt,
nsIPresShell *aPresShell,
nsComputedDOMStyle **aComputedStyle);
#endif /* nsComputedDOMStyle_h__ */

View File

@ -52,14 +52,12 @@
#include "nsIPrincipal.h"
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(nsIContent *aContent)
: mContent(aContent)
{
MOZ_COUNT_CTOR(nsDOMCSSAttributeDeclaration);
// This reference is not reference-counted. The content
// object tells us when its about to go away.
NS_ASSERTION(aContent && aContent->IsNodeOfType(nsINode::eELEMENT),
"Inline style for non-element content?");
mContent = aContent;
}
nsDOMCSSAttributeDeclaration::~nsDOMCSSAttributeDeclaration()
@ -67,14 +65,32 @@ nsDOMCSSAttributeDeclaration::~nsDOMCSSAttributeDeclaration()
MOZ_COUNT_DTOR(nsDOMCSSAttributeDeclaration);
}
NS_IMPL_ADDREF(nsDOMCSSAttributeDeclaration)
NS_IMPL_RELEASE(nsDOMCSSAttributeDeclaration)
NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMCSSAttributeDeclaration)
void
nsDOMCSSAttributeDeclaration::DropReference()
{
mContent = nsnull;
}
NS_IMPL_CYCLE_COLLECTION_ROOT_BEGIN(nsDOMCSSAttributeDeclaration)
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_ROOT_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDOMCSSAttributeDeclaration)
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mContent)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsDOMCSSAttributeDeclaration)
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsDOMCSSAttributeDeclaration)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mContent)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_INTERFACE_MAP_BEGIN(nsDOMCSSAttributeDeclaration)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsDOMCSSAttributeDeclaration)
NS_IMPL_QUERY_TAIL_INHERITING(nsDOMCSSDeclaration)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMCSSAttributeDeclaration)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMCSSAttributeDeclaration)
nsresult
nsDOMCSSAttributeDeclaration::DeclarationChanged()

View File

@ -40,26 +40,25 @@
#ifndef nsDOMCSSAttributeDeclaration_h___
#define nsDOMCSSAttributeDeclaration_h___
#include "nsIDOMCSSStyleDeclaration.h"
#include "nsDOMCSSDeclaration.h"
#include "nsString.h"
#include "nsWrapperCache.h"
#include "nsIContent.h"
class nsIContent;
class nsICSSLoader;
class nsICSSParser;
class nsDOMCSSAttributeDeclaration : public nsDOMCSSDeclaration
class nsDOMCSSAttributeDeclaration : public nsDOMCSSDeclaration,
public nsWrapperCache
{
public:
nsDOMCSSAttributeDeclaration(nsIContent *aContent);
~nsDOMCSSAttributeDeclaration();
// impl AddRef/Release; QI is implemented by our parent class
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMCSSAttributeDeclaration)
virtual void DropReference();
// If GetCSSDeclaration returns non-null, then the decl it returns
// is owned by our current style rule.
virtual nsresult GetCSSDeclaration(nsCSSDeclaration **aDecl,
@ -71,13 +70,15 @@ public:
nsICSSParser** aCSSParser);
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent);
virtual nsISupports *GetParentObject()
{
return mContent;
}
protected:
virtual nsresult DeclarationChanged();
nsAutoRefCnt mRefCnt;
NS_DECL_OWNINGTHREAD
nsIContent *mContent;
nsCOMPtr<nsIContent> mContent;
};
#endif /* nsDOMCSSAttributeDeclaration_h___ */

View File

@ -62,14 +62,15 @@ nsDOMCSSDeclaration::~nsDOMCSSDeclaration()
{
}
// QueryInterface implementation for nsDOMCSSDeclaration
NS_INTERFACE_MAP_BEGIN(nsDOMCSSDeclaration)
NS_INTERFACE_MAP_ENTRY(nsICSSDeclaration)
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
NS_INTERFACE_TABLE_HEAD(nsDOMCSSDeclaration)
NS_OFFSET_AND_INTERFACE_TABLE_BEGIN(nsDOMCSSDeclaration)
NS_INTERFACE_TABLE_ENTRY(nsDOMCSSDeclaration, nsICSSDeclaration)
NS_INTERFACE_TABLE_ENTRY(nsDOMCSSDeclaration, nsIDOMCSSStyleDeclaration)
NS_INTERFACE_TABLE_ENTRY(nsDOMCSSDeclaration, nsISupports)
NS_OFFSET_AND_INTERFACE_TABLE_END
NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE
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

View File

@ -93,7 +93,6 @@ public:
NS_IMETHOD Item(PRUint32 index, nsAString & _retval);
NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) = 0;
virtual void DropReference() = 0;
protected:
// Always fills in the out parameter, even on failure, and if the out
// parameter is null the nsresult will be the correct thing to

View File

@ -84,6 +84,8 @@ public:
*/
NS_IMETHOD SetPropertyValue(const nsCSSProperty aPropID,
const nsAString& aValue) = 0;
virtual nsISupports *GetParentObject() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSDeclaration, NS_ICSSDECLARATION_IID)

View File

@ -1,66 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* DOM object returned from element.getComputedStyle() */
#ifndef nsIComputedDOMStyle_h___
#define nsIComputedDOMStyle_h___
#include "nsICSSDeclaration.h"
class nsIDOMElement;
class nsIPresShell;
#define NS_ICOMPUTEDDOMSTYLE_IID \
{ 0x5f0197a1, 0xa873, 0x44e5, \
{0x96, 0x31, 0xac, 0xd6, 0xca, 0xb4, 0xf1, 0xe0 } }
class nsIComputedDOMStyle : public nsICSSDeclaration
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOMPUTEDDOMSTYLE_IID)
NS_IMETHOD Init(nsIDOMElement *aElement, const nsAString& aPseudoElt,
nsIPresShell *aPresShell) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIComputedDOMStyle, NS_ICOMPUTEDDOMSTYLE_IID)
nsresult
NS_NewComputedDOMStyle(nsIComputedDOMStyle** aComputedStyle);
#endif /* nsIComputedDOMStyle_h___ */