1) Added support for loading an XML document "out of band" from script and manipulating it via dom interfaces.

2) Fixed compile errors in XSL glue code that happened after the recent nsString landing by scc.
3) Added a check for a null URI before de-referencing it in nsCodeBasePrincipal.cpp.


git-svn-id: svn://10.0.0.236/trunk@67709 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
nisheeth%netscape.com
2000-05-01 06:58:53 +00:00
parent e9adb35e5d
commit 8a6a52bef1
46 changed files with 386 additions and 84 deletions

View File

@@ -178,7 +178,7 @@ void nsExpatTokenizer::SetupExpatParser(void) {
nsExpatTokenizer::nsExpatTokenizer(nsString* aURL) : nsHTMLTokenizer() {
NS_INIT_REFCNT();
mBytesParsed = 0;
mState = new XMLParserState;
mState = new XMLParserState;
mState->tokenRecycler = (CTokenRecycler*)GetTokenRecycler();
mState->cdataToken = nsnull;
mState->parser = nsnull;

View File

@@ -149,6 +149,7 @@ class nsIParser : public nsISupports {
* @param aCommand -- ptrs to string that contains command
* @return nada
*/
virtual void GetCommand(nsString& aCommand)=0;
virtual void SetCommand(const char* aCommand)=0;
virtual void SetCommand(eParserCommands aParserCommand)=0;

View File

@@ -305,6 +305,11 @@ nsIParserFilter * nsParser::SetParserFilter(nsIParserFilter * aFilter)
}
void nsParser::GetCommand(nsString& aCommand)
{
aCommand = mCommandStr;
}
/**
* Call this method once you've created a parser, and want to instruct it
* about the command which caused the parser to be constructed. For example,
@@ -319,6 +324,7 @@ void nsParser::SetCommand(const char* aCommand){
if(theCommand.Equals(kViewSourceCommand))
mCommand=eViewSource;
else mCommand=eViewNormal;
mCommandStr.AssignWithConversion(aCommand);
}
/**

View File

@@ -133,6 +133,7 @@ CLASS_EXPORT_HTMLPARS nsParser : public nsIParser, public nsIStreamListener {
* @param aContentSink -- ptr to content sink that will receive output
* @return ptr to previously set contentsink (usually null)
*/
virtual void GetCommand(nsString& aCommand);
virtual void SetCommand(const char* aCommand);
virtual void SetCommand(eParserCommands aParserCommand);
@@ -384,6 +385,7 @@ protected:
nsresult mInternalState;
CObserverService mObserverService;
PRBool mObserversEnabled;
nsString mCommandStr;
public:
MOZ_TIMER_DECLARE(mParseTime)