зеркало из https://github.com/mozilla/gecko-dev.git
fix 222203 . r = harishd move the scanner set character set code into the set charset function with if statement
This commit is contained in:
Родитель
98143b5de2
Коммит
8a8c3a7676
|
@ -327,6 +327,8 @@ void nsParser::SetCommand(const char* aCommand){
|
||||||
void nsParser::SetDocumentCharset(nsString& aCharset, nsCharsetSource aCharsetSource){
|
void nsParser::SetDocumentCharset(nsString& aCharset, nsCharsetSource aCharsetSource){
|
||||||
mCharset = aCharset;
|
mCharset = aCharset;
|
||||||
mCharsetSource = aCharsetSource;
|
mCharsetSource = aCharsetSource;
|
||||||
|
if(mParserContext && mParserContext->mScanner)
|
||||||
|
mParserContext->mScanner->SetDocumentCharset(aCharset, aCharsetSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1344,7 +1346,6 @@ nsresult nsParser::OnDataAvailable(nsIChannel* channel, nsISupports* aContext,
|
||||||
printf("xmlencoding detect- %s\n", guess.ToNewCString());
|
printf("xmlencoding detect- %s\n", guess.ToNewCString());
|
||||||
#endif
|
#endif
|
||||||
this->SetDocumentCharset(guess, guessSource);
|
this->SetDocumentCharset(guess, guessSource);
|
||||||
mParserContext->mScanner->SetDocumentCharset(guess, guessSource);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
theTotalRead+=theNumRead;
|
theTotalRead+=theNumRead;
|
||||||
|
|
|
@ -327,6 +327,8 @@ void nsParser::SetCommand(const char* aCommand){
|
||||||
void nsParser::SetDocumentCharset(nsString& aCharset, nsCharsetSource aCharsetSource){
|
void nsParser::SetDocumentCharset(nsString& aCharset, nsCharsetSource aCharsetSource){
|
||||||
mCharset = aCharset;
|
mCharset = aCharset;
|
||||||
mCharsetSource = aCharsetSource;
|
mCharsetSource = aCharsetSource;
|
||||||
|
if(mParserContext && mParserContext->mScanner)
|
||||||
|
mParserContext->mScanner->SetDocumentCharset(aCharset, aCharsetSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1344,7 +1346,6 @@ nsresult nsParser::OnDataAvailable(nsIChannel* channel, nsISupports* aContext,
|
||||||
printf("xmlencoding detect- %s\n", guess.ToNewCString());
|
printf("xmlencoding detect- %s\n", guess.ToNewCString());
|
||||||
#endif
|
#endif
|
||||||
this->SetDocumentCharset(guess, guessSource);
|
this->SetDocumentCharset(guess, guessSource);
|
||||||
mParserContext->mScanner->SetDocumentCharset(guess, guessSource);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
theTotalRead+=theNumRead;
|
theTotalRead+=theNumRead;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче