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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp

Issue 2973973002: Implement AccessibleNode.hasPopUp for Accessibility Object Model phase 1 (Closed)
Patch Set: Fix handling of aria-haspopup=false Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/accessibility/InspectorAccessibilityAgent.h" 5 #include "modules/accessibility/InspectorAccessibilityAgent.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/dom/AXObjectCache.h" 9 #include "core/dom/AXObjectCache.h"
10 #include "core/dom/DOMNodeIds.h" 10 #include "core/dom/DOMNodeIds.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 void FillWidgetProperties(AXObject& ax_object, 159 void FillWidgetProperties(AXObject& ax_object,
160 protocol::Array<AXProperty>& properties) { 160 protocol::Array<AXProperty>& properties) {
161 AccessibilityRole role = ax_object.RoleValue(); 161 AccessibilityRole role = ax_object.RoleValue();
162 String autocomplete = ax_object.AriaAutoComplete(); 162 String autocomplete = ax_object.AriaAutoComplete();
163 if (!autocomplete.IsEmpty()) 163 if (!autocomplete.IsEmpty())
164 properties.addItem( 164 properties.addItem(
165 CreateProperty(AXWidgetAttributesEnum::Autocomplete, 165 CreateProperty(AXWidgetAttributesEnum::Autocomplete,
166 CreateValue(autocomplete, AXValueTypeEnum::Token))); 166 CreateValue(autocomplete, AXValueTypeEnum::Token)));
167 167
168 if (ax_object.HasAttribute(HTMLNames::aria_haspopupAttr)) { 168 bool has_popup = ax_object.AriaHasPopup();
169 bool has_popup = ax_object.AriaHasPopup(); 169 if (has_popup || ax_object.HasAttribute(HTMLNames::aria_haspopupAttr)) {
170 properties.addItem(CreateProperty(AXWidgetAttributesEnum::Haspopup, 170 properties.addItem(CreateProperty(AXWidgetAttributesEnum::Haspopup,
171 CreateBooleanValue(has_popup))); 171 CreateBooleanValue(has_popup)));
172 } 172 }
173 173
174 int heading_level = ax_object.HeadingLevel(); 174 int heading_level = ax_object.HeadingLevel();
175 if (heading_level > 0) { 175 if (heading_level > 0) {
176 properties.addItem(CreateProperty(AXWidgetAttributesEnum::Level, 176 properties.addItem(CreateProperty(AXWidgetAttributesEnum::Level,
177 CreateValue(heading_level))); 177 CreateValue(heading_level)));
178 } 178 }
179 int hierarchical_level = ax_object.HierarchicalLevel(); 179 int hierarchical_level = ax_object.HierarchicalLevel();
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 } 714 }
715 } 715 }
716 716
717 DEFINE_TRACE(InspectorAccessibilityAgent) { 717 DEFINE_TRACE(InspectorAccessibilityAgent) {
718 visitor->Trace(page_); 718 visitor->Trace(page_);
719 visitor->Trace(dom_agent_); 719 visitor->Trace(dom_agent_);
720 InspectorBaseAgent::Trace(visitor); 720 InspectorBaseAgent::Trace(visitor);
721 } 721 }
722 722
723 } // namespace blink 723 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698