Bug 551344 part 2 - Address sicking's review comments in nsHtml5TreeOpExecutor.cpp. r=jonas.
This commit is contained in:
@@ -118,8 +118,9 @@ nsHtml5TreeOpExecutor::DidBuildModel(PRBool aTerminated)
|
||||
NS_PRECONDITION(mStarted, "Bad life cycle.");
|
||||
|
||||
if (!aTerminated) {
|
||||
// Break out of update batch if we are in one
|
||||
// and aren't forcibly terminating
|
||||
// This is needed to avoid unblocking loads too many times on one hand
|
||||
// and on the other hand to avoid destroying the frame constructor from
|
||||
// within an update batch. See bug 537683.
|
||||
EndDocUpdate();
|
||||
|
||||
// If the above caused a call to nsIParser::Terminate(), let that call
|
||||
@@ -131,7 +132,7 @@ nsHtml5TreeOpExecutor::DidBuildModel(PRBool aTerminated)
|
||||
|
||||
static_cast<nsHtml5Parser*> (mParser.get())->DropStreamParser();
|
||||
|
||||
// This is comes from nsXMLContentSink and nsHTMLContentSink
|
||||
// This comes from nsXMLContentSink and nsHTMLContentSink
|
||||
DidBuildModelImpl(aTerminated);
|
||||
|
||||
if (!mLayoutStarted) {
|
||||
@@ -214,11 +215,11 @@ nsHtml5TreeOpExecutor::SetDocumentCharsetAndSource(nsACString& aCharset, PRInt32
|
||||
// nsHTMLDocument::StartDocumentLoad
|
||||
// We need to call muCV->SetPrevDocCharacterSet here in case
|
||||
// the charset is detected by parser DetectMetaTag
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> muCV;
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> mucv;
|
||||
nsCOMPtr<nsIContentViewer> cv;
|
||||
mDocShell->GetContentViewer(getter_AddRefs(cv));
|
||||
if (cv) {
|
||||
muCV = do_QueryInterface(cv);
|
||||
mucv = do_QueryInterface(cv);
|
||||
} else {
|
||||
// in this block of code, if we get an error result, we return
|
||||
// it but if we get a null pointer, that's perfectly legal for
|
||||
@@ -236,12 +237,12 @@ nsHtml5TreeOpExecutor::SetDocumentCharsetAndSource(nsACString& aCharset, PRInt32
|
||||
nsresult rv =
|
||||
parent->GetContentViewer(getter_AddRefs(parentContentViewer));
|
||||
if (NS_SUCCEEDED(rv) && parentContentViewer) {
|
||||
muCV = do_QueryInterface(parentContentViewer);
|
||||
mucv = do_QueryInterface(parentContentViewer);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (muCV) {
|
||||
muCV->SetPrevDocCharacterSet(aCharset);
|
||||
if (mucv) {
|
||||
mucv->SetPrevDocCharacterSet(aCharset);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -655,7 +656,7 @@ nsHtml5TreeOpExecutor::IsScriptEnabled()
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeOpExecutor::DocumentMode(nsHtml5DocumentMode m)
|
||||
nsHtml5TreeOpExecutor::SetDocumentMode(nsHtml5DocumentMode m)
|
||||
{
|
||||
nsCompatibility mode = eCompatibility_NavQuirks;
|
||||
switch (m) {
|
||||
|
||||
Reference in New Issue
Block a user