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

Unified Diff: content/renderer/accessibility/blink_ax_enum_conversion.cc

Issue 665843002: Change condition for adding AX_STATE_EXPANDED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove AXExpanded 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
Index: content/renderer/accessibility/blink_ax_enum_conversion.cc
diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.cc b/content/renderer/accessibility/blink_ax_enum_conversion.cc
index f3a159d02ae34a93f1d9f0ecd39cd3af7ef5bcac..5e75b999523f68fe5b190fb5f1ca50134fefa85e 100644
--- a/content/renderer/accessibility/blink_ax_enum_conversion.cc
+++ b/content/renderer/accessibility/blink_ax_enum_conversion.cc
@@ -13,8 +13,13 @@ uint32 AXStateFromBlink(const blink::WebAXObject& o) {
if (o.isChecked())
state |= (1 << ui::AX_STATE_CHECKED);
- if (o.isCollapsed())
- state |= (1 << ui::AX_STATE_COLLAPSED);
+ blink::WebAXExpanded expanded = o.isExpanded();
+ if (expanded) {
+ if (expanded == blink::WebAXExpandedCollapsed)
+ state |= (1 << ui::AX_STATE_COLLAPSED);
+ else if (expanded == blink::WebAXExpandedExpanded)
+ state |= (1 << ui::AX_STATE_EXPANDED);
+ }
if (o.canSetFocusAttribute())
state |= (1 << ui::AX_STATE_FOCUSABLE);
@@ -23,11 +28,8 @@ uint32 AXStateFromBlink(const blink::WebAXObject& o) {
state |= (1 << ui::AX_STATE_FOCUSED);
if (o.role() == blink::WebAXRolePopUpButton ||
- o.ariaHasPopup()) {
+ o.ariaHasPopup())
state |= (1 << ui::AX_STATE_HASPOPUP);
- if (!o.isCollapsed())
- state |= (1 << ui::AX_STATE_EXPANDED);
- }
if (o.isHovered())
state |= (1 << ui::AX_STATE_HOVERED);

Powered by Google App Engine
This is Rietveld 408576698