Back out 75ace50df008 to try to fix failures after last central/inbound merge on a CLOSED TREE

This commit is contained in:
Matt Brubeck
2011-11-16 11:50:48 -08:00
parent 76ff2c1e9c
commit 20044ae2a1
23 changed files with 65 additions and 384 deletions

View File

@@ -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;