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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXObject.h

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeVox and Automation API tests Created 5 years, 1 month 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/modules/accessibility/AXObject.h
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.h b/third_party/WebKit/Source/modules/accessibility/AXObject.h
index d7c86a4985853d355c2cc4cebd65e80bb6d408f2..847c6d45154fa334a7e7d1ce984a03026edba956 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.h
@@ -337,6 +337,7 @@ enum AXTextFromNativeHTML {
AXTextFromNativeHTMLLabelWrapped,
AXTextFromNativeHTMLLegend,
AXTextFromNativeHTMLTableCaption,
+ AXTextFromNativeHTMLTitleElement,
};
// The source of the accessible description of an element. This is needed
@@ -668,22 +669,7 @@ public:
bool isPresentationalChild() const;
//
- // Deprecated text alternative calculation API. All of these will be replaced
- // with the new API, below (under "New text alternative calculation API".
- //
-
- virtual bool deprecatedExposesTitleUIElement() const { return true; }
- virtual AXObject* deprecatedTitleUIElement() const { return 0; }
- virtual String deprecatedPlaceholder() const { return String(); }
- virtual void deprecatedAriaDescribedbyElements(AXObjectVector& describedby) const { }
- virtual void deprecatedAriaLabelledbyElements(AXObjectVector& labelledby) const { }
- virtual String deprecatedAccessibilityDescription() const { return String(); }
- virtual String deprecatedTitle(TextUnderElementMode mode = TextUnderElementAll) const { return String(); }
- virtual String deprecatedHelpText() const { return String(); }
- virtual String deprecatedTextUnderElement(TextUnderElementMode mode = TextUnderElementAll) const { return String(); }
-
- //
- // New text alternative calculation API (under development).
+ // Accessible name calculation
//
// Retrieves the accessible name of the object, an enum indicating where the name
@@ -708,7 +694,7 @@ public:
// Takes the result of nameFrom and descriptionFrom from calling |name| and |description|,
// above, and retrieves the placeholder of the object, if present and if it wasn't already
// exposed by one of the two functions above.
- virtual String placeholder(AXNameFrom, AXDescriptionFrom) { return String(); }
+ virtual String placeholder(AXNameFrom, AXDescriptionFrom) const { return String(); }
// Internal function used by name and description, above.
typedef HeapHashSet<Member<const AXObject>> AXObjectSet;
@@ -716,7 +702,7 @@ public:
// Returns result of Accessible Name Calculation algorithm.
// This is a simpler high-level interface to |name| used by Inspector.
- virtual String computedName() const { return String(); }
+ String computedName() const;
//
// Properties of static elements.
@@ -774,6 +760,8 @@ public:
virtual void ariaFlowToElements(AXObjectVector&) const { }
virtual void ariaControlsElements(AXObjectVector&) const { }
virtual void ariaOwnsElements(AXObjectVector& owns) const { }
+ virtual void ariaDescribedbyElements(AXObjectVector&) const { }
+ virtual void ariaLabelledbyElements(AXObjectVector&) const { }
virtual bool ariaHasPopup() const { return false; }
virtual bool isEditable() const { return false; }
bool isMultiline() const;
@@ -942,7 +930,7 @@ protected:
virtual const AXObject* inheritsPresentationalRoleFrom() const { return 0; }
- bool nameFromContents() const;
+ virtual bool nameFromContents() const;
AccessibilityRole buttonRoleType() const;

Powered by Google App Engine
This is Rietveld 408576698