Index: Source/core/accessibility/AXRenderObject.cpp |
diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp |
index c574940282fc8a428323b6aced50eb707cdb4953..13e7424de97ae56866d1c531ead7497973014032 100644 |
--- a/Source/core/accessibility/AXRenderObject.cpp |
+++ b/Source/core/accessibility/AXRenderObject.cpp |
@@ -1739,8 +1739,17 @@ void AXRenderObject::handleAriaExpandedChanged() |
axObjectCache()->postNotification(containerParent, document(), AXObjectCacheImpl::AXRowCountChanged, true); |
// Post that the specific row either collapsed or expanded. |
- if (roleValue() == RowRole || roleValue() == TreeItemRole) |
- axObjectCache()->postNotification(this, document(), isExpanded() ? AXObjectCacheImpl::AXRowExpanded : AXObjectCacheImpl::AXRowCollapsed, true); |
+ AccessibilityExpanded expanded = isExpanded(); |
+ if (!expanded) |
+ return; |
+ |
+ if (roleValue() == RowRole || roleValue() == TreeItemRole) { |
+ AXObjectCacheImpl::AXNotification notification = AXObjectCacheImpl::AXRowExpanded; |
+ if (expanded == ExpandedCollapsed) |
+ notification = AXObjectCacheImpl::AXRowCollapsed; |
+ |
+ axObjectCache()->postNotification(this, document(), notification, true); |
+ } |
} |
void AXRenderObject::textChanged() |