chromium/third_party/blink/renderer/core/dom/flat_tree_traversal.h

/*
 * Copyright (C) 2012 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_DOM_FLAT_TREE_TRAVERSAL_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_DOM_FLAT_TREE_TRAVERSAL_H_

#include "base/dcheck_is_on.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/layout_tree_builder_traversal.h"
#include "third_party/blink/renderer/core/dom/node_traversal.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/dom/traversal_range.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"

namespace blink {

class ContainerNode;
class Node;

// Flat tree version of |NodeTraversal|.
//
// None of member functions takes a |ShadowRoot| or an active insertion point,
// e.g. roughly speaking <content> and <shadow> in the shadow tree, see
// |InsertionPoint::isActive()| for details of active insertion points, since
// they aren't appeared in the flat tree. |assertPrecondition()| and
// |assertPostCondition()| check this condition.
class CORE_EXPORT FlatTreeTraversal {};

inline ContainerNode* FlatTreeTraversal::Parent(const Node& node) {}

inline Element* FlatTreeTraversal::ParentElement(const Node& node) {}

inline Node* FlatTreeTraversal::NextSibling(const Node& node) {}

inline Node* FlatTreeTraversal::PreviousSibling(const Node& node) {}

inline Node* FlatTreeTraversal::Next(const Node& node) {}

inline Node* FlatTreeTraversal::Next(const Node& node,
                                     const Node* stay_within) {}

inline Node* FlatTreeTraversal::NextSkippingChildren(const Node& node,
                                                     const Node* stay_within) {}

inline Node* FlatTreeTraversal::TraverseNext(const Node& node) {}

inline Node* FlatTreeTraversal::TraverseNext(const Node& node,
                                             const Node* stay_within) {}

inline Node* FlatTreeTraversal::TraverseNextSkippingChildren(
    const Node& node,
    const Node* stay_within) {}

inline Node* FlatTreeTraversal::Previous(const Node& node) {}

inline Node* FlatTreeTraversal::TraversePrevious(const Node& node) {}

inline Node* FlatTreeTraversal::Previous(const Node& node,
                                         const Node* stay_within) {}

inline Node* FlatTreeTraversal::FirstChild(const Node& node) {}

inline Node* FlatTreeTraversal::LastChild(const Node& node) {}

inline bool FlatTreeTraversal::HasChildren(const Node& node) {}

inline Node* FlatTreeTraversal::TraverseNextSibling(const Node& node) {}

inline Node* FlatTreeTraversal::TraversePreviousSibling(const Node& node) {}

inline Node* FlatTreeTraversal::TraverseFirstChild(const Node& node) {}

inline Node* FlatTreeTraversal::TraverseLastChild(const Node& node) {}

// TraverseRange<T> implementations
inline TraversalAncestorRange<FlatTreeTraversal> FlatTreeTraversal::AncestorsOf(
    const Node& node) {}

inline TraversalAncestorRange<FlatTreeTraversal>
FlatTreeTraversal::InclusiveAncestorsOf(const Node& node) {}

inline TraversalSiblingRange<FlatTreeTraversal> FlatTreeTraversal::ChildrenOf(
    const Node& parent) {}

inline TraversalDescendantRange<FlatTreeTraversal>
FlatTreeTraversal::DescendantsOf(const Node& root) {}

inline TraversalInclusiveDescendantRange<FlatTreeTraversal>
FlatTreeTraversal::InclusiveDescendantsOf(const Node& root) {}

inline TraversalNextRange<FlatTreeTraversal> FlatTreeTraversal::StartsAt(
    const Node& start) {}

inline TraversalNextRange<FlatTreeTraversal> FlatTreeTraversal::StartsAfter(
    const Node& start) {}

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_DOM_FLAT_TREE_TRAVERSAL_H_