1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsHtml5TreeOpStage_h
6 #define nsHtml5TreeOpStage_h
8 #include "mozilla/Mutex.h"
9 #include "nsHtml5TreeOperation.h"
11 #include "nsAHtml5TreeOpSink.h"
12 #include "nsHtml5SpeculativeLoad.h"
14 class nsHtml5TreeOpStage
: public nsAHtml5TreeOpSink
19 virtual ~nsHtml5TreeOpStage();
22 * Flush the operations from the tree operations from the argument
23 * queue unconditionally.
25 virtual void MoveOpsFrom(nsTArray
<nsHtml5TreeOperation
>& aOpQueue
) override
;
28 * Retrieve the staged operations and speculative loads into the arguments.
30 void MoveOpsAndSpeculativeLoadsTo(
31 nsTArray
<nsHtml5TreeOperation
>& aOpQueue
,
32 nsTArray
<nsHtml5SpeculativeLoad
>& aSpeculativeLoadQueue
);
35 * Move the speculative loads from the argument into the staging queue.
37 void MoveSpeculativeLoadsFrom(
38 nsTArray
<nsHtml5SpeculativeLoad
>& aSpeculativeLoadQueue
);
41 * Retrieve the staged speculative loads into the argument.
43 void MoveSpeculativeLoadsTo(
44 nsTArray
<nsHtml5SpeculativeLoad
>& aSpeculativeLoadQueue
);
51 nsTArray
<nsHtml5TreeOperation
> mOpQueue
;
52 nsTArray
<nsHtml5SpeculativeLoad
> mSpeculativeLoadQueue
;
53 mozilla::Mutex mMutex
;
56 #endif /* nsHtml5TreeOpStage_h */