Bug 959150 part 6 - Move the opening brace to the next line in methods whose body is in non-generated .h files under parser/html/. r=smaug.
☠☠ backed out by e420695e2079 ☠ ☠
authorHenri Sivonen <hsivonen@hsivonen.fi>
Wed, 05 Mar 2014 21:38:50 +0200
changeset 190326 c6874004efe7920f1d5bda0a925428750df5d016
parent 190325 ebc67518a962c890acc5e1a8810a90ea8543a64d
child 190327 630e489aed3049dcebb2cd2b997b88f4a9d03743
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs959150
milestone30.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 959150 part 6 - Move the opening brace to the next line in methods whose body is in non-generated .h files under parser/html/. r=smaug.
parser/html/nsHtml5AtomTable.h
parser/html/nsHtml5DocumentBuilder.h
parser/html/nsHtml5MetaScannerHSupplement.h
parser/html/nsHtml5Parser.h
parser/html/nsHtml5PendingNotification.h
parser/html/nsHtml5Speculation.h
parser/html/nsHtml5SpeculativeLoad.h
parser/html/nsHtml5StreamParser.h
parser/html/nsHtml5TokenizerLoopPolicies.h
parser/html/nsHtml5TreeBuilderHSupplement.h
parser/html/nsHtml5TreeOpExecutor.h
parser/html/nsHtml5TreeOperation.h
--- a/parser/html/nsHtml5AtomTable.h
+++ b/parser/html/nsHtml5AtomTable.h
@@ -14,17 +14,18 @@
 class nsHtml5Atom;
 
 class nsHtml5AtomEntry : public nsStringHashKey
 {
   public:
     nsHtml5AtomEntry(KeyTypePointer aStr);
     nsHtml5AtomEntry(const nsHtml5AtomEntry& aOther);
     ~nsHtml5AtomEntry();
-    inline nsHtml5Atom* GetAtom() {
+    inline nsHtml5Atom* GetAtom()
+    {
       return mAtom;
     }
   private:
     nsAutoPtr<nsHtml5Atom> mAtom;
 };
 
 /**
  * nsHtml5AtomTable provides non-locking lookup and creation of atoms for 
@@ -79,22 +80,24 @@ class nsHtml5AtomTable
     /**
      * Obtains the atom for the given string in the scope of this atom table.
      */
     nsIAtom* GetAtom(const nsAString& aKey);
     
     /**
      * Empties the table.
      */
-    void Clear() {
+    void Clear()
+    {
       mTable.Clear();
     }
     
 #ifdef DEBUG
-    void SetPermittedLookupThread(nsIThread* aThread) {
+    void SetPermittedLookupThread(nsIThread* aThread)
+    {
       mPermittedLookupThread = aThread;
     }
 #endif  
   
   private:
     nsTHashtable<nsHtml5AtomEntry> mTable;
 #ifdef DEBUG
     nsCOMPtr<nsIThread>            mPermittedLookupThread;
--- a/parser/html/nsHtml5DocumentBuilder.h
+++ b/parser/html/nsHtml5DocumentBuilder.h
@@ -24,21 +24,23 @@ enum eHtml5FlushState {
 class nsHtml5DocumentBuilder : public nsContentSink
 {
 public:
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsHtml5DocumentBuilder,
                                            nsContentSink)
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  inline void HoldElement(nsIContent* aContent) {
+  inline void HoldElement(nsIContent* aContent)
+  {
     mOwnedElements.AppendElement(aContent);
   }
 
-  inline bool HaveNotified(nsIContent* aNode) {
+  inline bool HaveNotified(nsIContent* aNode)
+  {
     NS_PRECONDITION(aNode, "HaveNotified called with null argument.");
     const nsHtml5PendingNotification* start = mPendingNotifications.Elements();
     const nsHtml5PendingNotification* end = start + mPendingNotifications.Length();
     for (;;) {
       nsIContent* parent = aNode->GetParent();
       if (!parent) {
         return true;
       }
@@ -46,17 +48,18 @@ public:
         if (iter->Contains(parent)) {
           return iter->HaveNotifiedIndex(parent->IndexOf(aNode));
         }
       }
       aNode = parent;
     }
   }
 
-  void PostPendingAppendNotification(nsIContent* aParent, nsIContent* aChild) {
+  void PostPendingAppendNotification(nsIContent* aParent, nsIContent* aChild)
+  {
     bool newParent = true;
     const nsIContentPtr* first = mElementsSeenInThisAppendBatch.Elements();
     const nsIContentPtr* last = first + mElementsSeenInThisAppendBatch.Length() - 1;
     for (const nsIContentPtr* iter = last; iter >= first; --iter) {
 #ifdef DEBUG_NS_HTML5_TREE_OP_EXECUTOR_FLUSH
       sAppendBatchSlotsExamined++;
 #endif
       if (*iter == aParent) {
@@ -71,17 +74,18 @@ public:
     if (newParent) {
       mPendingNotifications.AppendElement(aParent);
     }
 #ifdef DEBUG_NS_HTML5_TREE_OP_EXECUTOR_FLUSH
     sAppendBatchExaminations++;
 #endif
   }
 
-  void FlushPendingAppendNotifications() {
+  void FlushPendingAppendNotifications()
+  {
     NS_PRECONDITION(mFlushState == eInDocUpdate, "Notifications flushed outside update");
     mFlushState = eNotifying;
     const nsHtml5PendingNotification* start = mPendingNotifications.Elements();
     const nsHtml5PendingNotification* end = start + mPendingNotifications.Length();
     for (nsHtml5PendingNotification* iter = (nsHtml5PendingNotification*)start; iter < end; ++iter) {
       iter->Fire();
     }
     mPendingNotifications.Clear();
@@ -94,47 +98,53 @@ public:
     NS_ASSERTION(mFlushState == eNotifying, "mFlushState out of sync");
     mFlushState = eInDocUpdate;
   }
 
   nsresult Init(nsIDocument* aDoc, nsIURI* aURI,
                 nsISupports* aContainer, nsIChannel* aChannel);
 
   // Getters and setters for fields from nsContentSink
-  nsIDocument* GetDocument() {
+  nsIDocument* GetDocument()
+  {
     return mDocument;
   }
-  nsNodeInfoManager* GetNodeInfoManager() {
+
+  nsNodeInfoManager* GetNodeInfoManager()
+  {
     return mNodeInfoManager;
   }
 
   /**
    * Marks this parser as broken and tells the stream parser (if any) to
    * terminate.
    *
    * @return aReason for convenience
    */
   virtual nsresult MarkAsBroken(nsresult aReason);
 
   /**
    * Checks if this parser is broken. Returns a non-NS_OK (i.e. non-0)
    * value if broken.
    */
-  inline nsresult IsBroken() {
+  inline nsresult IsBroken()
+  {
     return mBroken;
   }
 
-  inline void BeginDocUpdate() {
+  inline void BeginDocUpdate()
+  {
     NS_PRECONDITION(mFlushState == eInFlush, "Tried to double-open update.");
     NS_PRECONDITION(mParser, "Started update without parser.");
     mFlushState = eInDocUpdate;
     mDocument->BeginUpdate(UPDATE_CONTENT_MODEL);
   }
 
-  inline void EndDocUpdate() {
+  inline void EndDocUpdate()
+  {
     NS_PRECONDITION(mFlushState != eNotifying, "mFlushState out of sync");
     if (mFlushState == eInDocUpdate) {
       FlushPendingAppendNotifications();
       mFlushState = eInFlush;
       mDocument->EndUpdate(UPDATE_CONTENT_MODEL);
     }
   }
 
@@ -142,17 +152,18 @@ public:
 
   /**
    * Sets up style sheet load / parse
    */
   void UpdateStyleSheet(nsIContent* aElement);
 
   void SetDocumentMode(nsHtml5DocumentMode m);
 
-  void SetNodeInfoManager(nsNodeInfoManager* aManager) {
+  void SetNodeInfoManager(nsNodeInfoManager* aManager)
+  {
     mNodeInfoManager = aManager;
   }
 
   // nsContentSink methods
   virtual void UpdateChildCounts();
   virtual nsresult FlushTags();
 
 protected:
--- a/parser/html/nsHtml5MetaScannerHSupplement.h
+++ b/parser/html/nsHtml5MetaScannerHSupplement.h
@@ -1,11 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
  
 private:
   nsCString mCharset;
-  inline int32_t read() {
+  inline int32_t read()
+  {
     return readable->read();
   }
 public:
   void sniff(nsHtml5ByteReadable* bytes, nsACString& charset);
--- a/parser/html/nsHtml5Parser.h
+++ b/parser/html/nsHtml5Parser.h
@@ -232,28 +232,30 @@ class nsHtml5Parser : public nsIParser,
                         nsIChannel* aChannel);
 
     inline nsHtml5Tokenizer* GetTokenizer() {
       return mTokenizer;
     }
 
     void InitializeDocWriteParserState(nsAHtml5TreeBuilderState* aState, int32_t aLine);
 
-    void DropStreamParser() {
+    void DropStreamParser()
+    {
       if (mStreamParser) {
         mStreamParser->DropTimer();
         mStreamParser = nullptr;
       }
     }
     
     void StartTokenizer(bool aScriptingEnabled);
     
     void ContinueAfterFailedCharsetSwitch();
 
-    nsHtml5StreamParser* GetStreamParser() {
+    nsHtml5StreamParser* GetStreamParser()
+    {
       return mStreamParser;
     }
 
     /**
      * Parse until pending data is exhausted or a script blocks the parser
      */
     void ParseUntilBlocked();
 
--- a/parser/html/nsHtml5PendingNotification.h
+++ b/parser/html/nsHtml5PendingNotification.h
@@ -14,30 +14,34 @@ class nsHtml5PendingNotification {
 
     nsHtml5PendingNotification(nsIContent* aParent)
      : mParent(aParent),
        mChildCount(aParent->GetChildCount() - 1)
     {
       MOZ_COUNT_CTOR(nsHtml5PendingNotification);
     }
 
-    ~nsHtml5PendingNotification() {
+    ~nsHtml5PendingNotification()
+    {
       MOZ_COUNT_DTOR(nsHtml5PendingNotification);
     }
 
-    inline void Fire() {
+    inline void Fire()
+    {
       nsNodeUtils::ContentAppended(mParent, mParent->GetChildAt(mChildCount),
                                    mChildCount);
     }
 
-    inline bool Contains(nsIContent* aNode) {
+    inline bool Contains(nsIContent* aNode)
+    {
       return !!(mParent == aNode);
     }
     
-    inline bool HaveNotifiedIndex(uint32_t index) {
+    inline bool HaveNotifiedIndex(uint32_t index)
+    {
       return index < mChildCount;
     }
 
   private:
     /**
      * An element
      */
     nsIContent* mParent;
--- a/parser/html/nsHtml5Speculation.h
+++ b/parser/html/nsHtml5Speculation.h
@@ -18,29 +18,33 @@ class nsHtml5Speculation MOZ_FINAL : pub
   public:
     nsHtml5Speculation(nsHtml5OwningUTF16Buffer* aBuffer,
                        int32_t aStart, 
                        int32_t aStartLineNumber, 
                        nsAHtml5TreeBuilderState* aSnapshot);
     
     ~nsHtml5Speculation();
 
-    nsHtml5OwningUTF16Buffer* GetBuffer() {
+    nsHtml5OwningUTF16Buffer* GetBuffer()
+    {
       return mBuffer;
     }
     
-    int32_t GetStart() {
+    int32_t GetStart()
+    {
       return mStart;
     }
 
-    int32_t GetStartLineNumber() {
+    int32_t GetStartLineNumber()
+    {
       return mStartLineNumber;
     }
     
-    nsAHtml5TreeBuilderState* GetSnapshot() {
+    nsAHtml5TreeBuilderState* GetSnapshot()
+    {
       return mSnapshot;
     }
 
     /**
      * Flush the operations from the tree operations from the argument
      * queue unconditionally.
      */
     virtual void MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue);
--- a/parser/html/nsHtml5SpeculativeLoad.h
+++ b/parser/html/nsHtml5SpeculativeLoad.h
@@ -22,49 +22,53 @@ enum eHtml5SpeculativeLoad {
   eSpeculativeLoadSetDocumentCharset
 };
 
 class nsHtml5SpeculativeLoad {
   public:
     nsHtml5SpeculativeLoad();
     ~nsHtml5SpeculativeLoad();
     
-    inline void InitBase(const nsAString& aUrl) {
+    inline void InitBase(const nsAString& aUrl)
+    {
       NS_PRECONDITION(mOpCode == eSpeculativeLoadUninitialized,
                       "Trying to reinitialize a speculative load!");
       mOpCode = eSpeculativeLoadBase;
       mUrl.Assign(aUrl);
     }
 
     inline void InitImage(const nsAString& aUrl,
-                          const nsAString& aCrossOrigin) {
+                          const nsAString& aCrossOrigin)
+    {
       NS_PRECONDITION(mOpCode == eSpeculativeLoadUninitialized,
                       "Trying to reinitialize a speculative load!");
       mOpCode = eSpeculativeLoadImage;
       mUrl.Assign(aUrl);
       mCrossOrigin.Assign(aCrossOrigin);
     }
 
     inline void InitScript(const nsAString& aUrl,
                            const nsAString& aCharset,
                            const nsAString& aType,
                            const nsAString& aCrossOrigin,
-                           bool aParserInHead) {
+                           bool aParserInHead)
+    {
       NS_PRECONDITION(mOpCode == eSpeculativeLoadUninitialized,
                       "Trying to reinitialize a speculative load!");
       mOpCode = aParserInHead ?
           eSpeculativeLoadScriptFromHead : eSpeculativeLoadScript;
       mUrl.Assign(aUrl);
       mCharset.Assign(aCharset);
       mTypeOrCharsetSource.Assign(aType);
       mCrossOrigin.Assign(aCrossOrigin);
     }
     
     inline void InitStyle(const nsAString& aUrl, const nsAString& aCharset,
-			  const nsAString& aCrossOrigin) {
+			  const nsAString& aCrossOrigin)
+    {
       NS_PRECONDITION(mOpCode == eSpeculativeLoadUninitialized,
                       "Trying to reinitialize a speculative load!");
       mOpCode = eSpeculativeLoadStyle;
       mUrl.Assign(aUrl);
       mCharset.Assign(aCharset);
       mCrossOrigin.Assign(aCrossOrigin);
     }
 
@@ -74,17 +78,18 @@ class nsHtml5SpeculativeLoad {
      * before the manifest, so the situation of having to undo a manifest due
      * to document.write() never arises. The reason why a parser
      * thread-discovered manifest gets loaded via the speculative load queue
      * as opposed to tree operation queue is that the manifest must get
      * processed before any actual speculative loads such as scripts. Thus,
      * manifests seen by the parser thread have to maintain the queue order
      * relative to true speculative loads. See bug 541079.
      */
-    inline void InitManifest(const nsAString& aUrl) {
+    inline void InitManifest(const nsAString& aUrl)
+    {
       NS_PRECONDITION(mOpCode == eSpeculativeLoadUninitialized,
                       "Trying to reinitialize a speculative load!");
       mOpCode = eSpeculativeLoadManifest;
       mUrl.Assign(aUrl);
     }
 
     /**
      * "Speculative" charset setting isn't truly speculative. If the charset
@@ -92,17 +97,18 @@ class nsHtml5SpeculativeLoad {
      * a late meta cause a reload. The reason why a parser
      * thread-discovered charset gets communicated via the speculative load
      * queue as opposed to tree operation queue is that the charset change
      * must get processed before any actual speculative loads such as style
      * sheets. Thus, encoding decisions by the parser thread have to maintain
      * the queue order relative to true speculative loads. See bug 675499.
      */
     inline void InitSetDocumentCharset(nsACString& aCharset,
-                                       int32_t aCharsetSource) {
+                                       int32_t aCharsetSource)
+    {
       NS_PRECONDITION(mOpCode == eSpeculativeLoadUninitialized,
                       "Trying to reinitialize a speculative load!");
       mOpCode = eSpeculativeLoadSetDocumentCharset;
       CopyUTF8toUTF16(aCharset, mCharset);
       mTypeOrCharsetSource.Assign((char16_t)aCharsetSource);
     }
 
     void Perform(nsHtml5TreeOpExecutor* aExecutor);
--- a/parser/html/nsHtml5StreamParser.h
+++ b/parser/html/nsHtml5StreamParser.h
@@ -176,17 +176,18 @@ class nsHtml5StreamParser : public nsISt
                               nsHtml5TreeBuilder* aTreeBuilder,
                               bool aLastWasCR);
 
     /**
      * Continues the stream parser if the charset switch failed.
      */
     void ContinueAfterFailedCharsetSwitch();
 
-    void Terminate() {
+    void Terminate()
+    {
       mozilla::MutexAutoLock autoLock(mTerminatedMutex);
       mTerminated = true;
     }
     
     void DropTimer();
 
     /**
      * Sets mCharset and mCharsetSource appropriately for the XML View Source
@@ -215,22 +216,24 @@ class nsHtml5StreamParser : public nsISt
     void MarkAsBroken();
 
     /**
      * Marks the stream parser as interrupted. If you ever add calls to this
      * method, be sure to review Uninterrupt usage very, very carefully to
      * avoid having a previous in-flight runnable cancel your Interrupt()
      * call on the other thread too soon.
      */
-    void Interrupt() {
+    void Interrupt()
+    {
       mozilla::MutexAutoLock autoLock(mTerminatedMutex);
       mInterrupted = true;
     }
 
-    void Uninterrupt() {
+    void Uninterrupt()
+    {
       NS_ASSERTION(IsParserThread(), "Wrong thread!");
       mTokenizerMutex.AssertCurrentThreadOwns();
       // Not acquiring mTerminatedMutex because mTokenizerMutex is already
       // held at this point and is already stronger.
       mInterrupted = false;      
     }
 
     /**
@@ -247,30 +250,33 @@ class nsHtml5StreamParser : public nsISt
 
     static NS_METHOD CopySegmentsToParser(nsIInputStream *aInStream,
                                           void *aClosure,
                                           const char *aFromSegment,
                                           uint32_t aToOffset,
                                           uint32_t aCount,
                                           uint32_t *aWriteCount);
 
-    bool IsTerminatedOrInterrupted() {
+    bool IsTerminatedOrInterrupted()
+    {
       mozilla::MutexAutoLock autoLock(mTerminatedMutex);
       return mTerminated || mInterrupted;
     }
 
-    bool IsTerminated() {
+    bool IsTerminated()
+    {
       mozilla::MutexAutoLock autoLock(mTerminatedMutex);
       return mTerminated;
     }
 
     /**
      * True when there is a Unicode decoder already
      */
-    inline bool HasDecoder() {
+    inline bool HasDecoder()
+    {
       return !!mUnicodeDecoder;
     }
 
     /**
      * Push bytes from network when there is no Unicode decoder yet
      */
     nsresult SniffStreamBytes(const uint8_t* aFromSegment,
                               uint32_t aCount,
--- a/parser/html/nsHtml5TokenizerLoopPolicies.h
+++ b/parser/html/nsHtml5TokenizerLoopPolicies.h
@@ -10,34 +10,38 @@
  * when _not_ viewing source.
  */
 struct nsHtml5SilentPolicy
 {
   static const bool reportErrors = false;
   static int32_t transition(nsHtml5Highlighter* aHighlighter,
                             int32_t aState,
                             bool aReconsume,
-                            int32_t aPos) {
+                            int32_t aPos)
+  {
     return aState;
   }
-  static void completedNamedCharacterReference(nsHtml5Highlighter* aHighlighter) {
+  static void completedNamedCharacterReference(nsHtml5Highlighter* aHighlighter)
+  {
   }
 };
 
 /**
  * This policy reports the tokenizer transitions to a highlighter. To be used
  * when viewing source.
  */
 struct nsHtml5ViewSourcePolicy
 {
   static const bool reportErrors = true;
   static int32_t transition(nsHtml5Highlighter* aHighlighter,
                             int32_t aState,
                             bool aReconsume,
-                            int32_t aPos) {
+                            int32_t aPos)
+  {
     return aHighlighter->Transition(aState, aReconsume, aPos);
   }
-  static void completedNamedCharacterReference(nsHtml5Highlighter* aHighlighter) {
+  static void completedNamedCharacterReference(nsHtml5Highlighter* aHighlighter)
+  {
     aHighlighter->CompletedNamedCharacterReference();
   }
 };
 
 #endif // nsHtml5TokenizerLoopPolicies_h
--- a/parser/html/nsHtml5TreeBuilderHSupplement.h
+++ b/parser/html/nsHtml5TreeBuilderHSupplement.h
@@ -82,21 +82,23 @@
     void StartPlainTextViewSource(const nsAutoString& aTitle);
 
     void StartPlainText();
 
     void StartPlainTextBody();
 
     bool HasScript();
     
-    void SetOpSink(nsAHtml5TreeOpSink* aOpSink) {
+    void SetOpSink(nsAHtml5TreeOpSink* aOpSink)
+    {
       mOpSink = aOpSink;
     }
 
-    void ClearOps() {
+    void ClearOps()
+    {
       mOpQueue.Clear();
     }
     
     bool Flush(bool aDiscretionary = false);
     
     void FlushLoads();
 
     void SetDocumentCharset(nsACString& aCharset, int32_t aCharsetSource);
@@ -110,21 +112,23 @@
     void MaybeComplainAboutCharset(const char* aMsgId,
                                    bool aError,
                                    int32_t aLineNumber);
 
     void AddSnapshotToScript(nsAHtml5TreeBuilderState* aSnapshot, int32_t aLine);
 
     void DropHandles();
 
-    void SetPreventScriptExecution(bool aPrevent) {
+    void SetPreventScriptExecution(bool aPrevent)
+    {
       mPreventScriptExecution = aPrevent;
     }
 
-    bool HasBuilder() {
+    bool HasBuilder()
+    {
       return mBuilder;
     }
 
     void EnableViewSource(nsHtml5Highlighter* aHighlighter);
 
     void errStrayStartTag(nsIAtom* aName);
 
     void errStrayEndTag(nsIAtom* aName);
--- a/parser/html/nsHtml5TreeOpExecutor.h
+++ b/parser/html/nsHtml5TreeOpExecutor.h
@@ -139,27 +139,30 @@ class nsHtml5TreeOpExecutor : public nsH
     /**
      * Returns the document.
      */
     virtual nsISupports *GetTarget();
   
     virtual void ContinueInterruptedParsingAsync();
  
     // XXX Does anyone need this?
-    nsIDocShell* GetDocShell() {
+    nsIDocShell* GetDocShell()
+    {
       return mDocShell;
     }
 
-    bool IsScriptExecuting() {
+    bool IsScriptExecuting()
+    {
       return IsScriptExecutingImpl();
     }
 
     // Not from interface
 
-    void SetStreamParser(nsHtml5StreamParser* aStreamParser) {
+    void SetStreamParser(nsHtml5StreamParser* aStreamParser)
+    {
       mStreamParser = aStreamParser;
     }
     
     void InitializeDocWriteParserState(nsAHtml5TreeBuilderState* aState, int32_t aLine);
 
     bool IsScriptEnabled();
 
     virtual nsresult MarkAsBroken(nsresult aReason);
@@ -181,54 +184,61 @@ class nsHtml5TreeOpExecutor : public nsH
                               uint32_t aLineNumber);
 
     void MaybeComplainAboutCharset(const char* aMsgId,
                                    bool aError,
                                    uint32_t aLineNumber);
 
     void ComplainAboutBogusProtocolCharset(nsIDocument* aDoc);
 
-    bool IsComplete() {
+    bool IsComplete()
+    {
       return !mParser;
     }
     
-    bool HasStarted() {
+    bool HasStarted()
+    {
       return mStarted;
     }
     
-    bool IsFlushing() {
+    bool IsFlushing()
+    {
       return mFlushState >= eInFlush;
     }
 
 #ifdef DEBUG
-    bool IsInFlushLoop() {
+    bool IsInFlushLoop()
+    {
       return mRunFlushLoopOnStack;
     }
 #endif
     
     void RunScript(nsIContent* aScriptElement);
     
     /**
      * Flush the operations from the tree operations from the argument
      * queue unconditionally. (This is for the main thread case.)
      */
     virtual void MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue);
     
-    nsHtml5TreeOpStage* GetStage() {
+    nsHtml5TreeOpStage* GetStage()
+    {
       return &mStage;
     }
     
-    void StartReadingFromStage() {
+    void StartReadingFromStage()
+    {
       mReadingFromStage = true;
     }
 
     void StreamEnded();
     
 #ifdef DEBUG
-    void AssertStageEmpty() {
+    void AssertStageEmpty()
+    {
       mStage.AssertEmpty();
     }
 #endif
 
     nsIURI* GetViewSourceBaseURI();
 
     void PreloadScript(const nsAString& aURL,
                        const nsAString& aCharset,
--- a/parser/html/nsHtml5TreeOperation.h
+++ b/parser/html/nsHtml5TreeOperation.h
@@ -68,25 +68,28 @@ enum eHtml5TreeOperation {
 class nsHtml5TreeOperationStringPair {
   private:
     nsString mPublicId;
     nsString mSystemId;
   public:
     nsHtml5TreeOperationStringPair(const nsAString& aPublicId, 
                                    const nsAString& aSystemId)
       : mPublicId(aPublicId)
-      , mSystemId(aSystemId) {
+      , mSystemId(aSystemId)
+    {
       MOZ_COUNT_CTOR(nsHtml5TreeOperationStringPair);
     }
     
-    ~nsHtml5TreeOperationStringPair() {
+    ~nsHtml5TreeOperationStringPair()
+    {
       MOZ_COUNT_DTOR(nsHtml5TreeOperationStringPair);    
     }
     
-    inline void Get(nsAString& aPublicId, nsAString& aSystemId) {
+    inline void Get(nsAString& aPublicId, nsAString& aSystemId)
+    {
       aPublicId.Assign(mPublicId);
       aSystemId.Assign(mSystemId);
     }
 };
 
 class nsHtml5TreeOperation {
 
   public:
@@ -183,45 +186,49 @@ class nsHtml5TreeOperation {
                                    nsHtml5DocumentBuilder* aBuilder);
 
     static void DoneCreatingElement(nsIContent* aNode);
 
     nsHtml5TreeOperation();
 
     ~nsHtml5TreeOperation();
 
-    inline void Init(eHtml5TreeOperation aOpCode) {
+    inline void Init(eHtml5TreeOperation aOpCode)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       mOpCode = aOpCode;
     }
 
-    inline void Init(eHtml5TreeOperation aOpCode, nsIContentHandle* aNode) {
+    inline void Init(eHtml5TreeOperation aOpCode, nsIContentHandle* aNode)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aNode, "Initialized tree op with null node.");
       mOpCode = aOpCode;
       mOne.node = static_cast<nsIContent**>(aNode);
     }
 
     inline void Init(eHtml5TreeOperation aOpCode, 
                      nsIContentHandle* aNode,
-                     nsIContentHandle* aParent) {
+                     nsIContentHandle* aParent)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aNode, "Initialized tree op with null node.");
       NS_PRECONDITION(aParent, "Initialized tree op with null parent.");
       mOpCode = aOpCode;
       mOne.node = static_cast<nsIContent**>(aNode);
       mTwo.node = static_cast<nsIContent**>(aParent);
     }
     
     inline void Init(eHtml5TreeOperation aOpCode, 
                      const nsACString& aString,
-                     int32_t aInt32) {
+                     int32_t aInt32)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
 
       int32_t len = aString.Length();
       char* str = new char[len + 1];
       const char* start = aString.BeginReading();
       for (int32_t i = 0; i < len; ++i) {
         str[i] = start[i];
@@ -231,57 +238,62 @@ class nsHtml5TreeOperation {
       mOpCode = aOpCode;
       mOne.charPtr = str;
       mFour.integer = aInt32;
     }
 
     inline void Init(eHtml5TreeOperation aOpCode,
                      const nsACString& aString,
                      int32_t aInt32,
-                     int32_t aLineNumber) {
+                     int32_t aLineNumber)
+    {
       Init(aOpCode, aString, aInt32);
       mTwo.integer = aLineNumber;
     }
 
     inline void Init(eHtml5TreeOperation aOpCode,
                      nsIContentHandle* aNode,
                      nsIContentHandle* aParent,
-                     nsIContentHandle* aTable) {
+                     nsIContentHandle* aTable)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aNode, "Initialized tree op with null node.");
       NS_PRECONDITION(aParent, "Initialized tree op with null parent.");
       NS_PRECONDITION(aTable, "Initialized tree op with null table.");
       mOpCode = aOpCode;
       mOne.node = static_cast<nsIContent**>(aNode);
       mTwo.node = static_cast<nsIContent**>(aParent);
       mThree.node = static_cast<nsIContent**>(aTable);
     }
 
-    inline void Init(nsHtml5DocumentMode aMode) {
+    inline void Init(nsHtml5DocumentMode aMode)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       mOpCode = eTreeOpDocumentMode;
       mOne.mode = aMode;
     }
     
-    inline void InitScript(nsIContentHandle* aNode) {
+    inline void InitScript(nsIContentHandle* aNode)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aNode, "Initialized tree op with null node.");
       mOpCode = eTreeOpRunScript;
       mOne.node = static_cast<nsIContent**>(aNode);
       mTwo.state = nullptr;
     }
     
     inline void Init(int32_t aNamespace, 
                      nsIAtom* aName, 
                      nsHtml5HtmlAttributes* aAttributes,
                      nsIContentHandle* aTarget,
-                     bool aFromNetwork) {
+                     bool aFromNetwork)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aName, "Initialized tree op with null name.");
       NS_PRECONDITION(aTarget, "Initialized tree op with null target node.");
       mOpCode = aFromNetwork ?
                 eTreeOpCreateElementNetwork :
                 eTreeOpCreateElementNotNetwork;
       mFour.integer = aNamespace;
@@ -293,154 +305,169 @@ class nsHtml5TreeOperation {
         mThree.attributes = aAttributes;
       }
     }
 
     inline void Init(eHtml5TreeOperation aOpCode, 
                      char16_t* aBuffer, 
                      int32_t aLength, 
                      nsIContentHandle* aStackParent,
-                     nsIContentHandle* aTable) {
+                     nsIContentHandle* aTable)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aBuffer, "Initialized tree op with null buffer.");
       mOpCode = aOpCode;
       mOne.node = static_cast<nsIContent**>(aStackParent);
       mTwo.unicharPtr = aBuffer;
       mThree.node = static_cast<nsIContent**>(aTable);
       mFour.integer = aLength;
     }
 
     inline void Init(eHtml5TreeOperation aOpCode, 
                      char16_t* aBuffer, 
                      int32_t aLength, 
-                     nsIContentHandle* aParent) {
+                     nsIContentHandle* aParent)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aBuffer, "Initialized tree op with null buffer.");
       mOpCode = aOpCode;
       mOne.node = static_cast<nsIContent**>(aParent);
       mTwo.unicharPtr = aBuffer;
       mFour.integer = aLength;
     }
 
     inline void Init(eHtml5TreeOperation aOpCode, 
                      char16_t* aBuffer, 
-                     int32_t aLength) {
+                     int32_t aLength)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aBuffer, "Initialized tree op with null buffer.");
       mOpCode = aOpCode;
       mTwo.unicharPtr = aBuffer;
       mFour.integer = aLength;
     }
     
     inline void Init(nsIContentHandle* aElement,
-                     nsHtml5HtmlAttributes* aAttributes) {
+                     nsHtml5HtmlAttributes* aAttributes)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aElement, "Initialized tree op with null element.");
       mOpCode = eTreeOpAddAttributes;
       mOne.node = static_cast<nsIContent**>(aElement);
       mTwo.attributes = aAttributes;
     }
     
     inline void Init(nsIAtom* aName, 
                      const nsAString& aPublicId, 
-                     const nsAString& aSystemId) {
+                     const nsAString& aSystemId)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       mOpCode = eTreeOpAppendDoctypeToDocument;
       mOne.atom = aName;
       mTwo.stringPair = new nsHtml5TreeOperationStringPair(aPublicId, aSystemId);
     }
     
     inline void Init(nsIContentHandle* aElement,
                      const char* aMsgId,
                      nsIAtom* aAtom,
-                     nsIAtom* aOtherAtom) {
+                     nsIAtom* aOtherAtom)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       mOpCode = eTreeOpAddError;
       mOne.node = static_cast<nsIContent**>(aElement);
       mTwo.charPtr = (char*)aMsgId;
       mThree.atom = aAtom;
       mFour.atom = aOtherAtom;
     }
 
     inline void Init(nsIContentHandle* aElement,
                      const char* aMsgId,
-                     nsIAtom* aAtom) {
+                     nsIAtom* aAtom)
+    {
       Init(aElement, aMsgId, aAtom, nullptr);
     }
 
     inline void Init(nsIContentHandle* aElement,
-                     const char* aMsgId) {
+                     const char* aMsgId)
+    {
       Init(aElement, aMsgId, nullptr, nullptr);
     }
 
     inline void Init(const char* aMsgId,
                      bool aError,
-                     int32_t aLineNumber) {
+                     int32_t aLineNumber)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       mOpCode = eTreeOpMaybeComplainAboutCharset;
       mOne.charPtr = const_cast<char*>(aMsgId);
       mTwo.integer = aError;
       mThree.integer = aLineNumber;
     }
 
-    inline void Init(eHtml5TreeOperation aOpCode, const nsAString& aString) {
+    inline void Init(eHtml5TreeOperation aOpCode, const nsAString& aString)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
 
       char16_t* str = NS_StringCloneData(aString);
       mOpCode = aOpCode;
       mOne.unicharPtr = str;
     }
     
     inline void Init(eHtml5TreeOperation aOpCode,
                      nsIContentHandle* aNode,
-                     int32_t aInt) {
+                     int32_t aInt)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aNode, "Initialized tree op with null node.");
       mOpCode = aOpCode;
       mOne.node = static_cast<nsIContent**>(aNode);
       mFour.integer = aInt;
     }
 
-    inline void InitAddClass(nsIContentHandle* aNode, const char16_t* aClass) {
+    inline void InitAddClass(nsIContentHandle* aNode, const char16_t* aClass)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aNode, "Initialized tree op with null node.");
       NS_PRECONDITION(aClass, "Initialized tree op with null string.");
       // aClass must be a literal string that does not need freeing
       mOpCode = eTreeOpAddClass;
       mOne.node = static_cast<nsIContent**>(aNode);
       mTwo.unicharPtr = (char16_t*)aClass;
     }
 
     inline void InitAddLineNumberId(nsIContentHandle* aNode,
-                                    const int32_t aLineNumber) {
+                                    const int32_t aLineNumber)
+    {
       NS_PRECONDITION(mOpCode == eTreeOpUninitialized,
         "Op code must be uninitialized when initializing.");
       NS_PRECONDITION(aNode, "Initialized tree op with null node.");
       NS_PRECONDITION(aLineNumber > 0, "Initialized tree op with line number.");
       // aClass must be a literal string that does not need freeing
       mOpCode = eTreeOpAddLineNumberId;
       mOne.node = static_cast<nsIContent**>(aNode);
       mFour.integer = aLineNumber;
     }
 
-    inline bool IsRunScript() {
+    inline bool IsRunScript()
+    {
       return mOpCode == eTreeOpRunScript;
     }
     
-    inline void SetSnapshot(nsAHtml5TreeBuilderState* aSnapshot, int32_t aLine) {
+    inline void SetSnapshot(nsAHtml5TreeBuilderState* aSnapshot, int32_t aLine)
+    {
       NS_ASSERTION(IsRunScript(), 
         "Setting a snapshot for a tree operation other than eTreeOpRunScript!");
       NS_PRECONDITION(aSnapshot, "Initialized tree op with null snapshot.");
       mTwo.state = aSnapshot;
       mFour.integer = aLine;
     }
 
     nsresult Perform(nsHtml5TreeOpExecutor* aBuilder,