Bug 1338889 - Part 1: Remove redundant trailing spaces. r=bz
authorJohn Dai <jdai@mozilla.com>
Tue, 14 Feb 2017 23:11:00 +0800
changeset 343066 8b2b7bf67ff7f54cce45f1bbecb5bf371ce025fd
parent 343065 69bc1e04bb2cab5b2880e23c8ca49a5670af1538
child 343067 1fe1c039817861a09bfb7ffd361ec0ebde9d834c
push id31369
push userkwierso@gmail.com
push dateThu, 16 Feb 2017 00:18:40 +0000
treeherdermozilla-central@e9b926463f9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1338889
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1338889 - Part 1: Remove redundant trailing spaces. r=bz
dom/base/nsIDocument.h
dom/xml/XMLDocument.cpp
dom/xslt/xslt/txMozillaXSLTProcessor.cpp
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -2862,17 +2862,17 @@ public:
   }
 
   mozilla::dom::DocGroup* GetDocGroup() const;
 
   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;
 
   // Dispatch a runnable related to the document.
   virtual nsresult Dispatch(const char* aName,
                             mozilla::TaskCategory aCategory,
                             already_AddRefed<nsIRunnable>&& aRunnable) override;
--- 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,26 +147,26 @@ 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<nsINode> doctypeAsNode = do_QueryInterface(aDoctype);
     ErrorResult result;
     d->AppendChild(*doctypeAsNode, result);
     if (NS_WARN_IF(result.Failed())) {
       return result.StealNSResult();
     }
   }
-  
+
   if (!aQualifiedName.IsEmpty()) {
     ErrorResult result;
     nsCOMPtr<Element> root =
       doc->CreateElementNS(aNamespaceURI, aQualifiedName,
                            ElementCreationOptions(), result);
     if (NS_WARN_IF(result.Failed())) {
       return result.StealNSResult();
     }
@@ -308,17 +308,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 (aCallerType == CallerType::System) {
     docForWarning->WarnOnceAbout(nsIDocument::eChromeUseOfDOM3LoadMethod);
   } else {
     docForWarning->WarnOnceAbout(nsIDocument::eUseOfDOM3LoadMethod);
-  } 
+  }
 
   nsIURI *baseURI = mDocumentURI;
   nsAutoCString charset;
 
   if (callingDoc) {
     baseURI = callingDoc->GetDocBaseURI();
     charset = callingDoc->GetDocumentCharacterSet();
   }
@@ -399,17 +399,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,
@@ -433,18 +433,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
@@ -516,17 +516,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
   }
 
@@ -540,17 +540,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);
@@ -561,17 +561,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
@@ -524,17 +524,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);
 }
@@ -584,26 +584,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));
@@ -670,22 +670,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");
@@ -929,17 +929,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);
@@ -1147,24 +1147,24 @@ txMozillaXSLTProcessor::notifyError()
 
     if (!mSourceText.IsEmpty()) {
         nsCOMPtr<Element> sourceElement =
             document->CreateElementNS(ns, NS_LITERAL_STRING("sourcetext"),
                                       ElementCreationOptions(), rv);
         if (rv.Failed()) {
             return;
         }
-    
+
         element->AppendChild(*sourceElement, rv);
         if (rv.Failed()) {
             return;
         }
 
         text = document->CreateTextNode(mSourceText);
-    
+
         sourceElement->AppendChild(*text, rv);
         if (rv.Failed()) {
             return;
         }
     }
 
     MOZ_ASSERT(document->GetReadyStateEnum() ==
                  nsIDocument::READYSTATE_LOADING,