Back out 75ace50df008 to try to fix failures after last central/inbound merge on a CLOSED TREE
This commit is contained in:
@@ -699,7 +699,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
}
|
||||
|
||||
// TODO: Proper about:blank treatment is bug 543435
|
||||
if (loadAsHtml5 && aCommand && !nsCRT::strcmp(aCommand, "view")) {
|
||||
if (loadAsHtml5 && !viewSource) {
|
||||
// mDocumentURI hasn't been set, yet, so get the URI from the channel
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
aChannel->GetOriginalURI(getter_AddRefs(uri));
|
||||
@@ -771,6 +771,9 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
// and parentContentViewer
|
||||
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aContainer));
|
||||
|
||||
// No support yet for docshell-less HTML
|
||||
NS_ENSURE_TRUE(docShell || !IsHTML(), NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(docShell));
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
|
||||
@@ -807,6 +810,9 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
}
|
||||
}
|
||||
|
||||
nsCAutoString scheme;
|
||||
uri->GetScheme(scheme);
|
||||
|
||||
nsCAutoString urlSpec;
|
||||
uri->GetSpec(urlSpec);
|
||||
#ifdef DEBUG_charset
|
||||
@@ -824,9 +830,8 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
|
||||
nsCOMPtr<nsIWyciwygChannel> wyciwygChannel;
|
||||
|
||||
if (!IsHTML() || !docShell) { // no docshell for text/html XHR
|
||||
charsetSource = IsHTML() ? kCharsetFromWeakDocTypeDefault
|
||||
: kCharsetFromDocTypeDefault;
|
||||
if (!IsHTML()) {
|
||||
charsetSource = kCharsetFromDocTypeDefault;
|
||||
charset.AssignLiteral("UTF-8");
|
||||
TryChannelCharset(aChannel, charsetSource, charset);
|
||||
parserCharsetSource = charsetSource;
|
||||
|
||||
Reference in New Issue
Block a user