fixed bug18312; this isn't PDT+, but is something that Phil has been *really* anxious to have fixed. r=nisheeth

This commit is contained in:
rickg%netscape.com 1999-11-23 03:09:12 +00:00
Родитель 89ef822b70
Коммит af437476c2
4 изменённых файлов: 18 добавлений и 12 удалений

Просмотреть файл

@ -291,7 +291,7 @@ CLASS_EXPORT_HTMLPARS nsParser : public nsIParser, public nsIStreamListener {
* @param
* @return
*/
CObserverService& GetObserverService(void) { return mObserverService; }
CObserverService* GetObserverService(void);
protected:
@ -382,6 +382,7 @@ protected:
nsCharsetSource mCharsetSource;
nsresult mInternalState;
CObserverService mObserverService;
PRBool mObserversEnabled;
public:
MOZ_TIMER_DECLARE(mParseTime)

Просмотреть файл

@ -861,12 +861,14 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) {
result=WriteTag(mStartTag,aToken,aToken->GetAttributeCount(),PR_TRUE);
if((!mIsText) && mParser && (NS_OK==result)) {
CObserverService& theService=mParser->GetObserverService();
CObserverService* theService=mParser->GetObserverService();
if(theService) {
CParserContext* pc=mParser->PeekContext();
void* theDocID=(pc)? pc->mKey:0;
eHTMLTags theTag=(eHTMLTags)theToken->GetTypeID();
result=theService.Notify(theTag,theContext.mTokenNode,(PRUint32)theDocID,kViewSourceCommand,mParser);
result=theService->Notify(theTag,theContext.mTokenNode,(PRUint32)theDocID,kViewSourceCommand,mParser);
}
}
theContext.mTokenNode.Init(0,0,gTokenRecycler); //now recycle.
break;

Просмотреть файл

@ -291,7 +291,7 @@ CLASS_EXPORT_HTMLPARS nsParser : public nsIParser, public nsIStreamListener {
* @param
* @return
*/
CObserverService& GetObserverService(void) { return mObserverService; }
CObserverService* GetObserverService(void);
protected:
@ -382,6 +382,7 @@ protected:
nsCharsetSource mCharsetSource;
nsresult mInternalState;
CObserverService mObserverService;
PRBool mObserversEnabled;
public:
MOZ_TIMER_DECLARE(mParseTime)

Просмотреть файл

@ -861,12 +861,14 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) {
result=WriteTag(mStartTag,aToken,aToken->GetAttributeCount(),PR_TRUE);
if((!mIsText) && mParser && (NS_OK==result)) {
CObserverService& theService=mParser->GetObserverService();
CObserverService* theService=mParser->GetObserverService();
if(theService) {
CParserContext* pc=mParser->PeekContext();
void* theDocID=(pc)? pc->mKey:0;
eHTMLTags theTag=(eHTMLTags)theToken->GetTypeID();
result=theService.Notify(theTag,theContext.mTokenNode,(PRUint32)theDocID,kViewSourceCommand,mParser);
result=theService->Notify(theTag,theContext.mTokenNode,(PRUint32)theDocID,kViewSourceCommand,mParser);
}
}
theContext.mTokenNode.Init(0,0,gTokenRecycler); //now recycle.
break;