Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef nsHtml5TreeOpStage_h |
michael@0 | 6 | #define nsHtml5TreeOpStage_h |
michael@0 | 7 | |
michael@0 | 8 | #include "mozilla/Mutex.h" |
michael@0 | 9 | #include "nsHtml5TreeOperation.h" |
michael@0 | 10 | #include "nsTArray.h" |
michael@0 | 11 | #include "nsAHtml5TreeOpSink.h" |
michael@0 | 12 | #include "nsHtml5SpeculativeLoad.h" |
michael@0 | 13 | |
michael@0 | 14 | class nsHtml5TreeOpStage : public nsAHtml5TreeOpSink { |
michael@0 | 15 | public: |
michael@0 | 16 | |
michael@0 | 17 | nsHtml5TreeOpStage(); |
michael@0 | 18 | |
michael@0 | 19 | virtual ~nsHtml5TreeOpStage(); |
michael@0 | 20 | |
michael@0 | 21 | /** |
michael@0 | 22 | * Flush the operations from the tree operations from the argument |
michael@0 | 23 | * queue unconditionally. |
michael@0 | 24 | */ |
michael@0 | 25 | virtual void MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue); |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * Retrieve the staged operations and speculative loads into the arguments. |
michael@0 | 29 | */ |
michael@0 | 30 | void MoveOpsAndSpeculativeLoadsTo(nsTArray<nsHtml5TreeOperation>& aOpQueue, |
michael@0 | 31 | nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue); |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Move the speculative loads from the argument into the staging queue. |
michael@0 | 35 | */ |
michael@0 | 36 | void MoveSpeculativeLoadsFrom(nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue); |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * Retrieve the staged speculative loads into the argument. |
michael@0 | 40 | */ |
michael@0 | 41 | void MoveSpeculativeLoadsTo(nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue); |
michael@0 | 42 | |
michael@0 | 43 | #ifdef DEBUG |
michael@0 | 44 | void AssertEmpty(); |
michael@0 | 45 | #endif |
michael@0 | 46 | |
michael@0 | 47 | private: |
michael@0 | 48 | nsTArray<nsHtml5TreeOperation> mOpQueue; |
michael@0 | 49 | nsTArray<nsHtml5SpeculativeLoad> mSpeculativeLoadQueue; |
michael@0 | 50 | mozilla::Mutex mMutex; |
michael@0 | 51 | |
michael@0 | 52 | }; |
michael@0 | 53 | |
michael@0 | 54 | #endif /* nsHtml5TreeOpStage_h */ |