Bug 1312260 - Part 3: Fix trailing whitespace in nsHTMLDocument.cpp
MozReview-Commit-ID: MkigKgSMAq
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -651,17 +651,17 @@ nsHTMLDocument::StartDocumentLoad(const
nsAutoCString charset;
// These are the charset source and charset for the parser. This can differ
// from that for the document if the channel is a wyciwyg channel.
int32_t parserCharsetSource;
nsAutoCString parserCharset;
nsCOMPtr<nsIWyciwygChannel> wyciwygChannel;
-
+
// For error reporting and referrer policy setting
nsHtml5TreeOpExecutor* executor = nullptr;
if (loadAsHtml5) {
executor = static_cast<nsHtml5TreeOpExecutor*> (mParser->GetContentSink());
if (mReferrerPolicySet) {
// CSP may have set the referrer policy, so a speculative parser should
// start with the new referrer policy.
executor->SetSpeculationReferrerPolicy(static_cast<ReferrerPolicy>(mReferrerPolicy));
@@ -718,30 +718,30 @@ nsHTMLDocument::StartDocumentLoad(const
TryTLD(charsetSource, charset);
TryFallback(charsetSource, charset);
if (wyciwygChannel) {
// We know for sure that the parser needs to be using UTF16.
parserCharset = "UTF-16";
parserCharsetSource = charsetSource < kCharsetFromChannel ?
kCharsetFromChannel : charsetSource;
-
+
nsAutoCString cachedCharset;
int32_t cachedSource;
rv = wyciwygChannel->GetCharsetAndSource(&cachedSource, cachedCharset);
if (NS_SUCCEEDED(rv)) {
if (cachedSource > charsetSource) {
charsetSource = cachedSource;
charset = cachedCharset;
}
} else {
// Don't propagate this error.
rv = NS_OK;
}
-
+
} else {
parserCharset = charset;
parserCharsetSource = charsetSource;
}
}
SetDocumentCharacterSetSource(charsetSource);
SetDocumentCharacterSet(charset);
@@ -1255,17 +1255,17 @@ nsHTMLDocument::GetCookie(nsAString& aCo
}
// If the document's sandboxed origin flag is set, access to read cookies
// is prohibited.
if (mSandboxFlags & SANDBOXED_ORIGIN) {
rv.Throw(NS_ERROR_DOM_SECURITY_ERR);
return;
}
-
+
// not having a cookie service isn't an error
nsCOMPtr<nsICookieService> service = do_GetService(NS_COOKIESERVICE_CONTRACTID);
if (service) {
// Get a URI from the document principal. We use the original
// codebase in case the codebase was changed by SetDomain
nsCOMPtr<nsIURI> codebaseURI;
NodePrincipal()->GetURI(getter_AddRefs(codebaseURI));
@@ -2827,17 +2827,17 @@ nsHTMLDocument::EditingStateChanged()
nsAutoScriptBlocker scriptBlocker;
NotifyEditableStateChange(this, this);
}
// Resync the editor's spellcheck state.
if (spellRecheckAll) {
nsCOMPtr<nsISelectionController> selcon;
nsresult rv = editor->GetSelectionController(getter_AddRefs(selcon));
- NS_ENSURE_SUCCESS(rv, rv);
+ NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsISelection> spellCheckSelection;
rv = selcon->GetSelection(nsISelectionController::SELECTION_SPELLCHECK,
getter_AddRefs(spellCheckSelection));
if (NS_SUCCEEDED(rv)) {
spellCheckSelection->RemoveAllRanges();
}
}