Move things that aren't author stylesheets out of nsDocument's mStyleSheets array to simplify stylesheet management code. Add a level of the cascade for style attributes and ensure that there's only one rule processor per level of the cascade, and simplify the logic of nsCSSRuleProcessor creation. b=252578 r+sr=bzbarsky

This commit is contained in:
dbaron@dbaron.org
2004-07-28 07:08:41 +00:00
parent 5c1c1d2421
commit 08d6baff75
46 changed files with 767 additions and 1091 deletions

View File

@@ -61,10 +61,7 @@ public:
nsXMLDocument();
virtual ~nsXMLDocument();
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
NS_DECL_ISUPPORTS_INHERITED
virtual void Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
@@ -98,19 +95,8 @@ public:
virtual nsresult Init();
protected:
// subclass hooks for sheet ordering
virtual void InternalAddStyleSheet(nsIStyleSheet* aSheet, PRUint32 aFlags);
virtual void InternalInsertStyleSheetAt(nsIStyleSheet* aSheet, PRInt32 aIndex);
virtual nsIStyleSheet* InternalGetStyleSheetAt(PRInt32 aIndex) const;
virtual PRInt32 InternalGetNumberOfStyleSheets() const;
virtual nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
// For additional catalog sheets (if any) needed to layout the XML vocabulary
// of the document. Catalog sheets are kept at the beginning of our array of
// style sheets and this counter is used as an offset to distinguish them
PRInt32 mCatalogSheetCount;
nsCOMPtr<nsIEventQueueService> mEventQService;
nsCOMPtr<nsIScriptContext> mScriptContext;