Chromium Code Reviews| Index: Source/modules/accessibility/AXLayoutObject.cpp |
| diff --git a/Source/modules/accessibility/AXLayoutObject.cpp b/Source/modules/accessibility/AXLayoutObject.cpp |
| index c9fae167c7f5c373131187f1f292abadfd85b441..87f0b905a1744f9122168d3e316064200178b8f1 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 (isPresentationRole(static_cast<const AXObject*>(this))) |
|
dmazzoni
2015/03/31 16:35:23
Can you do this without the cast?
If you do need
je_julie(Not used)
2015/04/01 12:51:28
Because |this| is AXLayoutObject and parameter typ
|
| return true; |
| // An ARIA tree can only have tree items and static text as children. |
| @@ -2292,36 +2292,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; |