Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: third_party/WebKit/Source/core/dom/AccessibleNode.h

Issue 2967193003: Relation list properties for Accessibility Object Model phase 1 (Closed)
Patch Set: Get rid of accidental duplication in inspector output Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/AccessibleNode.h
diff --git a/third_party/WebKit/Source/core/dom/AccessibleNode.h b/third_party/WebKit/Source/core/dom/AccessibleNode.h
index aacad2d363c01a88171aae06b3158e517a137a50..d7362dfa50459d4c785a25eee232e07915b2b56c 100644
--- a/third_party/WebKit/Source/core/dom/AccessibleNode.h
+++ b/third_party/WebKit/Source/core/dom/AccessibleNode.h
@@ -15,6 +15,7 @@
namespace blink {
+class AccessibleNodeList;
class AXObjectCache;
class Element;
class QualifiedName;
@@ -69,6 +70,14 @@ enum class AOMRelationProperty {
kErrorMessage,
};
+enum class AOMRelationListProperty {
+ kDescribedBy,
+ kControls,
+ kFlowTo,
+ kLabeledBy,
+ kOwns,
+};
+
// All of the properties of AccessibleNode that have a signed integer type.
// (These all allow the value -1.)
enum class AOMIntProperty { kColCount, kRowCount, kSetSize };
@@ -87,6 +96,8 @@ class CORE_EXPORT AOMPropertyClient {
virtual void AddFloatProperty(AOMFloatProperty, float) = 0;
virtual void AddRelationProperty(AOMRelationProperty,
const AccessibleNode&) = 0;
+ virtual void AddRelationListProperty(AOMRelationListProperty,
+ const AccessibleNodeList&) = 0;
};
// Accessibility Object Model node
@@ -110,6 +121,13 @@ class CORE_EXPORT AccessibleNode
// Returns the given relation property if the Element has an AccessibleNode.
static AccessibleNode* GetProperty(Element*, AOMRelationProperty);
+ // Returns the given relation list property if the Element has an
+ // AccessibleNode.
+ static AccessibleNodeList* GetProperty(Element*, AOMRelationListProperty);
+ static bool GetProperty(Element*,
+ AOMRelationListProperty,
+ HeapVector<Member<Element>>&);
+
// Returns the value of the given property if the
// Element has an AccessibleNode. Sets |isNull| if the property and
// attribute are not present.
@@ -129,6 +147,13 @@ class CORE_EXPORT AccessibleNode
static AccessibleNode* GetPropertyOrARIAAttribute(Element*,
AOMRelationProperty);
+ // Returns true and provides the the value of the given relation
+ // list property if the Element has an AccessibleNode, or if it has
+ // the equivalent ARIA attribute. Otherwise returns false.
+ static bool GetPropertyOrARIAAttribute(Element*,
+ AOMRelationListProperty,
+ HeapVector<Member<Element>>&);
+
// Returns the value of the given property if the
// Element has an AccessibleNode, otherwise returns the equivalent
// ARIA attribute. Sets |isNull| if the property and attribute are not
@@ -179,9 +204,15 @@ class CORE_EXPORT AccessibleNode
uint32_t colSpan(bool& is_null) const;
void setColSpan(uint32_t, bool is_null);
+ AccessibleNodeList* controls() const;
+ void setControls(AccessibleNodeList*);
+
AtomicString current() const;
void setCurrent(const AtomicString&);
+ AccessibleNodeList* describedBy();
+ void setDescribedBy(AccessibleNodeList*);
+
AccessibleNode* details() const;
void setDetails(AccessibleNode*);
@@ -194,6 +225,9 @@ class CORE_EXPORT AccessibleNode
bool expanded(bool& is_null) const;
void setExpanded(bool, bool is_null);
+ AccessibleNodeList* flowTo() const;
+ void setFlowTo(AccessibleNodeList*);
+
bool hidden(bool& is_null) const;
void setHidden(bool, bool is_null);
@@ -206,6 +240,9 @@ class CORE_EXPORT AccessibleNode
AtomicString label() const;
void setLabel(const AtomicString&);
+ AccessibleNodeList* labeledBy();
+ void setLabeledBy(AccessibleNodeList*);
+
uint32_t level(bool& is_null) const;
void setLevel(uint32_t, bool is_null);
@@ -224,6 +261,9 @@ class CORE_EXPORT AccessibleNode
AtomicString orientation() const;
void setOrientation(const AtomicString&);
+ AccessibleNodeList* owns() const;
+ void setOwns(AccessibleNodeList*);
+
AtomicString placeholder() const;
void setPlaceholder(const AtomicString&);
@@ -280,9 +320,14 @@ class CORE_EXPORT AccessibleNode
DECLARE_VIRTUAL_TRACE();
+ protected:
+ friend class AccessibleNodeList;
+ void OnRelationListChanged(AOMRelationListProperty);
+
private:
void SetStringProperty(AOMStringProperty, const AtomicString&);
void SetRelationProperty(AOMRelationProperty, AccessibleNode*);
+ void SetRelationListProperty(AOMRelationListProperty, AccessibleNodeList*);
void SetBooleanProperty(AOMBooleanProperty, bool value, bool is_null);
void SetFloatProperty(AOMFloatProperty, float value, bool is_null);
void SetUIntProperty(AOMUIntProperty, uint32_t value, bool is_null);
@@ -297,6 +342,8 @@ class CORE_EXPORT AccessibleNode
Vector<std::pair<AOMUIntProperty, uint32_t>> uint_properties_;
HeapVector<std::pair<AOMRelationProperty, Member<AccessibleNode>>>
relation_properties_;
+ HeapVector<std::pair<AOMRelationListProperty, Member<AccessibleNodeList>>>
+ relation_list_properties_;
// This object's owner Element.
Member<Element> element_;
« no previous file with comments | « third_party/WebKit/Source/core/core_idl_files.gni ('k') | third_party/WebKit/Source/core/dom/AccessibleNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698