Index: Source/core/accessibility/AXRenderObject.cpp |
diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp |
index b66468d79180da9832394543b082c7a59fa4e3bb..1a553c8c07a4db9854734eee3c963af20276f5e2 100644 |
--- a/Source/core/accessibility/AXRenderObject.cpp |
+++ b/Source/core/accessibility/AXRenderObject.cpp |
@@ -1737,8 +1737,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() |