Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: Source/core/accessibility/AXRenderObject.cpp

Issue 679623002: Check whether aria-expanded attribute is defined (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add COMPILE ASSERT for new enum type Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698