Index: Source/modules/accessibility/AXLayoutObject.cpp |
diff --git a/Source/modules/accessibility/AXLayoutObject.cpp b/Source/modules/accessibility/AXLayoutObject.cpp |
index d963361898e1725889e596975126929f162ba82e..f0f763bb6ba5b9e46954ec27ee96f112de5db6bd 100644 |
--- a/Source/modules/accessibility/AXLayoutObject.cpp |
+++ b/Source/modules/accessibility/AXLayoutObject.cpp |
@@ -563,7 +563,7 @@ bool AXLayoutObject::computeAccessibilityIsIgnored() const |
if (roleValue() == IgnoredRole) |
return true; |
- if ((roleValue() == NoneRole || roleValue() == PresentationalRole) || inheritsPresentationalRole()) |
+ if (hasInheritedPresentationalRole()) |
return true; |
// An ARIA tree can only have tree items and static text as children. |
@@ -2293,36 +2293,6 @@ bool AXLayoutObject::elementAttributeValue(const QualifiedName& attributeName) c |
return equalIgnoringCase(getAttribute(attributeName), "true"); |
} |
-bool AXLayoutObject::inheritsPresentationalRole() const |
-{ |
- // ARIA states if an item can get focus, it should not be presentational. |
- if (canSetFocusAttribute()) |
- return false; |
- |
- // ARIA spec says that when a parent object is presentational, and it has required child elements, |
- // those child elements are also presentational. For example, <li> becomes presentational from <ul>. |
- // http://www.w3.org/WAI/PF/aria/complete#presentation |
- if (roleValue() != ListItemRole && roleValue() != ListMarkerRole) |
- return false; |
- |
- AXObject* parent = parentObject(); |
- if (!parent->isAXLayoutObject()) |
- return false; |
- |
- Node* elementNode = toAXLayoutObject(parent)->node(); |
- if (!elementNode || !elementNode->isElementNode()) |
- return false; |
- |
- QualifiedName tagName = toElement(elementNode)->tagQName(); |
- if (tagName != ulTag && tagName != olTag && tagName != dlTag) |
- return false; |
- |
- if (parent->roleValue() == NoneRole || parent->roleValue() == PresentationalRole) |
- return ariaRoleAttribute() == UnknownRole; |
- |
- return false; |
-} |
- |
LayoutRect AXLayoutObject::computeElementRect() const |
{ |
LayoutObject* obj = m_layoutObject; |