From 829408eddb1137513d6cd30667d86c1b258de9b5 Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Thu, 13 Jul 2000 23:18:37 +0000 Subject: [PATCH] making the element factory support weak references. needed to make ender-lite faster. --- content/html/document/src/nsHTMLContentSink.cpp | 6 ++++-- layout/html/document/src/nsHTMLContentSink.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp index 7f46e8c8416b..13a1d5998c2b 100644 --- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -108,6 +108,8 @@ #include "nsIScrollable.h" #include "nsContentPolicyUtils.h" +#include "nsWeakReference.h"//nshtmlelementfactory supports weak references + #ifdef ALLOW_ASYNCH_STYLE_SHEETS const PRBool kBlockByDefault=PR_FALSE; #else @@ -1081,7 +1083,7 @@ NS_CreateHTMLElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo) //---------------------------------------------------------------------- -class nsHTMLElementFactory : public nsIElementFactory { +class nsHTMLElementFactory : public nsIElementFactory, public nsSupportsWeakReference { public: nsHTMLElementFactory(); virtual ~nsHTMLElementFactory(); @@ -1116,7 +1118,7 @@ nsHTMLElementFactory::~nsHTMLElementFactory() { } -NS_IMPL_ISUPPORTS1(nsHTMLElementFactory, nsIElementFactory); +NS_IMPL_ISUPPORTS2(nsHTMLElementFactory, nsIElementFactory, nsISupportsWeakReference); NS_IMETHODIMP nsHTMLElementFactory::CreateInstanceByTag(nsINodeInfo *aNodeInfo, diff --git a/layout/html/document/src/nsHTMLContentSink.cpp b/layout/html/document/src/nsHTMLContentSink.cpp index 7f46e8c8416b..13a1d5998c2b 100644 --- a/layout/html/document/src/nsHTMLContentSink.cpp +++ b/layout/html/document/src/nsHTMLContentSink.cpp @@ -108,6 +108,8 @@ #include "nsIScrollable.h" #include "nsContentPolicyUtils.h" +#include "nsWeakReference.h"//nshtmlelementfactory supports weak references + #ifdef ALLOW_ASYNCH_STYLE_SHEETS const PRBool kBlockByDefault=PR_FALSE; #else @@ -1081,7 +1083,7 @@ NS_CreateHTMLElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo) //---------------------------------------------------------------------- -class nsHTMLElementFactory : public nsIElementFactory { +class nsHTMLElementFactory : public nsIElementFactory, public nsSupportsWeakReference { public: nsHTMLElementFactory(); virtual ~nsHTMLElementFactory(); @@ -1116,7 +1118,7 @@ nsHTMLElementFactory::~nsHTMLElementFactory() { } -NS_IMPL_ISUPPORTS1(nsHTMLElementFactory, nsIElementFactory); +NS_IMPL_ISUPPORTS2(nsHTMLElementFactory, nsIElementFactory, nsISupportsWeakReference); NS_IMETHODIMP nsHTMLElementFactory::CreateInstanceByTag(nsINodeInfo *aNodeInfo,