layout/inspector/inDeepTreeWalker.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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___

mercurial