chromium/third_party/blink/renderer/core/dom/layout_tree_builder_traversal.cc

/*
 * 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.
 */

#include "third_party/blink/renderer/core/dom/layout_tree_builder_traversal.h"

#include "third_party/blink/renderer/core/css/style_engine.h"
#include "third_party/blink/renderer/core/dom/flat_tree_traversal.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/dom/pseudo_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"

namespace blink {

inline static bool HasDisplayContentsStyle(const Node& node) {}

static bool IsLayoutObjectReparented(const LayoutObject* layout_object) {}

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

ContainerNode* LayoutTreeBuilderTraversal::LayoutParent(const Node& node) {}

LayoutObject* LayoutTreeBuilderTraversal::ParentLayoutObject(const Node& node) {}

Node* LayoutTreeBuilderTraversal::NextSibling(const Node& node) {}

Node* LayoutTreeBuilderTraversal::PreviousSibling(const Node& node) {}

Node* LayoutTreeBuilderTraversal::LastChild(const Node& node) {}

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

Node* LayoutTreeBuilderTraversal::FirstChild(const Node& node) {}

static Node* NextAncestorSibling(const Node& node, const Node* stay_within) {}

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

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

// Checks if current or (next/prev) sibling is either ::scroll-marker-group
// or element with scroll-marker-group property set.
static inline bool AreBoxTreeOrderSiblings(const Node& current, Node* sibling) {}

// This function correctly performs one move from `node` to next
// layout sibling. We can't just use NextSibling, as ::scroll-marker-group
// layout object is either previous or next sibling of its originating element,
// but still a node child of it, as a pseudo element.
// Layout tree:
//        (PS) (SMGB) (OE) (SMGA) (NS)
//                  (B)  (A)
// OE - originating element
// PS - previous sibling of OE
// NS - next sibling of OE
// SMGB - ::scroll-marker-group of OE with scroll-marker-group: before
// SMGA - ::scroll-marker-group of OE with scroll-marker-group: after
// B - ::before of OE
// A - ::after of OE
// Node tree:
//        (PS) (OE) (NS)
//    (SMGB) (B)  (A) (SMGA)
// Node tree is input (`node`), return output based on layout tree.
static Node* NextLayoutSiblingInBoxTreeOrder(const Node& node) {}

static Node* NextLayoutSiblingInternal(Node* node, int32_t& limit) {}

Node* LayoutTreeBuilderTraversal::NextLayoutSibling(const Node& node,
                                                    int32_t& limit) {}

// See comments in NextLayoutSiblingInBoxTreeOrder.
static Node* PreviousLayoutSiblingInBoxTreeOrder(const Node& node) {}

static Node* PreviousLayoutSiblingInternal(Node* node, int32_t& limit) {}

Node* LayoutTreeBuilderTraversal::PreviousLayoutSibling(const Node& node,
                                                        int32_t& limit) {}

Node* LayoutTreeBuilderTraversal::FirstLayoutChild(const Node& node) {}

LayoutObject* LayoutTreeBuilderTraversal::NextSiblingLayoutObject(
    const Node& node,
    int32_t limit) {}

LayoutObject* LayoutTreeBuilderTraversal::PreviousSiblingLayoutObject(
    const Node& node,
    int32_t limit) {}

LayoutObject* LayoutTreeBuilderTraversal::NextInTopLayer(
    const Element& element) {}

int LayoutTreeBuilderTraversal::ComparePreorderTreePosition(const Node& node1,
                                                            const Node& node2) {}

}  // namespace blink