From b9ffb7bd1f51c10edb7d99374f2bdf2fd2c29f71 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Thu, 18 Oct 2001 03:47:32 +0000 Subject: [PATCH] Bug 100231. Use nsCheapVoidArray to save a word in nsXULElement. r=brendan,rjesup; sr=jst --- content/base/src/nsGenericElement.h | 2 ++ content/xul/content/src/nsXULElement.h | 4 +++- content/xul/document/src/Makefile.in | 1 + content/xul/document/src/makefile.win | 1 + content/xul/templates/src/Makefile.in | 2 ++ content/xul/templates/src/makefile.win | 2 ++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/content/base/src/nsGenericElement.h b/content/base/src/nsGenericElement.h index 03a445947fcb..dc64ec4ced24 100644 --- a/content/base/src/nsGenericElement.h +++ b/content/base/src/nsGenericElement.h @@ -99,6 +99,8 @@ public: PRBool RemoveElementAt(PRInt32 aIndex); void Compact(); + void* operator[](PRInt32 aIndex) const { return ElementAt(aIndex); } + private: typedef unsigned long PtrBits; diff --git a/content/xul/content/src/nsXULElement.h b/content/xul/content/src/nsXULElement.h index 706089136b5e..52f3e576004e 100644 --- a/content/xul/content/src/nsXULElement.h +++ b/content/xul/content/src/nsXULElement.h @@ -77,6 +77,8 @@ #include "nsXULAttributeValue.h" #include "nsIXBLService.h" +#include "nsGenericElement.h" // for nsCheapVoidArray + class nsISizeOfHandler; class nsIDocument; @@ -525,7 +527,7 @@ protected: nsXULPrototypeElement* mPrototype; nsIDocument* mDocument; // [WEAK] nsIContent* mParent; // [WEAK] - nsVoidArray mChildren; // [OWNER] + nsCheapVoidArray mChildren; // [OWNER] nsCOMPtr mListenerManager; // [OWNER] #ifdef DEBUG PRBool mIsScriptObjectRooted; diff --git a/content/xul/document/src/Makefile.in b/content/xul/document/src/Makefile.in index 509d38a793b9..93bcae21fa2e 100644 --- a/content/xul/document/src/Makefile.in +++ b/content/xul/document/src/Makefile.in @@ -53,6 +53,7 @@ REQUIRES = xpcom \ pref \ xul \ xultmpl \ + webshell \ $(NULL) CPPSRCS = \ diff --git a/content/xul/document/src/makefile.win b/content/xul/document/src/makefile.win index 8e8a131e9c27..7fd1ddf6d602 100644 --- a/content/xul/document/src/makefile.win +++ b/content/xul/document/src/makefile.win @@ -47,6 +47,7 @@ REQUIRES = xpcom \ gfx \ layout_xul \ content \ + webshell \ $(NULL) DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN diff --git a/content/xul/templates/src/Makefile.in b/content/xul/templates/src/Makefile.in index f571af2d74d4..8f132698b550 100644 --- a/content/xul/templates/src/Makefile.in +++ b/content/xul/templates/src/Makefile.in @@ -35,6 +35,7 @@ REQUIRES = xpcom \ timer \ caps \ gfx \ + htmlparser \ layout \ content \ widget \ @@ -45,6 +46,7 @@ REQUIRES = xpcom \ unicharutil \ xul \ xuldoc \ + webshell \ $(NULL) CPPSRCS = \ diff --git a/content/xul/templates/src/makefile.win b/content/xul/templates/src/makefile.win index 164402a8faf6..a048a846354a 100644 --- a/content/xul/templates/src/makefile.win +++ b/content/xul/templates/src/makefile.win @@ -37,8 +37,10 @@ REQUIRES = xpcom \ unicharutil \ layout \ gfx \ + htmlparser \ layout_xul \ content \ + webshell \ $(NULL) DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN