Skip to content

Commit

Permalink
Delete unused methods on WebAXObject
Browse files Browse the repository at this point in the history
Change-Id: I7ab0538858823efb981b1d42e2d3e926b1912113
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4264771
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1108450}
  • Loading branch information
chrishtr authored and Chromium LUCI CQ committed Feb 22, 2023
1 parent 7882d1b commit 7bf0019
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 213 deletions.
1 change: 1 addition & 0 deletions third_party/blink/public/web/web_ax_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace ui {
class AXMode;
struct AXTreeUpdate;
} // namespace ui

namespace blink {
Expand Down
41 changes: 0 additions & 41 deletions third_party/blink/public/web/web_ax_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class Transform;
namespace ui {
struct AXActionData;
struct AXNodeData;
struct AXTreeUpdate;
}

namespace blink {
Expand Down Expand Up @@ -102,18 +101,12 @@ class BLINK_EXPORT WebAXObject {
WebAXObject ParentObject() const;

// Serialize the properties of this node into |node_data|.
//
// TODO(crbug.com/1068668): AX onion soup - finish migrating
// BlinkAXTreeSource::SerializeNode into AXObject::Serialize and removing
// the unneeded WebAXObject interfaces below.
void Serialize(ui::AXNodeData* node_data,
ui::AXMode accessibility_mode) const;

void InvalidateSerializerSubtree() const;
bool SerializeChanges(ui::AXTreeUpdate* update);
bool IsInClientTree();
void OnLoadInlineTextBoxes() const;
bool ShouldLoadInlineTextBoxes() const;
void SetImageAsDataNodeId(const gfx::Size& max_size) const;
int ImageDataNodeId() const;

Expand Down Expand Up @@ -145,19 +138,14 @@ class BLINK_EXPORT WebAXObject {
bool AriaOwns(WebVector<WebAXObject>& owns_elements) const;
bool CanvasHasFallbackContent() const;
WebAXObject ErrorMessage() const;
// If this is an image, returns the image (scaled to maxSize) as a data url.
WebString ImageDataUrl(const gfx::Size& max_size) const;
ax::mojom::InvalidState InvalidState() const;
// Only used when invalidState() returns WebAXInvalidStateOther.
WebString AriaInvalidValue() const;
int HeadingLevel() const;
int HierarchicalLevel() const;
WebAXObject HitTest(const gfx::Point&) const;
// Get the WebAXObject's bounds in frame-relative coordinates as a gfx::Rect.
gfx::Rect GetBoundsInFrameCoordinates() const;
WebString Language() const;
WebAXObject InPageLinkTarget() const;
WebVector<WebAXObject> RadioButtonsInGroup() const;
ax::mojom::Role Role() const;
WebString GetValueForControl() const;
ax::mojom::WritingDirection GetTextDirection() const;
Expand All @@ -182,21 +170,13 @@ class BLINK_EXPORT WebAXObject {
// present and if it wasn't already exposed by one of the two functions above.
WebString Placeholder(ax::mojom::NameFrom) const;

// Takes the result of nameFrom and retrieves the HTML Title of the object,
// if present and if it wasn't already exposed by |GetName| above.
// HTML Title is typically used as a tooltip.
WebString Title(ax::mojom::NameFrom) const;

//
// Document-level interfaces.
//
// These are intended to be called on the root WebAXObject.
//

bool IsLoaded() const;
double EstimatedLoadingProgress() const;

WebAXObject RootScroller() const;

// The following selection functions get or set the global document
// selection and can be called on any object in the tree.
Expand All @@ -210,15 +190,10 @@ class BLINK_EXPORT WebAXObject {
ax::mojom::TextAffinity& focus_affinity) const;

// Live regions.
bool IsInLiveRegion() const;
bool LiveRegionAtomic() const;
WebString LiveRegionRelevant() const;
WebString LiveRegionStatus() const;
WebAXObject LiveRegionRoot() const;
bool ContainerLiveRegionAtomic() const;
bool ContainerLiveRegionBusy() const;
WebString ContainerLiveRegionRelevant() const;
WebString ContainerLiveRegionStatus() const;

bool SupportsRangeValue() const;
bool ValueForRange(float* out_value) const;
Expand Down Expand Up @@ -271,14 +246,6 @@ class BLINK_EXPORT WebAXObject {
void RowHeaders(WebVector<WebAXObject>&) const;
void ColumnHeaders(WebVector<WebAXObject>&) const;

// For a table row
unsigned RowIndex() const;
WebAXObject RowHeader() const;

// For a table column
unsigned ColumnIndex() const;
WebAXObject ColumnHeader() const;

// For a table cell
unsigned CellColumnIndex() const;
unsigned CellColumnSpan() const;
Expand All @@ -300,17 +267,12 @@ class BLINK_EXPORT WebAXObject {
void GetWordBoundaries(WebVector<int>& starts, WebVector<int>& ends) const;

// Scrollable containers.
// Programmatically scrollable.
bool IsScrollableContainer() const;
// Also scrollable by user.
gfx::Point GetScrollOffset() const;
gfx::Point MinimumScrollOffset() const;
gfx::Point MaximumScrollOffset() const;
void SetScrollOffset(const gfx::Point&) const;

// aria-dropeffect is deprecated in WAI-ARIA 1.1
void Dropeffects(WebVector<ax::mojom::Dropeffect>& dropeffects) const;

// Every object's bounding box is returned relative to a
// container object (which is guaranteed to be an ancestor) and
// optionally a transformation matrix that needs to be applied too.
Expand All @@ -334,9 +296,6 @@ class BLINK_EXPORT WebAXObject {
ax::mojom::Action event_from_action,
std::vector<ui::AXEventIntent> event_intents) const;

// Exchanges a WebAXObject with another.
void Swap(WebAXObject& other);

// Returns a brief description of the object, suitable for debugging. E.g. its
// role and name.
WebString ToString(bool verbose = false) const;
Expand Down
2 changes: 0 additions & 2 deletions third_party/blink/renderer/modules/accessibility/ax_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -733,8 +733,6 @@ class MODULES_EXPORT AXObject : public GarbageCollected<AXObject> {
virtual ax::mojom::blink::InvalidState GetInvalidState() const {
return ax::mojom::blink::InvalidState::kNone;
}
// Only used when invalidState() returns InvalidStateOther.
virtual String AriaInvalidValue() const { return String(); }
virtual bool ValueForRange(float* out_value) const { return false; }
virtual bool MaxValueForRange(float* out_value) const { return false; }
virtual bool MinValueForRange(float* out_value) const { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3932,7 +3932,8 @@ void AXObjectCacheImpl::SerializeDirtyObjectsAndEvents(
if (has_plugin_tree_source)
update.has_tree_data = true;

bool success = SerializeChanges(*obj, &update);
bool success = ax_tree_serializer_->SerializeChanges(obj, &update);

DCHECK(success);
DCHECK_GT(update.nodes.size(), 0U);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,6 @@ class MODULES_EXPORT AXObjectCacheImpl
ax_tree_serializer_->InvalidateSubtree(&obj);
}

bool SerializeChanges(AXObject& obj, ui::AXTreeUpdate* update) {
return ax_tree_serializer_->SerializeChanges(&obj, update);
}

bool IsInClientTree(AXObject& obj) {
return ax_tree_serializer_->IsInClientTree(&obj);
}
Expand Down

0 comments on commit 7bf0019

Please sign in to comment.