chromium/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc

/*
 * Copyright (C) 2014, 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:
 *
 * 1.  Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 * 2.  Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 * 3.  Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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/modules/accessibility/ax_object_cache_impl.h"

#include <iterator>
#include <numeric>

#include "base/auto_reset.h"
#include "base/containers/contains.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_macros.h"
#include "base/ranges/algorithm.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/abseil-cpp/absl/cleanup/cleanup.h"
#include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions/permission_status.mojom-blink.h"
#include "third_party/blink/public/mojom/render_accessibility.mojom-blink.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/web/web_local_frame_client.h"
#include "third_party/blink/public/web/web_plugin_container.h"
#include "third_party/blink/renderer/core/accessibility/scoped_blink_ax_event_intent.h"
#include "third_party/blink/renderer/core/aom/accessible_node.h"
#include "third_party/blink/renderer/core/aom/computed_accessible_node.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/document_lifecycle.h"
#include "third_party/blink/renderer/core/dom/dom_node_ids.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/dom/node_traversal.h"
#include "third_party/blink/renderer/core/dom/slot_assignment_engine.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/markers/document_marker_controller.h"
#include "third_party/blink/renderer/core/events/event_util.h"
#include "third_party/blink/renderer/core/execution_context/agent.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h"
#include "third_party/blink/renderer/core/html/forms/html_button_element.h"
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html/forms/html_label_element.h"
#include "third_party/blink/renderer/core/html/forms/html_option_element.h"
#include "third_party/blink/renderer/core/html/forms/html_select_element.h"
#include "third_party/blink/renderer/core/html/forms/listed_element.h"
#include "third_party/blink/renderer/core/html/html_area_element.h"
#include "third_party/blink/renderer/core/html/html_embed_element.h"
#include "third_party/blink/renderer/core/html/html_frame_owner_element.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/html/html_menu_element.h"
#include "third_party/blink/renderer/core/html/html_object_element.h"
#include "third_party/blink/renderer/core/html/html_olist_element.h"
#include "third_party/blink/renderer/core/html/html_plugin_element.h"
#include "third_party/blink/renderer/core/html/html_progress_element.h"
#include "third_party/blink/renderer/core/html/html_script_element.h"
#include "third_party/blink/renderer/core/html/html_slot_element.h"
#include "third_party/blink/renderer/core/html/html_style_element.h"
#include "third_party/blink/renderer/core/html/html_table_cell_element.h"
#include "third_party/blink/renderer/core/html/html_table_element.h"
#include "third_party/blink/renderer/core/html/html_table_row_element.h"
#include "third_party/blink/renderer/core/html/html_title_element.h"
#include "third_party/blink/renderer/core/html/html_ulist_element.h"
#include "third_party/blink/renderer/core/html/shadow/shadow_element_names.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input_type_names.h"
#include "third_party/blink/renderer/core/layout/inline/abstract_inline_text_box.h"
#include "third_party/blink/renderer/core/layout/layout_image.h"
#include "third_party/blink/renderer/core/layout/layout_inline.h"
#include "third_party/blink/renderer/core/layout/layout_text.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/table/layout_table.h"
#include "third_party/blink/renderer/core/layout/table/layout_table_cell.h"
#include "third_party/blink/renderer/core/layout/table/layout_table_row.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/focus_controller.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/style/content_data.h"
#include "third_party/blink/renderer/core/svg/svg_graphics_element.h"
#include "third_party/blink/renderer/core/svg/svg_style_element.h"
#include "third_party/blink/renderer/modules/accessibility/aria_notification.h"
#include "third_party/blink/renderer/modules/accessibility/ax_image_map_link.h"
#include "third_party/blink/renderer/modules/accessibility/ax_inline_text_box.h"
#include "third_party/blink/renderer/modules/accessibility/ax_media_control.h"
#include "third_party/blink/renderer/modules/accessibility/ax_media_element.h"
#include "third_party/blink/renderer/modules/accessibility/ax_node_object.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object.h"
#include "third_party/blink/renderer/modules/accessibility/ax_progress_indicator.h"
#include "third_party/blink/renderer/modules/accessibility/ax_relation_cache.h"
#include "third_party/blink/renderer/modules/accessibility/ax_slider.h"
#include "third_party/blink/renderer/modules/accessibility/ax_validation_message.h"
#include "third_party/blink/renderer/modules/accessibility/ax_virtual_object.h"
#include "third_party/blink/renderer/modules/permissions/permission_utils.h"
#include "third_party/blink/renderer/platform/graphics/dom_node_id.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "ui/accessibility/ax_common.h"
#include "ui/accessibility/ax_enums.mojom-blink.h"
#include "ui/accessibility/ax_event.h"
#include "ui/accessibility/ax_node.h"
#include "ui/accessibility/ax_role_properties.h"
#include "ui/accessibility/mojom/ax_relative_bounds.mojom-blink.h"
#if DCHECK_IS_ON()
#include "third_party/blink/renderer/modules/accessibility/ax_debug_utils.h"
#endif

// Prevent code that runs during the lifetime of the stack from altering the
// document lifecycle, for the main document, and the popup document if present.
#if DCHECK_IS_ON()
#define SCOPED_DISALLOW_LIFECYCLE_TRANSITION()
#else
#define SCOPED_DISALLOW_LIFECYCLE_TRANSITION
#endif  // DCHECK_IS_ON()

namespace blink {

FormControlType;

namespace {

Node* RetargetInput(Node* node) {}

Element* RetargetInput(Element* element) {}

bool IsInitialEmptyDocument(const Document& document) {}

// Return true if display locked or inside slot recalc, false otherwise.
// Also returns false if not a safe time to perform the check.
bool IsDisplayLocked(const Node* node, bool inclusive = false) {}

bool IsDisplayLocked(const LayoutObject* object) {}

bool IsActive(Document& document) {}

bool HasAriaCellRole(Element* elem) {}

// Return true if whitespace is not necessary to keep adjacent_node separate
// in screen reader output from surrounding nodes.
bool CanIgnoreSpaceNextTo(LayoutObject* layout_object,
                          bool is_after,
                          int counter = 0) {}

bool CanIgnoreSpace(const LayoutText& layout_text) {}

bool IsLayoutTextRelevantForAccessibility(const LayoutText& layout_text) {}

bool IsHiddenTextNodeRelevantForAccessibility(const Text& text_node,
                                              bool is_display_locked) {}

bool IsShadowContentRelevantForAccessibility(const Node* node) {}

bool IsLayoutObjectRelevantForAccessibility(const LayoutObject& layout_object) {}

bool IsSubtreePrunedForAccessibility(const Element* node) {}

// Return true if node is head/style/script or any descendant of those.
// Also returns true for descendants of any type of frame, because the frame
// itself is in the tree, but not DOM descendants (their contents are in a
// different document).
bool IsInPrunableHiddenContainerInclusive(const Node& node,
                                          bool parent_ax_known,
                                          bool is_display_locked) {}

// -----------------------------------------------------------------------------
// DetermineAXObjectType() determines what type of AXObject should be created
// for the given node and layout_object.
// * Pass in the Node, the LayoutObject or both.
// * Passing in |parent_ax_known| when there is  known parent is an optimization
// and does not affect the return value.
// Some general rules:
// * If neither the node nor layout object are relevant for accessibility, will
// return kPruneSubtree, which will cause no AXObject to be created, and
// result in the entire subtree being pruned at that point.
// * If the node is part of a forbidden subtree, then kPruneSubtree is used.
// * If both the node and layout are relevant, kCreateFromLayout is preferred,
// otherwise: kCreateFromNode for relevant nodes, kCreateFromLayout for layout.
// -----------------------------------------------------------------------------
AXObjectType DetermineAXObjectType(const Node* node,
                                   const LayoutObject* layout_object,
                                   bool parent_ax_known = false) {}

const int kSizeMb =;
const int kSize10Mb =;
const int kSizeGb =;
const int kBucketCount =;

void LogNodeDataSizeDistribution(
    const ui::AXNodeData::AXNodeDataSize& node_data_size) {}

}  // namespace

#define DEBUG_STRING_CASE(ReasonName)

static std::string TreeUpdateReasonAsDebugString(
    const AXObjectCacheImpl::TreeUpdateReason& reason) {}

std::string AXObjectCacheImpl::TreeUpdateParams::ToString() {}

// static
AXObjectCache* AXObjectCacheImpl::Create(Document& document,
                                         const ui::AXMode& ax_mode) {}

AXObjectCacheImpl::AXObjectCacheImpl(Document& document,
                                     const ui::AXMode& ax_mode)
    :{}

AXObjectCacheImpl::~AXObjectCacheImpl() {}

// This is called shortly before the AXObjectCache is deleted.
// The destruction of the AXObjectCache will do most of the cleanup.
void AXObjectCacheImpl::Dispose() {}

void AXObjectCacheImpl::AddInspectorAgent(InspectorAccessibilityAgent* agent) {}

void AXObjectCacheImpl::RemoveInspectorAgent(
    InspectorAccessibilityAgent* agent) {}

void AXObjectCacheImpl::EnsureRelationCacheAndInitialTree() {}

void AXObjectCacheImpl::EnsureSerializer() {}

AXObject* AXObjectCacheImpl::Root() {}

AXObject* AXObjectCacheImpl::ObjectFromAXID(AXID id) const {}

AXObject* AXObjectCacheImpl::FirstObjectWithRole(ax::mojom::blink::Role role) {}

Node* AXObjectCacheImpl::FocusedNode() {}

void AXObjectCacheImpl::UpdateLifecycleIfNeeded(Document& document) {}

void AXObjectCacheImpl::UpdateAXForAllDocuments() {}

AXObject* AXObjectCacheImpl::FocusedObject() {}

const ui::AXMode& AXObjectCacheImpl::GetAXMode() {}

void AXObjectCacheImpl::SetAXMode(const ui::AXMode& ax_mode) {}

AXObject* AXObjectCacheImpl::Get(const LayoutObject* layout_object,
                                 AXObject* parent_for_repair) {}

AXObject* AXObjectCacheImpl::Get(const Node* node) {}

AXObject* AXObjectCacheImpl::Get(AbstractInlineTextBox* inline_text_box) {}

AXObject* AXObjectCacheImpl::Get(AccessibleNode* accessible_node) {}

AXObject* AXObjectCacheImpl::GetAXImageForMap(const HTMLMapElement& map) {}

AXObject* AXObjectCacheImpl::CreateFromRenderer(LayoutObject* layout_object) {}

// static
bool AXObjectCacheImpl::IsRelevantSlotElement(const HTMLSlotElement& slot) {}

// static
bool AXObjectCacheImpl::IsRelevantPseudoElement(const Node& node) {}

// static
bool AXObjectCacheImpl::IsRelevantPseudoElementDescendant(
    const LayoutObject& layout_object) {}

AXObject* AXObjectCacheImpl::CreateFromNode(Node* node) {}

AXObject* AXObjectCacheImpl::CreateFromInlineTextBox(
    AbstractInlineTextBox* inline_text_box) {}

AXObject* AXObjectCacheImpl::GetOrCreate(AccessibleNode* accessible_node,
                                         AXObject* parent) {}

AXObject* AXObjectCacheImpl::GetOrCreate(const Node* node, AXObject* parent) {}

AXObject* AXObjectCacheImpl::GetOrCreate(Node* node, AXObject* parent) {}

// Caller must provide a node, a layout object, or both (where they match).
AXObject* AXObjectCacheImpl::CreateAndInit(Node* node,
                                           LayoutObject* layout_object,
                                           AXObject* parent) {}

AXObject* AXObjectCacheImpl::GetOrCreate(LayoutObject* layout_object,
                                         AXObject* parent) {}

AXObject* AXObjectCacheImpl::GetOrCreate(AbstractInlineTextBox* inline_text_box,
                                         AXObject* parent) {}

void AXObjectCacheImpl::Remove(AXObject* object, bool notify_parent) {}

// This is safe to call even if there isn't a current mapping.
// This is called by other Remove() methods, called by Blink for DOM and layout
// changes, iterating over all removed content in the subtree:
// - When a DOM subtree is removed, it is called with the root node first, and
//   then descending down into the subtree.
// - When layout for a subtree is detached, it is called on layout objects,
//   starting with leaves and moving upward, ending with the subtree root.
void AXObjectCacheImpl::Remove(AXID ax_id, bool notify_parent) {}

// This is safe to call even if there isn't a current mapping.
void AXObjectCacheImpl::Remove(AccessibleNode* accessible_node) {}

void AXObjectCacheImpl::Remove(AccessibleNode* accessible_node,
                               bool notify_parent) {}

void AXObjectCacheImpl::Remove(LayoutObject* layout_object,
                               bool notify_parent) {}

// This is safe to call even if there isn't a current mapping.
void AXObjectCacheImpl::Remove(Node* node) {}

void AXObjectCacheImpl::Remove(Node* node, bool notify_parent) {}

void AXObjectCacheImpl::RemovePopup(Document* popup_document) {}

// This is safe to call even if there isn't a current mapping.
void AXObjectCacheImpl::Remove(AbstractInlineTextBox* inline_text_box) {}

void AXObjectCacheImpl::Remove(AbstractInlineTextBox* inline_text_box,
                               bool notify_parent) {}

void AXObjectCacheImpl::RemoveIncludedSubtree(AXObject* object,
                                              bool remove_root) {}

void AXObjectCacheImpl::RemoveAXObjectsInLayoutSubtree(
    LayoutObject* subtree_root) {}

void AXObjectCacheImpl::RemoveSubtree(const Node* node, bool remove_root) {}

void AXObjectCacheImpl::RemoveSubtree(const Node* node) {}

void AXObjectCacheImpl::RemoveSubtree(const Node* node,
                                      bool remove_root,
                                      bool notify_parent) {}

// All generated AXIDs are negative, ranging from kFirstGeneratedRendererNodeID
// to kLastGeneratedRendererNodeID, in order to avoid conflict with the ids
// reused from dom_node_ids, which are positive, and generated IDs on the
// browser side, which are negative, starting at -1.
AXID AXObjectCacheImpl::GenerateAXID() const {}

void AXObjectCacheImpl::AddToFixedOrStickyNodeList(const AXObject* object) {}

AXID AXObjectCacheImpl::AssociateAXID(AXObject* obj, AXID use_axid) {}

void AXObjectCacheImpl::RemoveReferencesToAXID(AXID obj_id) {}

AXObject* AXObjectCacheImpl::NearestExistingAncestor(Node* node) {}

void AXObjectCacheImpl::UpdateNumTreeUpdatesQueuedBeforeLayoutHistogram() {}

void AXObjectCacheImpl::InvalidateBoundingBoxForFixedOrStickyPosition() {}

bool AXObjectCacheImpl::CanDeferTreeUpdate(Document* tree_update_document) {}

bool AXObjectCacheImpl::PauseTreeUpdatesIfQueueFull() {}

void AXObjectCacheImpl::DeferTreeUpdate(
    AXObjectCacheImpl::TreeUpdateReason update_reason,
    Node* node,
    ax::mojom::blink::Event event) {}
void AXObjectCacheImpl::DeferTreeUpdate(
    AXObjectCacheImpl::TreeUpdateReason update_reason,
    AXObject* obj,
    ax::mojom::blink::Event event,
    bool invalidate_cached_values) {}

void AXObjectCacheImpl::SelectionChanged(Node* node) {}

void AXObjectCacheImpl::StyleChanged(const LayoutObject* layout_object,
                                     bool visibility_or_inertness_changed) {}

void AXObjectCacheImpl::TextChanged(Node* node) {}

// Return a node for the current layout object or ancestor layout object.
Node* AXObjectCacheImpl::GetClosestNodeForLayoutObject(
    const LayoutObject* layout_object) {}

void AXObjectCacheImpl::TextChanged(const LayoutObject* layout_object) {}

void AXObjectCacheImpl::TextChangedWithCleanLayout(
    Node* optional_node_for_relation_update,
    AXObject* obj) {}

void AXObjectCacheImpl::TextChangedWithCleanLayout(Node* node) {}

bool AXObjectCacheImpl::HasBadAriaHidden(const AXObject& obj) const {}

void AXObjectCacheImpl::DiscardBadAriaHiddenBecauseOfElement(
    const AXObject& obj) {}

void AXObjectCacheImpl::DiscardBadAriaHiddenBecauseOfFocus(AXObject& obj) {}

void AXObjectCacheImpl::DocumentTitleChanged() {}

bool AXObjectCacheImpl::IsReadyToProcessTreeUpdatesForNode(const Node* node) {}

void AXObjectCacheImpl::NodeIsConnected(Node* node) {}

void AXObjectCacheImpl::UpdateAriaOwnsWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::SubtreeIsAttached(Node* node) {}

void AXObjectCacheImpl::NodeIsAttached(Node* node) {}

void AXObjectCacheImpl::NodeIsAttachedWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::NotifyParentChildrenChanged(AXObject* parent) {}

// Note: do not call this when a child is becoming newly included, because
// it will return early if |obj| was last known to be unincluded.
void AXObjectCacheImpl::ChildrenChangedOnAncestorOf(AXObject* obj) {}

void AXObjectCacheImpl::ChildrenChangedWithCleanLayout(AXObject* obj) {}

AXObject* AXObjectCacheImpl::ChildrenChanged(AXObject* obj) {}

AXObject* AXObjectCacheImpl::InvalidateChildren(AXObject* obj) {}

void AXObjectCacheImpl::SlotAssignmentWillChange(Node* node) {}

void AXObjectCacheImpl::ChildrenChanged(Node* node) {}

void AXObjectCacheImpl::ChildrenChanged(const LayoutObject* layout_object) {}

void AXObjectCacheImpl::ChildrenChanged(AccessibleNode* accessible_node) {}

void AXObjectCacheImpl::ChildrenChangedWithCleanLayout(Node* node) {}

// TODO can node be non-optional?
void AXObjectCacheImpl::ChildrenChangedWithCleanLayout(Node* optional_node,
                                                       AXObject* obj) {}

void AXObjectCacheImpl::FinalizeTree() {}

void AXObjectCacheImpl::CheckStyleIsComplete(Document& document) const {}

void AXObjectCacheImpl::CheckTreeIsFinalized() {}

int AXObjectCacheImpl::GetDeferredEventsDelay() const {}

int AXObjectCacheImpl::GetLocationSerializationDelay() {}

void AXObjectCacheImpl::CommitAXUpdates(Document& document, bool force) {}

bool AXObjectCacheImpl::SerializeUpdatesAndEvents() {}

void AXObjectCacheImpl::CommitAXUpdatesImpl(Document& document) {}

bool AXObjectCacheImpl::IsParsingMainDocument() const {}

bool AXObjectCacheImpl::IsMainDocumentDirty() const {}

bool AXObjectCacheImpl::IsPopupDocumentDirty() const {}

bool AXObjectCacheImpl::IsDirty() {}

void AXObjectCacheImpl::EmbeddingTokenChanged(HTMLFrameOwnerElement* element) {}

bool AXObjectCacheImpl::IsPopup(Document& document) const {}

AXObjectCacheImpl::TreeUpdateCallbackQueue&
AXObjectCacheImpl::GetTreeUpdateCallbackQueue(Document& document) {}

void AXObjectCacheImpl::ProcessCleanLayoutCallbacks(Document& document) {}

void AXObjectCacheImpl::PostNotification(const LayoutObject* layout_object,
                                         ax::mojom::blink::Event notification) {}

void AXObjectCacheImpl::PostNotification(Node* node,
                                         ax::mojom::blink::Event notification) {}

void AXObjectCacheImpl::PostNotification(AXObject* object,
                                         ax::mojom::blink::Event event_type) {}

void AXObjectCacheImpl::ScheduleAXUpdate() const {}

void AXObjectCacheImpl::FireTreeUpdatedEventForAXID(
    TreeUpdateParams* tree_update,
    Document& document) {}

void AXObjectCacheImpl::FireTreeUpdatedEventForNode(
    TreeUpdateParams* tree_update) {}

bool AXObjectCacheImpl::IsAriaOwned(const AXObject* object, bool checks) const {}

AXObject* AXObjectCacheImpl::ValidatedAriaOwner(const AXObject* object) const {}

void AXObjectCacheImpl::ValidatedAriaOwnedChildren(
    const AXObject* owner,
    HeapVector<Member<AXObject>>& owned_children) {}

bool AXObjectCacheImpl::MayHaveHTMLLabel(const HTMLElement& elem) {}

bool AXObjectCacheImpl::IsLabelOrDescription(Element& element) {}

void AXObjectCacheImpl::CheckedStateChanged(Node* node) {}

void AXObjectCacheImpl::ListboxOptionStateChanged(HTMLOptionElement* option) {}

void AXObjectCacheImpl::ListboxSelectedChildrenChanged(
    HTMLSelectElement* select) {}

void AXObjectCacheImpl::ListboxActiveIndexChanged(HTMLSelectElement* select) {}

void AXObjectCacheImpl::SetMenuListOptionsBounds(
    HTMLSelectElement* select,
    const WTF::Vector<gfx::Rect>& options_bounds) {}

const WTF::Vector<gfx::Rect>* AXObjectCacheImpl::GetOptionsBounds(
    const AXObject& ax_menu_list) const {}

void AXObjectCacheImpl::ImageLoaded(const LayoutObject* layout_object) {}

void AXObjectCacheImpl::HandleClicked(Node* node) {}

void AXObjectCacheImpl::HandleAttributeChanged(
    const QualifiedName& attr_name,
    AccessibleNode* accessible_node) {}

void AXObjectCacheImpl::HandleAriaNotification(
    const Node* node,
    const String& announcement,
    const AriaNotificationOptions* options) {}

AriaNotifications AXObjectCacheImpl::RetrieveAriaNotifications(
    const AXObject* obj) {}

void AXObjectCacheImpl::UpdateTableRoleWithCleanLayout(Node* table) {}

void AXObjectCacheImpl::HandleAriaExpandedChangeWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::HandleAriaPressedChangedWithCleanLayout(Node* node) {}

// In single selection containers, selection follows focus, so a selection
// changed event must be fired. This ensures the AT is notified that the
// selected state has changed, so that it does not read "unselected" as
// the user navigates through the items. The event generator will handle
// the correct events as long as the old and newly selected objects are marked
// dirty.
void AXObjectCacheImpl::HandleAriaSelectedChangedWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::HandleNodeLostFocusWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::HandleNodeGainedFocusWithCleanLayout(Node* node) {}

// This might be the new target of a relation. Handle all possible cases.
void AXObjectCacheImpl::MaybeNewRelationTarget(Node& node, AXObject* obj) {}

void AXObjectCacheImpl::HandleActiveDescendantChangedWithCleanLayout(
    Node* node) {}

// A <section> or role=region uses the region role if and only if it has a name.
void AXObjectCacheImpl::SectionOrRegionRoleMaybeChangedWithCleanLayout(
    Node* node) {}

void AXObjectCacheImpl::TableCellRoleMaybeChanged(Node* node) {}

void AXObjectCacheImpl::HandleRoleMaybeChangedWithCleanLayout(Node* node) {}

// Be as safe as possible about changes that could alter the accessibility role,
// as this may require a different subclass of AXObject.
// Role changes are disallowed by the spec but we must handle it gracefully, see
// https://www.w3.org/TR/wai-aria-1.1/#h-roles for more information.
void AXObjectCacheImpl::HandleRoleChangeWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::HandleAttributeChanged(const QualifiedName& attr_name,
                                               Element* element) {}

void AXObjectCacheImpl::HandleUseMapAttributeChangedWithCleanLayout(
    Node* node) {}

void AXObjectCacheImpl::HandleNameAttributeChanged(Node* node) {}

AXObject* AXObjectCacheImpl::GetOrCreateValidationMessageObject() {}

AXObject* AXObjectCacheImpl::ValidationMessageObjectIfInvalid() {}

void AXObjectCacheImpl::RemoveValidationMessageObjectWithCleanLayout(
    Node* document) {}

// Native validation error popup for focused form control in current document.
void AXObjectCacheImpl::HandleValidationMessageVisibilityChanged(
    Node* form_control) {}

void AXObjectCacheImpl::HandleValidationMessageVisibilityChangedWithCleanLayout(
    const Node* form_control) {}

void AXObjectCacheImpl::HandleEventListenerAdded(
    Node& node,
    const AtomicString& event_type) {}

void AXObjectCacheImpl::HandleEventListenerRemoved(
    Node& node,
    const AtomicString& event_type) {}

bool AXObjectCacheImpl::DoesEventListenerImpactIgnoredState(
    const AtomicString& event_type,
    const Node& node) const {}

void AXObjectCacheImpl::HandleEventSubscriptionChanged(
    Node& node,
    const AtomicString& event_type) {}

void AXObjectCacheImpl::IdChangedWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::AriaOwnsChangedWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::InlineTextBoxesUpdated(LayoutObject* layout_object) {}

Settings* AXObjectCacheImpl::GetSettings() {}

const Element* AXObjectCacheImpl::RootAXEditableElement(const Node* node) {}

bool AXObjectCacheImpl::NodeIsTextControl(const Node* node) {}

WebLocalFrameClient* AXObjectCacheImpl::GetWebLocalFrameClient() const {}

bool AXObjectCacheImpl::IsImmediateProcessingRequiredForEvent(
    ax::mojom::blink::EventFrom& event_from,
    AXObject* target,
    ax::mojom::blink::Event& event_type) const {}

bool AXObjectCacheImpl::IsImmediateProcessingRequired(
    TreeUpdateParams* tree_update) const {}

// The lifecycle serialization works as follows:
// 1) Dirty objects and events are fired through
// AXObjectCacheImpl::PostPlatformNotification which in turn makes a call to
// AXObjectCacheImpl::AddEventToSerializationQueue to queue it.
//
// 2) When the lifecycle is ready to be serialized,
// AXObjectCacheImpl::CommitAXUpdates is called which first
// checks if it's time to make a new serialization, and if not, it will early
// return in order to add a delay between serializations.
//
// 3) AXObjectCacheImpl::CommitAXUpdates then calls
// RenderAccessibilityImpl:AXReadyCallback to start serialization process.
//
// Check the below CL for more information:
// https://chromium-review.googlesource.com/c/chromium/src/+/4994320
void AXObjectCacheImpl::AddEventToSerializationQueue(
    const ui::AXEvent& event,
    bool immediate_serialization) {}

void AXObjectCacheImpl::OnSerializationCancelled() {}

void AXObjectCacheImpl::OnSerializationStartSend() {}

bool AXObjectCacheImpl::IsSerializationInFlight() const {}

void AXObjectCacheImpl::OnSerializationReceived() {}

void AXObjectCacheImpl::ScheduleImmediateSerialization() {}

void AXObjectCacheImpl::PostPlatformNotification(
    AXObject* obj,
    ax::mojom::blink::Event event_type,
    ax::mojom::blink::EventFrom event_from,
    ax::mojom::blink::Action event_from_action,
    const BlinkAXEventIntentsSet& event_intents) {}

void AXObjectCacheImpl::MarkAXObjectDirtyWithCleanLayoutHelper(
    AXObject* obj,
    ax::mojom::blink::EventFrom event_from,
    ax::mojom::blink::Action event_from_action) {}

void AXObjectCacheImpl::MarkAXObjectDirtyWithCleanLayout(AXObject* obj) {}

void AXObjectCacheImpl::MarkAXObjectDirty(AXObject* obj) {}

void AXObjectCacheImpl::NotifySubtreeDirty(AXObject* obj) {}

void AXObjectCacheImpl::MarkAXSubtreeDirtyWithCleanLayout(AXObject* obj) {}

void AXObjectCacheImpl::MarkAXSubtreeDirty(AXObject* obj) {}

void AXObjectCacheImpl::MarkSubtreeDirty(Node* node) {}

void AXObjectCacheImpl::MarkDocumentDirty() {}

void AXObjectCacheImpl::MarkDocumentDirtyWithCleanLayout() {}

void AXObjectCacheImpl::ResetSerializer() {}

void AXObjectCacheImpl::MarkElementDirty(const Node* element) {}

WTF::Vector<TextChangedOperation>*
AXObjectCacheImpl::GetFromTextOperationInNodeIdMap(AXID id) {}

void AXObjectCacheImpl::ClearTextOperationInNodeIdMap() {}

void AXObjectCacheImpl::MarkElementDirtyWithCleanLayout(const Node* element) {}

AXObject* AXObjectCacheImpl::GetSerializationTarget(AXObject* obj) {}

void AXObjectCacheImpl::RestoreParentOrPrune(Node* child_node) {}

void AXObjectCacheImpl::HandleFocusedUIElementChanged(
    Element* old_focused_element,
    Element* new_focused_element) {}

// Check if the focused node is inside an active aria-modal dialog. If so, we
// should mark the cache as dirty to recompute the ignored status of each node.
void AXObjectCacheImpl::UpdateActiveAriaModalDialog(Node* focused_node) {}

Element* AXObjectCacheImpl::AncestorAriaModalDialog(Node* node) {}

Element* AXObjectCacheImpl::GetActiveAriaModalDialog() const {}

void AXObjectCacheImpl::SerializeLocationChanges() {}

bool AXObjectCacheImpl::SerializeEntireTree(
    size_t max_node_count,
    base::TimeDelta timeout,
    ui::AXTreeUpdate* response,
    std::set<ui::AXSerializationErrorFlag>* out_error) {}

void AXObjectCacheImpl::AddDirtyObjectToSerializationQueue(
    const AXObject* obj,
    ax::mojom::blink::EventFrom event_from,
    ax::mojom::blink::Action event_from_action,
    const std::vector<ui::AXEventIntent>& event_intents) {}

void AXObjectCacheImpl::GetUpdatesAndEventsForSerialization(
    std::vector<ui::AXTreeUpdate>& updates,
    std::vector<ui::AXEvent>& events,
    bool& had_end_of_test_event,
    bool& had_load_complete_messages) {}

#if DCHECK_IS_ON()
void AXObjectCacheImpl::UpdateIncludedNodeCount(const AXObject* obj) {}

void AXObjectCacheImpl::UpdatePluginIncludedNodeCount() {}

bool AXObjectCacheImpl::IsInternalUICheckerOn(const AXObject& obj) const {}
#endif  // DCHECK_IS_ON()

void AXObjectCacheImpl::GetImagesToAnnotate(
    ui::AXTreeUpdate& update,
    std::vector<ui::AXNodeData*>& nodes) {}

HeapMojoRemote<blink::mojom::blink::RenderAccessibilityHost>&
AXObjectCacheImpl::GetOrCreateRemoteRenderAccessibilityHost() {}

void AXObjectCacheImpl::HandleInitialFocus() {}

void AXObjectCacheImpl::HandleEditableTextContentChanged(Node* node) {}

void AXObjectCacheImpl::HandleDeletionOrInsertionInTextField(
    const SelectionInDOMTree& changed_selection,
    bool is_deletion) {}

void AXObjectCacheImpl::HandleEditableTextContentChangedWithCleanLayout(
    Node* node) {}

void AXObjectCacheImpl::HandleTextFormControlChanged(Node* node) {}

void AXObjectCacheImpl::HandleTextMarkerDataAdded(Node* start, Node* end) {}

void AXObjectCacheImpl::HandleTextMarkerDataAddedWithCleanLayout(Node* node) {}

void AXObjectCacheImpl::HandleValueChanged(Node* node) {}

void AXObjectCacheImpl::HandleUpdateActiveMenuOption(Node* menu_list) {}

void AXObjectCacheImpl::HandleUpdateMenuListPopupWithCleanLayout(
    Node* menu_list,
    bool did_show) {}

void AXObjectCacheImpl::DidShowMenuListPopup(Node* menu_list) {}

void AXObjectCacheImpl::DidHideMenuListPopup(Node* menu_list) {}

void AXObjectCacheImpl::HandleLoadStart(Document* document) {}

void AXObjectCacheImpl::HandleLoadComplete(Document* document) {}

void AXObjectCacheImpl::HandleScrolledToAnchor(const Node* anchor_node) {}

void AXObjectCacheImpl::InvalidateBoundingBox(
    const LayoutObject* layout_object) {}

void AXObjectCacheImpl::InvalidateBoundingBox(const AXID& id) {}

void AXObjectCacheImpl::SetCachedBoundingBox(
    AXID id,
    const ui::AXRelativeBounds& bounds) {}

void AXObjectCacheImpl::HandleScrollPositionChanged(
    LayoutObject* layout_object) {}

const AtomicString& AXObjectCacheImpl::ComputedRoleForNode(Node* node) {}

String AXObjectCacheImpl::ComputedNameForNode(Node* node) {}

void AXObjectCacheImpl::OnTouchAccessibilityHover(const gfx::Point& location) {}

void AXObjectCacheImpl::SetCanvasObjectBounds(HTMLCanvasElement* canvas,
                                              Element* element,
                                              const PhysicalRect& rect) {}

void AXObjectCacheImpl::AddPermissionStatusListener() {}

void AXObjectCacheImpl::OnPermissionStatusChange(
    mojom::PermissionStatus status) {}

ComputedAccessibleNode* AXObjectCacheImpl::GetOrCreateComputedAccessibleNode(
    AXID axid) {}

bool AXObjectCacheImpl::CanCallAOMEventListeners() const {}

void AXObjectCacheImpl::RequestAOMEventListenerPermission() {}

void AXObjectCacheImpl::Trace(Visitor* visitor) const {}

ax::mojom::blink::EventFrom AXObjectCacheImpl::ComputeEventFrom() {}

WebAXAutofillSuggestionAvailability
AXObjectCacheImpl::GetAutofillSuggestionAvailability(AXID id) const {}

void AXObjectCacheImpl::SetAutofillSuggestionAvailability(
    AXID id,
    WebAXAutofillSuggestionAvailability suggestion_availability) {}

void AXObjectCacheImpl::AddPluginTreeToUpdate(ui::AXTreeUpdate* update) {}

ui::AXTreeSource<const ui::AXNode*, ui::AXTreeData*, ui::AXNodeData>*
AXObjectCacheImpl::GetPluginTreeSource() {}

void AXObjectCacheImpl::SetPluginTreeSource(
    ui::AXTreeSource<const ui::AXNode*, ui::AXTreeData*, ui::AXNodeData>*
        source) {}

ui::AXTreeSerializer<const ui::AXNode*,
                     std::vector<const ui::AXNode*>,
                     ui::AXTreeUpdate*,
                     ui::AXTreeData*,
                     ui::AXNodeData>*
AXObjectCacheImpl::GetPluginTreeSerializer() {}

void AXObjectCacheImpl::ResetPluginTreeSerializer() {}

void AXObjectCacheImpl::MarkPluginDescendantDirty(ui::AXNodeID node_id) {}

std::ostream& operator<<(std::ostream& stream, const AXObjectCacheImpl& cache) {}

}  // namespace blink