96364 - Register html tag observers directly to parser service rather than nsObserverService. Doing so, reduces a lot of overhead. Also, the observers are now notified via sink. This eliminates the need for parser bundle.

r=dp,shanjian,sfraser, sr=rpotts.


git-svn-id: svn://10.0.0.236/trunk@104152 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
2001-09-28 23:08:17 +00:00
parent 3c1b9e9fad
commit 1c4e4c74ec
57 changed files with 541 additions and 1544 deletions

View File

@@ -44,6 +44,7 @@
#include "nsWeakReference.h"
#include "nsString.h"
#include "nsVoidArray.h"
#include "nsHTMLTags.h"
class nsEditorParserObserver : public nsSupportsWeakReference,
public nsIElementObserver,
@@ -57,27 +58,26 @@ public:
NS_DECL_ISUPPORTS
/* method for nsIElementObserver */
NS_IMETHOD_(const char*) GetTagNameAt(PRUint32 aTagIndex);
NS_IMETHOD Notify(PRUint32 aDocumentID, eHTMLTags aTag, PRUint32 numOfAttributes,
const PRUnichar* nameArray[], const PRUnichar* valueArray[]);
NS_IMETHOD Notify(PRUint32 aDocumentID, const PRUnichar* aTag, PRUint32 numOfAttributes,
const PRUnichar* nameArray[], const PRUnichar* valueArray[]);
NS_IMETHOD Notify(nsISupports* aDocumentID, const PRUnichar* aTag,
const nsStringArray* aKeys, const nsStringArray* aValues);
NS_IMETHOD Notify(nsISupports* aWebShell,
nsISupports* aChannel,
const PRUnichar* aTag,
const nsStringArray* aKeys,
const nsStringArray* aValues);
/* methods for nsIObserver */
NS_DECL_NSIOBSERVER
/* begin and end observing */
NS_IMETHOD Start();
NS_IMETHOD Start(eHTMLTags* aWatchTags);
NS_IMETHOD End();
/* query, did we find a bad tag? */
NS_IMETHOD GetBadTagFound(PRBool *aFound);
/* register a tag to watch for */
NS_IMETHOD RegisterTagToWatch(const char* tagName);
protected:
virtual void Notify();
@@ -85,9 +85,6 @@ protected:
protected:
PRBool mBadTagFound;
nsCStringArray mWatchTags;
};