michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __inDeepTreeWalker_h___ michael@0: #define __inDeepTreeWalker_h___ michael@0: michael@0: #include "inIDeepTreeWalker.h" michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIDOMNode.h" michael@0: #include "nsTArray.h" michael@0: michael@0: class inIDOMUtils; michael@0: michael@0: //////////////////////////////////////////////////// michael@0: michael@0: struct DeepTreeStackItem michael@0: { michael@0: nsCOMPtr node; michael@0: nsCOMPtr kids; michael@0: uint32_t lastIndex; // Index one bigger than the index of whatever michael@0: // kid we're currently at in |kids|. michael@0: }; michael@0: michael@0: //////////////////////////////////////////////////// michael@0: michael@0: class inDeepTreeWalker : public inIDeepTreeWalker michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIDOMTREEWALKER michael@0: NS_DECL_INIDEEPTREEWALKER michael@0: michael@0: inDeepTreeWalker(); michael@0: virtual ~inDeepTreeWalker(); michael@0: michael@0: protected: michael@0: void PushNode(nsIDOMNode* aNode); michael@0: michael@0: bool mShowAnonymousContent; michael@0: bool mShowSubDocuments; michael@0: nsCOMPtr mRoot; michael@0: nsCOMPtr mCurrentNode; michael@0: uint32_t mWhatToShow; michael@0: michael@0: nsAutoTArray mStack; michael@0: nsCOMPtr mDOMUtils; michael@0: }; michael@0: michael@0: // {BFCB82C2-5611-4318-90D6-BAF4A7864252} michael@0: #define IN_DEEPTREEWALKER_CID \ michael@0: { 0xbfcb82c2, 0x5611, 0x4318, { 0x90, 0xd6, 0xba, 0xf4, 0xa7, 0x86, 0x42, 0x52 } } michael@0: michael@0: #endif // __inDeepTreeWalker_h___