Bug 1704628 Part 4: Avoid use of ESC to close context menu in browser_toolbox_content...
[gecko.git] / parser / html / nsHtml5TreeOpStage.h
blobf279bcc2fd86362c0dfb5f7d44bed46c4fa8feb0
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"
10 #include "nsTArray.h"
11 #include "nsAHtml5TreeOpSink.h"
12 #include "nsHtml5SpeculativeLoad.h"
14 class nsHtml5TreeOpStage : public nsAHtml5TreeOpSink {
15 public:
16 nsHtml5TreeOpStage();
18 virtual ~nsHtml5TreeOpStage();
20 /**
21 * Flush the operations from the tree operations from the argument
22 * queue unconditionally.
24 virtual void MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue) override;
26 /**
27 * Retrieve the staged operations and speculative loads into the arguments.
29 void MoveOpsAndSpeculativeLoadsTo(
30 nsTArray<nsHtml5TreeOperation>& aOpQueue,
31 nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue);
33 /**
34 * Move the speculative loads from the argument into the staging queue.
36 void MoveSpeculativeLoadsFrom(
37 nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue);
39 /**
40 * Retrieve the staged speculative loads into the argument.
42 void MoveSpeculativeLoadsTo(
43 nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue);
45 #ifdef DEBUG
46 void AssertEmpty();
47 #endif
49 private:
50 nsTArray<nsHtml5TreeOperation> mOpQueue;
51 nsTArray<nsHtml5SpeculativeLoad> mSpeculativeLoadQueue;
52 mozilla::Mutex mMutex;
55 #endif /* nsHtml5TreeOpStage_h */