#include "third_party/blink/public/web/web_ax_object.h"
#include "base/ranges/algorithm.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_node.h"
#include "third_party/blink/public/web/web_view.h"
#include "third_party/blink/renderer/core/css/css_primitive_value_mappings.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/editing/visible_position.h"
#include "third_party/blink/renderer/core/exported/web_view_impl.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input/keyboard_event_manager.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/page/page_popup.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h"
#include "third_party/blink/renderer/modules/accessibility/ax_position.h"
#include "third_party/blink/renderer/modules/accessibility/ax_range.h"
#include "third_party/blink/renderer/modules/accessibility/ax_selection.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "ui/accessibility/ax_action_data.h"
namespace blink {
namespace {
mojom::blink::ScrollAlignment::Behavior ToBlinkScrollAlignmentBehavior(
ax::mojom::ScrollAlignment alignment) { … }
}
class ScopedActionAnnotator { … };
#if DCHECK_IS_ON()
static void CheckLayoutClean(const Document* document) { … }
#endif
void WebAXObject::Reset() { … }
void WebAXObject::Assign(const WebAXObject& other) { … }
bool WebAXObject::Equals(const WebAXObject& n) const { … }
bool WebAXObject::IsDetached() const { … }
int WebAXObject::AxID() const { … }
ax::mojom::DefaultActionVerb WebAXObject::Action() const { … }
bool WebAXObject::CanSetValueAttribute() const { … }
unsigned WebAXObject::ChildCount() const { … }
WebAXObject WebAXObject::ChildAt(unsigned index) const { … }
WebAXObject WebAXObject::ParentObject() const { … }
void WebAXObject::Serialize(ui::AXNodeData* node_data,
ui::AXMode accessibility_mode) const { … }
void WebAXObject::AddDirtyObjectToSerializationQueue(
ax::mojom::blink::EventFrom event_from,
ax::mojom::blink::Action event_from_action,
std::vector<ui::AXEventIntent> event_intents) const { … }
void WebAXObject::OnLoadInlineTextBoxes() const { … }
BLINK_EXPORT void WebAXObject::SetImageAsDataNodeId(
const gfx::Size& max_size) const { … }
BLINK_EXPORT int WebAXObject::ImageDataNodeId() const { … }
WebString WebAXObject::AutoComplete() const { … }
ax::mojom::AriaCurrentState WebAXObject::AriaCurrentState() const { … }
ax::mojom::CheckedState WebAXObject::CheckedState() const { … }
bool WebAXObject::IsClickable() const { … }
bool WebAXObject::IsFocused() const { … }
bool WebAXObject::IsModal() const { … }
bool WebAXObject::IsOffScreen() const { … }
bool WebAXObject::IsVisited() const { … }
unsigned WebAXObject::ColorValue() const { … }
WebAXObject WebAXObject::AriaActiveDescendant() const { … }
bool WebAXObject::IsEditable() const { … }
bool WebAXObject::LiveRegionAtomic() const { … }
WebString WebAXObject::LiveRegionRelevant() const { … }
WebString WebAXObject::LiveRegionStatus() const { … }
bool WebAXObject::AriaOwns(WebVector<WebAXObject>& owns_elements) const { … }
bool WebAXObject::CanvasHasFallbackContent() const { … }
ax::mojom::InvalidState WebAXObject::InvalidState() const { … }
int WebAXObject::HeadingLevel() const { … }
int WebAXObject::HierarchicalLevel() const { … }
WebAXObject WebAXObject::HitTest(const gfx::Point& point) const { … }
gfx::Rect WebAXObject::GetBoundsInFrameCoordinates() const { … }
WebString WebAXObject::Language() const { … }
bool WebAXObject::PerformAction(const ui::AXActionData& action_data) const { … }
WebAXObject WebAXObject::InPageLinkTarget() const { … }
ax::mojom::Role WebAXObject::Role() const { … }
static ax::mojom::TextAffinity ToAXAffinity(TextAffinity affinity) { … }
bool WebAXObject::IsLoaded() const { … }
void WebAXObject::Selection(bool& is_selection_backward,
WebAXObject& anchor_object,
int& anchor_offset,
ax::mojom::TextAffinity& anchor_affinity,
WebAXObject& focus_object,
int& focus_offset,
ax::mojom::TextAffinity& focus_affinity) const { … }
bool WebAXObject::SetSelection(const WebAXObject& anchor_object,
int anchor_offset,
const WebAXObject& focus_object,
int focus_offset) const { … }
WebString WebAXObject::GetValueForControl() const { … }
ax::mojom::blink::WritingDirection WebAXObject::GetTextDirection() const { … }
WebURL WebAXObject::Url() const { … }
WebString WebAXObject::GetName(ax::mojom::NameFrom& out_name_from,
WebVector<WebAXObject>& out_name_objects) const { … }
WebString WebAXObject::GetName() const { … }
WebString WebAXObject::Description(
ax::mojom::NameFrom name_from,
ax::mojom::DescriptionFrom& out_description_from,
WebVector<WebAXObject>& out_description_objects) const { … }
WebString WebAXObject::Placeholder(ax::mojom::NameFrom name_from) const { … }
bool WebAXObject::SupportsRangeValue() const { … }
bool WebAXObject::ValueForRange(float* out_value) const { … }
bool WebAXObject::MaxValueForRange(float* out_value) const { … }
bool WebAXObject::MinValueForRange(float* out_value) const { … }
bool WebAXObject::StepValueForRange(float* out_value) const { … }
WebNode WebAXObject::GetNode() const { … }
WebDocument WebAXObject::GetDocument() const { … }
bool WebAXObject::IsIgnored() const { … }
bool WebAXObject::IsIncludedInTree() const { … }
unsigned WebAXObject::ColumnCount() const { … }
unsigned WebAXObject::RowCount() const { … }
WebAXObject WebAXObject::CellForColumnAndRow(unsigned column,
unsigned row) const { … }
void WebAXObject::RowHeaders(
WebVector<WebAXObject>& row_header_elements) const { … }
void WebAXObject::ColumnHeaders(
WebVector<WebAXObject>& column_header_elements) const { … }
unsigned WebAXObject::CellColumnIndex() const { … }
unsigned WebAXObject::CellColumnSpan() const { … }
unsigned WebAXObject::CellRowIndex() const { … }
unsigned WebAXObject::CellRowSpan() const { … }
ax::mojom::SortDirection WebAXObject::SortDirection() const { … }
WebAXObject WebAXObject::NextOnLine() const { … }
WebAXObject WebAXObject::PreviousOnLine() const { … }
void WebAXObject::CharacterOffsets(WebVector<int>& offsets) const { … }
void WebAXObject::GetWordBoundaries(WebVector<int>& starts,
WebVector<int>& ends) const { … }
gfx::Point WebAXObject::GetScrollOffset() const { … }
gfx::Point WebAXObject::MinimumScrollOffset() const { … }
gfx::Point WebAXObject::MaximumScrollOffset() const { … }
void WebAXObject::SetScrollOffset(const gfx::Point& offset) const { … }
void WebAXObject::GetRelativeBounds(WebAXObject& offset_container,
gfx::RectF& bounds_in_container,
gfx::Transform& container_transform,
bool* clips_children) const { … }
bool WebAXObject::ScrollToMakeVisible() const { … }
bool WebAXObject::ScrollToMakeVisibleWithSubFocus(
const gfx::Rect& subfocus,
ax::mojom::ScrollAlignment horizontal_scroll_alignment,
ax::mojom::ScrollAlignment vertical_scroll_alignment,
ax::mojom::ScrollBehavior scroll_behavior) const { … }
void WebAXObject::HandleAutofillSuggestionAvailabilityChanged(
blink::WebAXAutofillSuggestionAvailability suggestion_availability) const { … }
int WebAXObject::GenerateAXID() { … }
void WebAXObject::SetPluginTreeSource(
ui::AXTreeSource<const ui::AXNode*, ui::AXTreeData*, ui::AXNodeData>*
source) { … }
void WebAXObject::MarkPluginDescendantDirty(ui::AXNodeID node_id) { … }
bool WebAXObject::CanCallAOMEventListenersForTesting() const { … }
WebString WebAXObject::ToString(bool verbose) const { … }
WebAXObject::WebAXObject(AXObject* object) : … { … }
WebAXObject& WebAXObject::operator=(AXObject* object) { … }
bool WebAXObject::operator==(const WebAXObject& other) const { … }
bool WebAXObject::operator!=(const WebAXObject& other) const { … }
bool WebAXObject::operator<(const WebAXObject& other) const { … }
bool WebAXObject::operator<=(const WebAXObject& other) const { … }
bool WebAXObject::operator>(const WebAXObject& other) const { … }
bool WebAXObject::operator>=(const WebAXObject& other) const { … }
operator blink::AXObject *()
WebAXObject WebAXObject::FromWebNode(const WebNode& web_node) { … }
WebAXObject WebAXObject::FromWebDocument(const WebDocument& web_document) { … }
WebAXObject WebAXObject::FromWebDocumentByID(const WebDocument& web_document,
int ax_id) { … }
WebAXObject WebAXObject::FromWebDocumentFirstWithRole(
const WebDocument& web_document,
ax::mojom::blink::Role role) { … }
WebAXObject WebAXObject::FromWebDocumentFocused(
const WebDocument& web_document) { … }
bool WebAXObject::IsDirty(const WebDocument& web_document) { … }
}