AX: aria-hidden on container does not hide descendant popup buttons
[WebKit-https.git] / Source / WebCore / accessibility / AccessibilityMenuList.cpp
index baec7d0..05a5632 100644 (file)
@@ -37,6 +37,11 @@ AccessibilityMenuList::AccessibilityMenuList(RenderMenuList* renderer)
 {
 }
 
+PassRefPtr<AccessibilityMenuList> AccessibilityMenuList::create(RenderMenuList* renderer)
+{
+    return adoptRef(new AccessibilityMenuList(renderer));
+}
+
 bool AccessibilityMenuList::press() const
 {
     RenderMenuList* menuList = static_cast<RenderMenuList*>(m_renderer);
@@ -57,12 +62,12 @@ void AccessibilityMenuList::addChildren()
     if (!list)
         return;
 
-    if (list->accessibilityPlatformIncludesObject() == IgnoreObject) {
+    static_cast<AccessibilityMockObject*>(list)->setParent(this);
+    if (list->accessibilityIsIgnored()) {
         cache->remove(list->axObjectID());
         return;
     }
 
-    static_cast<AccessibilityMockObject*>(list)->setParent(this);
     m_children.append(list);
 
     list->addChildren();
@@ -87,7 +92,7 @@ bool AccessibilityMenuList::canSetFocusAttribute() const
     if (!node())
         return false;
 
-    return static_cast<Element*>(node())->isEnabledFormControl();
+    return toElement(node())->isEnabledFormControl();
 }
 
 void AccessibilityMenuList::didUpdateActiveOption(int optionIndex)