chromium/third_party/blink/renderer/core/html/list_item_ordinal.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/html/list_item_ordinal.h"

#include "base/numerics/safe_conversions.h"
#include "third_party/blink/renderer/core/dom/flat_tree_traversal.h"
#include "third_party/blink/renderer/core/dom/layout_tree_builder_traversal.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/html/html_menu_element.h"
#include "third_party/blink/renderer/core/html/html_olist_element.h"
#include "third_party/blink/renderer/core/html/html_ulist_element.h"
#include "third_party/blink/renderer/core/layout/list/layout_inline_list_item.h"
#include "third_party/blink/renderer/core/layout/list/layout_list_item.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"

namespace blink {

ListItemOrdinal::ListItemOrdinal() :{}

bool ListItemOrdinal::IsListOwner(const Node& node) {}

bool ListItemOrdinal::IsListItem(const LayoutObject* layout_object) {}

bool ListItemOrdinal::IsListItem(const Node& node) {}

bool ListItemOrdinal::IsInReversedOrderedList(const Node& node) {}

ListItemOrdinal* ListItemOrdinal::Get(const Node& item_node) {}

bool ListItemOrdinal::HasStyleContainment(const Node& node) {}

// Returns the enclosing list with respect to the DOM order.
Node* ListItemOrdinal::EnclosingList(const Node* list_item_node) {}

// Returns the next list item with respect to the DOM order.
ListItemOrdinal::NodeAndOrdinal ListItemOrdinal::NextListItem(
    const Node* list_node,
    const Node* item) {}

// Returns the previous list item with respect to the DOM order.
ListItemOrdinal::NodeAndOrdinal ListItemOrdinal::PreviousListItem(
    const Node* list_node,
    const Node* item) {}

// Returns the item for the next ordinal value. It is usually the next list
// item, except when the <ol> element has the 'reversed' attribute.
ListItemOrdinal::NodeAndOrdinal ListItemOrdinal::NextOrdinalItem(
    bool is_list_reversed,
    const Node* list,
    const Node* item) {}

std::optional<int> ListItemOrdinal::ExplicitValue() const {}

int ListItemOrdinal::CalcValue(const Node& item_node) const {}

int ListItemOrdinal::Value(const Node& item_node) const {}

// Invalidate one instance of |ListItemOrdinal|.
void ListItemOrdinal::InvalidateSelf(const Node& item_node, ValueType type) {}

// Invalidate items after |item_node| in the DOM order.
void ListItemOrdinal::InvalidateAfter(const Node* list_node,
                                      const Node* item_node) {}

// Invalidate items after |item_node| in the ordinal order.
void ListItemOrdinal::InvalidateOrdinalsAfter(bool is_reversed,
                                              const Node* list_node,
                                              const Node* item_node) {}

void ListItemOrdinal::SetExplicitValue(int value, const Node& item_node) {}

void ListItemOrdinal::ClearExplicitValue(const Node& item_node) {}

unsigned ListItemOrdinal::ItemCountForOrderedList(
    const HTMLOListElement* list_node) {}

void ListItemOrdinal::InvalidateAllItemsForOrderedList(
    const HTMLOListElement* list_node) {}

// TODO(layout-dev): We should use layout tree traversal instead of flat tree
// traversal to invalidate ordinal number cache since lite items in unassigned
// slots don't have cached value. See http://crbug.com/844277 for details.
void ListItemOrdinal::ItemUpdated(const LayoutObject* layout_list_item,
                                  UpdateType type) {}

void ListItemOrdinal::ItemInsertedOrRemoved(
    const LayoutObject* layout_list_item) {}

void ListItemOrdinal::ItemCounterStyleUpdated(
    const LayoutObject& layout_list_item) {}

}  // namespace blink