diff options
Diffstat (limited to 'chromium/content/browser/accessibility/browser_accessibility.h')
-rw-r--r-- | chromium/content/browser/accessibility/browser_accessibility.h | 59 |
1 files changed, 19 insertions, 40 deletions
diff --git a/chromium/content/browser/accessibility/browser_accessibility.h b/chromium/content/browser/accessibility/browser_accessibility.h index c8184f66de2..df1b7977798 100644 --- a/chromium/content/browser/accessibility/browser_accessibility.h +++ b/chromium/content/browser/accessibility/browser_accessibility.h @@ -116,20 +116,11 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate { bool IsLineBreakObject() const; - // Returns true if this is a leaf node on this platform, meaning any - // children should not be exposed to this platform's native accessibility - // layer. - // The definition of a leaf may vary depending on the platform, - // but a leaf node should never have children that are focusable or - // that might send notifications. + // See AXNode::IsLeaf(). bool PlatformIsLeaf() const; - // Returns true if this is a leaf node on this platform, including - // ignored nodes, meaning any children should not be exposed to this - // platform's native accessibility layer, but a node shouldn't be - // considered a leaf node solely because it has only ignored children. - // Each platform subclass should implement this itself. - virtual bool PlatformIsLeafIncludingIgnored() const; + // See AXNode::IsLeafIncludingIgnored(). + bool PlatformIsLeafIncludingIgnored() const; // Returns true if this object can fire events. virtual bool CanFireEvents() const; @@ -143,7 +134,7 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate { virtual uint32_t PlatformChildCount() const; // Return a pointer to the child at the given index, or NULL for an - // invalid index. Returns NULL if PlatformIsLeaf() returns true. + // invalid index. Returns nullptr if PlatformIsLeaf() returns true. virtual BrowserAccessibility* PlatformGetChild(uint32_t child_index) const; BrowserAccessibility* PlatformGetParent() const; @@ -186,12 +177,6 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate { // Return a pointer to the first ancestor that is a selection container BrowserAccessibility* PlatformGetSelectionContainer() const; - // Returns true if an ancestor of this node (not including itself) is a - // leaf node, including ignored nodes, meaning that this node is not - // actually exposed to the platform, but a node shouldn't be - // considered a leaf node solely because it has only ignored children. - bool PlatformIsChildOfLeafIncludingIgnored() const; - // If this object is exposed to the platform, returns this object. Otherwise, // returns the platform leaf under which this object is found. BrowserAccessibility* PlatformGetClosestPlatformObject() const; @@ -316,7 +301,7 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate { InternalChildIterator InternalChildrenBegin() const; InternalChildIterator InternalChildrenEnd() const; - int32_t GetId() const; + ui::AXNode::AXID GetId() const; gfx::RectF GetLocation() const; ax::mojom::Role GetRole() const; int32_t GetState() const; @@ -388,30 +373,19 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate { virtual bool IsClickable() const; - // A text field is any widget in which the user should be able to enter and - // edit text. - // - // Examples include <input type="text">, <input type="password">, <textarea>, - // <div contenteditable="true">, <div role="textbox">, <div role="searchbox"> - // and <div role="combobox">. Note that when an ARIA role that indicates that - // the widget is editable is used, such as "role=textbox", the element doesn't - // need to be contenteditable for this method to return true, as in theory - // JavaScript could be used to implement editing functionality. In practice, - // this situation should be rare. + // See AXNodeData::IsTextField(). bool IsTextField() const; - // A text field that is used for entering passwords. + // See AXNodeData::IsPasswordField(). bool IsPasswordField() const; - // A text field that doesn't accept rich text content, such as text with - // special formatting or styling. + // See AXNodeData::IsPlainTextField(). bool IsPlainTextField() const; - // A text field that accepts rich text content, such as text with special - // formatting or styling. + // See AXNodeData::IsRichTextField(). bool IsRichTextField() const; - // Return true if the accessible name was explicitly set to "" by the author + // Returns true if the accessible name was explicitly set to "" by the author bool HasExplicitlyEmptyName() const; // TODO(nektar): Remove this method and replace with GetInnerText. @@ -471,6 +445,8 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate { gfx::NativeViewAccessible GetPreviousSibling() override; bool IsChildOfLeaf() const override; + bool IsChildOfPlainTextField() const override; + bool IsLeaf() const override; gfx::NativeViewAccessible GetClosestPlatformObject() const override; std::unique_ptr<ChildIterator> ChildrenBegin() override; @@ -523,10 +499,12 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate { base::Optional<int> GetTableAriaRowCount() const override; base::Optional<int> GetTableCellCount() const override; base::Optional<bool> GetTableHasColumnOrRowHeaderNode() const override; - std::vector<int32_t> GetColHeaderNodeIds() const override; - std::vector<int32_t> GetColHeaderNodeIds(int col_index) const override; - std::vector<int32_t> GetRowHeaderNodeIds() const override; - std::vector<int32_t> GetRowHeaderNodeIds(int row_index) const override; + std::vector<ui::AXNode::AXID> GetColHeaderNodeIds() const override; + std::vector<ui::AXNode::AXID> GetColHeaderNodeIds( + int col_index) const override; + std::vector<ui::AXNode::AXID> GetRowHeaderNodeIds() const override; + std::vector<ui::AXNode::AXID> GetRowHeaderNodeIds( + int row_index) const override; ui::AXPlatformNode* GetTableCaption() const override; bool IsTableRow() const override; @@ -574,6 +552,7 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate { bool IsOrderedSet() const override; base::Optional<int> GetPosInSet() const override; base::Optional<int> GetSetSize() const override; + bool IsInListMarker() const; bool IsCollapsedMenuListPopUpButton() const; BrowserAccessibility* GetCollapsedMenuListPopUpButtonAncestor() const; |