Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 __inDeepTreeWalker_h___
6 #define __inDeepTreeWalker_h___
8 #include "inIDeepTreeWalker.h"
10 #include "nsCOMPtr.h"
11 #include "nsIDOMNode.h"
12 #include "nsTArray.h"
14 class inIDOMUtils;
16 ////////////////////////////////////////////////////
18 struct DeepTreeStackItem
19 {
20 nsCOMPtr<nsIDOMNode> node;
21 nsCOMPtr<nsIDOMNodeList> kids;
22 uint32_t lastIndex; // Index one bigger than the index of whatever
23 // kid we're currently at in |kids|.
24 };
26 ////////////////////////////////////////////////////
28 class inDeepTreeWalker : public inIDeepTreeWalker
29 {
30 public:
31 NS_DECL_ISUPPORTS
32 NS_DECL_NSIDOMTREEWALKER
33 NS_DECL_INIDEEPTREEWALKER
35 inDeepTreeWalker();
36 virtual ~inDeepTreeWalker();
38 protected:
39 void PushNode(nsIDOMNode* aNode);
41 bool mShowAnonymousContent;
42 bool mShowSubDocuments;
43 nsCOMPtr<nsIDOMNode> mRoot;
44 nsCOMPtr<nsIDOMNode> mCurrentNode;
45 uint32_t mWhatToShow;
47 nsAutoTArray<DeepTreeStackItem, 8> mStack;
48 nsCOMPtr<inIDOMUtils> mDOMUtils;
49 };
51 // {BFCB82C2-5611-4318-90D6-BAF4A7864252}
52 #define IN_DEEPTREEWALKER_CID \
53 { 0xbfcb82c2, 0x5611, 0x4318, { 0x90, 0xd6, 0xba, 0xf4, 0xa7, 0x86, 0x42, 0x52 } }
55 #endif // __inDeepTreeWalker_h___