Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / accessibility / AXMenuList.cpp
index 97f4df3..104f309 100644 (file)
@@ -27,7 +27,7 @@
 #include "core/accessibility/AXMenuList.h"
 
 #include "core/accessibility/AXMenuListPopup.h"
-#include "core/accessibility/AXObjectCache.h"
+#include "core/accessibility/AXObjectCacheImpl.h"
 #include "core/rendering/RenderMenuList.h"
 
 namespace blink {
@@ -56,7 +56,7 @@ void AXMenuList::addChildren()
 {
     m_haveChildren = true;
 
-    AXObjectCache* cache = m_renderer->document().axObjectCache();
+    AXObjectCacheImpl* cache = toAXObjectCacheImpl(m_renderer->document().axObjectCache());
 
     AXObject* list = cache->getOrCreate(MenuListPopupRole);
     if (!list)
@@ -87,6 +87,14 @@ bool AXMenuList::isCollapsed() const
     return !toRenderMenuList(m_renderer)->popupIsVisible();
 }
 
+AccessibilityExpanded AXMenuList::isExpanded() const
+{
+    if (isCollapsed())
+        return ExpandedCollapsed;
+
+    return ExpandedExpanded;
+}
+
 bool AXMenuList::canSetFocusAttribute() const
 {
     if (!node())
@@ -98,7 +106,7 @@ bool AXMenuList::canSetFocusAttribute() const
 void AXMenuList::didUpdateActiveOption(int optionIndex)
 {
     RefPtrWillBeRawPtr<Document> document(m_renderer->document());
-    AXObjectCache* cache = document->axObjectCache();
+    AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache());
 
     const AccessibilityChildrenVector& childObjects = children();
     if (!childObjects.isEmpty()) {
@@ -111,7 +119,7 @@ void AXMenuList::didUpdateActiveOption(int optionIndex)
         }
     }
 
-    cache->postNotification(this, document.get(), AXObjectCache::AXMenuListValueChanged, true, PostSynchronously);
+    cache->postNotification(this, document.get(), AXObjectCacheImpl::AXMenuListValueChanged, true);
 }
 
 } // namespace blink