Bug 1338889 - Part 1: Remove redundant trailing spaces. r=bz a=jcristau
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -2851,17 +2851,17 @@ public:
}
mozilla::dom::DocGroup* GetDocGroup();
virtual void AddIntersectionObserver(
mozilla::dom::DOMIntersectionObserver* aObserver) = 0;
virtual void RemoveIntersectionObserver(
mozilla::dom::DOMIntersectionObserver* aObserver) = 0;
-
+
virtual void UpdateIntersectionObservations() = 0;
virtual void ScheduleIntersectionObserverNotification() = 0;
virtual void NotifyIntersectionObservers() = 0;
protected:
bool GetUseCounter(mozilla::UseCounter aUseCounter)
{
return mUseCounters[aUseCounter];
--- a/dom/xml/XMLDocument.cpp
+++ b/dom/xml/XMLDocument.cpp
@@ -4,17 +4,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/XMLDocument.h"
#include "nsParserCIID.h"
#include "nsCharsetSource.h"
#include "nsIXMLContentSink.h"
-#include "nsPresContext.h"
+#include "nsPresContext.h"
#include "nsIContent.h"
#include "nsIContentViewerContainer.h"
#include "nsIContentViewer.h"
#include "nsIDocShell.h"
#include "nsHTMLParts.h"
#include "nsIComponentManager.h"
#include "nsIDOMElement.h"
#include "nsIBaseWindow.h"
@@ -56,30 +56,30 @@ using namespace mozilla::dom;
// ==================================================================
// =
// ==================================================================
nsresult
NS_NewDOMDocument(nsIDOMDocument** aInstancePtrResult,
- const nsAString& aNamespaceURI,
- const nsAString& aQualifiedName,
+ const nsAString& aNamespaceURI,
+ const nsAString& aQualifiedName,
nsIDOMDocumentType* aDoctype,
nsIURI* aDocumentURI,
nsIURI* aBaseURI,
nsIPrincipal* aPrincipal,
bool aLoadedAsData,
nsIGlobalObject* aEventObject,
DocumentFlavor aFlavor)
{
// Note: can't require that aDocumentURI/aBaseURI/aPrincipal be non-null,
// since at least one caller (XMLHttpRequest) doesn't have decent args to
// pass in.
-
+
nsresult rv;
*aInstancePtrResult = nullptr;
nsCOMPtr<nsIDocument> d;
bool isHTML = false;
bool isXHTML = false;
if (aFlavor == DocumentFlavorSVG) {
@@ -147,23 +147,23 @@ NS_NewDOMDocument(nsIDOMDocument** aInst
d->SetScriptHandlingObject(sgo);
} else if (aEventObject){
d->SetScopeObject(aEventObject);
}
// XMLDocuments and documents "created in memory" get to be UTF-8 by default,
// unlike the legacy HTML mess
doc->SetDocumentCharacterSet(NS_LITERAL_CSTRING("UTF-8"));
-
+
if (aDoctype) {
nsCOMPtr<nsIDOMNode> tmpNode;
rv = doc->AppendChild(aDoctype, getter_AddRefs(tmpNode));
NS_ENSURE_SUCCESS(rv, rv);
}
-
+
if (!aQualifiedName.IsEmpty()) {
nsCOMPtr<nsIDOMElement> root;
rv = doc->CreateElementNS(aNamespaceURI, aQualifiedName,
getter_AddRefs(root));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMNode> tmpNode;
@@ -299,17 +299,17 @@ XMLDocument::Load(const nsAString& aUrl,
// loaded in a docshell, so won't accumulate telemetry for use counters. Try
// warning on our entry document, if any, since that should have things like
// window ids and associated docshells.
nsIDocument* docForWarning = callingDoc ? callingDoc.get() : this;
if (nsContentUtils::IsCallerChrome()) {
docForWarning->WarnOnceAbout(nsIDocument::eChromeUseOfDOM3LoadMethod);
} else {
docForWarning->WarnOnceAbout(nsIDocument::eUseOfDOM3LoadMethod);
- }
+ }
nsIURI *baseURI = mDocumentURI;
nsAutoCString charset;
if (callingDoc) {
baseURI = callingDoc->GetDocBaseURI();
charset = callingDoc->GetDocumentCharacterSet();
}
@@ -390,17 +390,17 @@ XMLDocument::Load(const nsAString& aUrl,
mListenerManager = elm;
// Create a channel
nsCOMPtr<nsIInterfaceRequestor> req = nsContentUtils::SameOriginChecker();
nsCOMPtr<nsIChannel> channel;
// nsIRequest::LOAD_BACKGROUND prevents throbber from becoming active,
- // which in turn keeps STOP button from becoming active
+ // which in turn keeps STOP button from becoming active
rv = NS_NewChannel(getter_AddRefs(channel),
uri,
callingDoc ? callingDoc.get() :
static_cast<nsIDocument*>(this),
nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED,
nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST,
loadGroup,
req,
@@ -424,18 +424,18 @@ XMLDocument::Load(const nsAString& aUrl,
// Web content. But before doing that, assert that the current readyState
// is complete as it should be after the call to ResetToURI() above.
MOZ_ASSERT(GetReadyStateEnum() == nsIDocument::READYSTATE_COMPLETE,
"Bad readyState");
SetReadyStateInternal(nsIDocument::READYSTATE_UNINITIALIZED);
// Prepare for loading the XML document "into oneself"
nsCOMPtr<nsIStreamListener> listener;
- if (NS_FAILED(rv = StartDocumentLoad(kLoadAsData, channel,
- loadGroup, nullptr,
+ if (NS_FAILED(rv = StartDocumentLoad(kLoadAsData, channel,
+ loadGroup, nullptr,
getter_AddRefs(listener),
false))) {
NS_ERROR("XMLDocument::Load: Failed to start the document load.");
aRv.Throw(rv);
return false;
}
// After this point, if we error out of this method we should clear
@@ -507,17 +507,17 @@ XMLDocument::StartDocumentLoad(const cha
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener **aDocListener,
bool aReset,
nsIContentSink* aSink)
{
nsresult rv = nsDocument::StartDocumentLoad(aCommand,
aChannel, aLoadGroup,
- aContainer,
+ aContainer,
aDocListener, aReset, aSink);
if (NS_FAILED(rv)) return rv;
if (nsCRT::strcmp("loadAsInteractiveData", aCommand) == 0) {
mLoadedAsInteractiveData = true;
aCommand = kLoadAsData; // XBL, for example, needs scripts and styles
}
@@ -531,17 +531,17 @@ XMLDocument::StartDocumentLoad(const cha
if (NS_FAILED(rv)) return rv;
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
mParser = do_CreateInstance(kCParserCID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIXMLContentSink> sink;
-
+
if (aSink) {
sink = do_QueryInterface(aSink);
}
else {
nsCOMPtr<nsIDocShell> docShell;
if (aContainer) {
docShell = do_QueryInterface(aContainer);
NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
@@ -552,17 +552,17 @@ XMLDocument::StartDocumentLoad(const cha
}
// Set the parser as the stream listener for the document loader...
rv = CallQueryInterface(mParser, aDocListener);
NS_ENSURE_SUCCESS(rv, rv);
NS_ASSERTION(mChannel, "How can we not have a channel here?");
mChannelIsPending = true;
-
+
SetDocumentCharacterSet(charset);
mParser->SetDocumentCharset(charset, charsetSource);
mParser->SetCommand(aCommand);
mParser->SetContentSink(sink);
mParser->Parse(aUrl, nullptr, (void *)this);
return NS_OK;
}
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
@@ -523,17 +523,17 @@ txMozillaXSLTProcessor::AddXSLTParam(con
rv = nsContentUtils::NameSpaceManager()->
RegisterNameSpace(aNamespace, nsId);
NS_ENSURE_SUCCESS(rv, rv);
txExpandedName varName(nsId, name);
txVariable* var = static_cast<txVariable*>(mVariables.get(varName));
if (var) {
var->setValue(value);
-
+
return NS_OK;
}
var = new txVariable(value);
NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);
return mVariables.add(varName, var);
}
@@ -583,26 +583,26 @@ txMozillaXSLTProcessor::DoTransform()
return rv;
}
NS_IMETHODIMP
txMozillaXSLTProcessor::ImportStylesheet(nsIDOMNode *aStyle)
{
NS_ENSURE_TRUE(aStyle, NS_ERROR_NULL_POINTER);
-
+
// We don't support importing multiple stylesheets yet.
NS_ENSURE_TRUE(!mStylesheetDocument && !mStylesheet,
NS_ERROR_NOT_IMPLEMENTED);
nsCOMPtr<nsINode> node = do_QueryInterface(aStyle);
if (!node || !nsContentUtils::SubjectPrincipalOrSystemIfNativeCaller()->Subsumes(node->NodePrincipal())) {
return NS_ERROR_DOM_SECURITY_ERR;
}
-
+
nsCOMPtr<nsINode> styleNode = do_QueryInterface(aStyle);
NS_ENSURE_TRUE(styleNode &&
(styleNode->IsElement() ||
styleNode->IsNodeOfType(nsINode::eDOCUMENT)),
NS_ERROR_INVALID_ARG);
nsresult rv = TX_CompileStylesheet(styleNode, this,
getter_AddRefs(mStylesheet));
@@ -669,22 +669,22 @@ txMozillaXSLTProcessor::TransformToDoc(n
es.mOutputHandlerFactory = &handlerFactory;
nsresult rv = es.init(*sourceNode, &mVariables);
// Process root of XML source document
if (NS_SUCCEEDED(rv)) {
rv = txXSLTProcessor::execute(es);
}
-
+
nsresult endRv = es.end(rv);
if (NS_SUCCEEDED(rv)) {
rv = endRv;
}
-
+
if (NS_SUCCEEDED(rv)) {
if (aResult) {
txAOutputXMLEventHandler* handler =
static_cast<txAOutputXMLEventHandler*>(es.mOutputHandler);
handler->getOutputDocument(aResult);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(*aResult);
MOZ_ASSERT(doc->GetReadyStateEnum() ==
nsIDocument::READYSTATE_INTERACTIVE, "Bad readyState");
@@ -928,17 +928,17 @@ txMozillaXSLTProcessor::SetParameter(con
free(array);
break;
}
default:
{
return NS_ERROR_FAILURE;
- }
+ }
}
int32_t nsId = kNameSpaceID_Unknown;
nsresult rv = nsContentUtils::NameSpaceManager()->
RegisterNameSpace(aNamespaceURI, nsId);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAtom> localName = NS_Atomize(aLocalName);
txExpandedName varName(nsId, localName);
@@ -1168,27 +1168,27 @@ txMozillaXSLTProcessor::notifyError()
if (!mSourceText.IsEmpty()) {
nsCOMPtr<nsIDOMElement> sourceElement;
rv = errorDocument->CreateElementNS(ns,
NS_LITERAL_STRING("sourcetext"),
getter_AddRefs(sourceElement));
if (NS_FAILED(rv)) {
return;
}
-
+
rv = element->AppendChild(sourceElement, getter_AddRefs(resultNode));
if (NS_FAILED(rv)) {
return;
}
rv = errorDocument->CreateTextNode(mSourceText, getter_AddRefs(text));
if (NS_FAILED(rv)) {
return;
}
-
+
rv = sourceElement->AppendChild(text, getter_AddRefs(resultNode));
if (NS_FAILED(rv)) {
return;
}
}
MOZ_ASSERT(document->GetReadyStateEnum() ==
nsIDocument::READYSTATE_LOADING,