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

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

Issue 1039873002: AX presentation role should be inherited to its required owned elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update Created 5 years, 9 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
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.cpp ('k') | Source/modules/accessibility/AXObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXObject.h
diff --git a/Source/modules/accessibility/AXObject.h b/Source/modules/accessibility/AXObject.h
index e00d458144127ff9ad748be01800fab8dd39117a..9be9ee3b52646c04548fcd28cb7642b0045972bf 100644
--- a/Source/modules/accessibility/AXObject.h
+++ b/Source/modules/accessibility/AXObject.h
@@ -378,6 +378,7 @@ public:
virtual bool isNonNativeTextControl() const { return false; } // contenteditable or role=textbox
virtual bool isPasswordField() const { return false; }
virtual bool isPasswordFieldAndShouldHideValue() const;
+ bool isPresentational() const { return roleValue() == NoneRole || roleValue() == PresentationalRole; }
virtual bool isProgressIndicator() const { return false; }
bool isRadioButton() const { return roleValue() == RadioButtonRole; }
bool isScrollbar() const { return roleValue() == ScrollBarRole; }
@@ -621,6 +622,8 @@ public:
static const AtomicString& roleName(AccessibilityRole);
static bool isInsideFocusableElementOrARIAWidget(const Node&);
+ bool hasInheritedPresentationalRole() const { return m_cachedHasInheritedPresentationalRole; }
+
protected:
AXID m_id;
AccessibilityChildrenVector m_children;
@@ -630,6 +633,7 @@ protected:
LayoutRect m_explicitElementRect;
virtual bool computeAccessibilityIsIgnored() const { return true; }
+ virtual bool computeHasInheritedPresentationalRole() const { return false; }
// If this object itself scrolls, return its ScrollableArea.
virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; }
@@ -651,6 +655,7 @@ protected:
mutable bool m_cachedIsInertOrAriaHidden : 1;
mutable bool m_cachedIsDescendantOfBarrenParent : 1;
mutable bool m_cachedIsDescendantOfDisabledNode : 1;
+ mutable bool m_cachedHasInheritedPresentationalRole : 1;
mutable const AXObject* m_cachedLiveRegionRoot;
AXObjectCacheImpl* m_axObjectCache;
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.cpp ('k') | Source/modules/accessibility/AXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698