mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 659763 - Make document.open("text/plain") work with the new parser. r=Olli.Pettay.
This commit is contained in:
parent
dc6ff15cba
commit
34ec811b55
@ -239,7 +239,7 @@ nsHtml5Parser::Parse(nsIURI* aURL, // legacy parameter; ignored
|
||||
NS_IMETHODIMP
|
||||
nsHtml5Parser::Parse(const nsAString& aSourceBuffer,
|
||||
void* aKey,
|
||||
const nsACString& aContentType, // ignored
|
||||
const nsACString& aContentType,
|
||||
bool aLastCall,
|
||||
nsDTDMode aMode) // ignored
|
||||
{
|
||||
@ -270,6 +270,10 @@ nsHtml5Parser::Parse(const nsAString& aSourceBuffer,
|
||||
mTreeBuilder->setScriptingEnabled(mExecutor->IsScriptEnabled());
|
||||
mTokenizer->start();
|
||||
mExecutor->Start();
|
||||
if (!aContentType.EqualsLiteral("text/html")) {
|
||||
mTreeBuilder->StartPlainText();
|
||||
mTokenizer->StartPlainText();
|
||||
}
|
||||
/*
|
||||
* If you move the following line, be very careful not to cause
|
||||
* WillBuildModel to be called before the document has had its
|
||||
|
@ -182,7 +182,7 @@ class nsHtml5Parser : public nsIParser,
|
||||
*
|
||||
* @param aSourceBuffer the argument of document.write (empty for .close())
|
||||
* @param aKey a key unique to the script element that caused this call
|
||||
* @param aContentType ignored (for interface compat only)
|
||||
* @param aContentType "text/html" for HTML mode, else text/plain mode
|
||||
* @param aLastCall true if .close() false if .write()
|
||||
* @param aMode ignored (for interface compat only)
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user