2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-05-17 02:22:15 +00:00
|
|
|
|
|
|
|
#ifndef __inDeepTreeWalker_h___
|
|
|
|
#define __inDeepTreeWalker_h___
|
|
|
|
|
|
|
|
#include "inIDeepTreeWalker.h"
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIDOMNode.h"
|
2009-02-03 14:42:18 +00:00
|
|
|
#include "nsTArray.h"
|
2006-05-17 02:22:15 +00:00
|
|
|
|
2006-05-17 02:38:00 +00:00
|
|
|
class inIDOMUtils;
|
2009-03-12 07:26:29 +00:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
struct DeepTreeStackItem
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsIDOMNode> node;
|
|
|
|
nsCOMPtr<nsIDOMNodeList> kids;
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t lastIndex; // Index one bigger than the index of whatever
|
2009-10-20 17:27:46 +00:00
|
|
|
// kid we're currently at in |kids|.
|
2009-03-12 07:26:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////
|
2006-05-17 02:38:00 +00:00
|
|
|
|
2006-05-17 02:22:15 +00:00
|
|
|
class inDeepTreeWalker : public inIDeepTreeWalker
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_INIDEEPTREEWALKER
|
|
|
|
|
|
|
|
inDeepTreeWalker();
|
|
|
|
|
|
|
|
protected:
|
2014-06-23 22:40:01 +00:00
|
|
|
virtual ~inDeepTreeWalker();
|
|
|
|
|
2006-05-17 02:22:15 +00:00
|
|
|
void PushNode(nsIDOMNode* aNode);
|
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool mShowAnonymousContent;
|
|
|
|
bool mShowSubDocuments;
|
2006-05-17 02:22:15 +00:00
|
|
|
nsCOMPtr<nsIDOMNode> mRoot;
|
|
|
|
nsCOMPtr<nsIDOMNode> mCurrentNode;
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t mWhatToShow;
|
2006-05-17 02:22:15 +00:00
|
|
|
|
2009-03-12 07:26:29 +00:00
|
|
|
nsAutoTArray<DeepTreeStackItem, 8> mStack;
|
2006-05-17 02:38:00 +00:00
|
|
|
nsCOMPtr<inIDOMUtils> mDOMUtils;
|
2006-05-17 02:22:15 +00:00
|
|
|
};
|
|
|
|
|
2006-05-19 18:59:39 +00:00
|
|
|
// {BFCB82C2-5611-4318-90D6-BAF4A7864252}
|
|
|
|
#define IN_DEEPTREEWALKER_CID \
|
|
|
|
{ 0xbfcb82c2, 0x5611, 0x4318, { 0x90, 0xd6, 0xba, 0xf4, 0xa7, 0x86, 0x42, 0x52 } }
|
|
|
|
|
2006-05-17 02:22:15 +00:00
|
|
|
#endif // __inDeepTreeWalker_h___
|