content/base/src/nsTraversal.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 /*
     8  * Implementation of DOM Traversal's nsIDOMTreeWalker
     9  */
    11 #ifndef nsTraversal_h___
    12 #define nsTraversal_h___
    14 #include "nsCOMPtr.h"
    15 #include "nsIDocument.h"
    16 #include "mozilla/dom/CallbackObject.h"
    17 #include "mozilla/ErrorResult.h"
    18 #include "mozilla/dom/NodeFilterBinding.h"
    19 #include "nsIDOMNodeFilter.h"
    21 class nsINode;
    23 class nsTraversal
    24 {
    25 public:
    26     nsTraversal(nsINode *aRoot,
    27                 uint32_t aWhatToShow,
    28                 const mozilla::dom::NodeFilterHolder &aFilter);
    29     virtual ~nsTraversal();
    31 protected:
    32     nsCOMPtr<nsINode> mRoot;
    33     uint32_t mWhatToShow;
    34     mozilla::dom::NodeFilterHolder mFilter;
    35     bool mInAcceptNode;
    37     /*
    38      * Tests if and how a node should be filtered. Uses mWhatToShow and
    39      * mFilter to test the node.
    40      * @param aNode     Node to test
    41      * @param aResult   Whether we succeeded
    42      * @returns         Filtervalue. See nsIDOMNodeFilter.idl
    43      */
    44     int16_t TestNode(nsINode* aNode, mozilla::ErrorResult& aResult);
    45 };
    47 #endif

mercurial