mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 559311 - [HTML5] nsContentUtils::CreateContextualFragment doesn't cache HTML5 parser properly, r=smaug
This commit is contained in:
parent
0640f45817
commit
857f96fac4
@ -487,6 +487,7 @@ nsHtml5Parser::ParseFragment(const nsAString& aSourceBuffer,
|
||||
mExecutor->FlushDocumentWrite();
|
||||
mTokenizer->end();
|
||||
mExecutor->DropParserAndPerfHint();
|
||||
mExecutor->DropHeldElements();
|
||||
mAtomTable.Clear();
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -826,6 +826,7 @@ nsHtml5TreeOpExecutor::GetTokenizer()
|
||||
|
||||
void
|
||||
nsHtml5TreeOpExecutor::Reset() {
|
||||
DropHeldElements();
|
||||
mHasProcessedBase = PR_FALSE;
|
||||
mReadingFromStage = PR_FALSE;
|
||||
mOpQueue.Clear();
|
||||
|
@ -368,6 +368,10 @@ class nsHtml5TreeOpExecutor : public nsContentSink,
|
||||
mOwnedElements.AppendObject(aContent);
|
||||
}
|
||||
|
||||
void DropHeldElements() {
|
||||
mOwnedElements.Clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush the operations from the tree operations from the argument
|
||||
* queue unconditionally. (This is for the main thread case.)
|
||||
|
Loading…
Reference in New Issue
Block a user