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

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

Issue 2088453002: Implement the inert attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update generic test expectations Created 3 years, 7 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
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 "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/dom/AXObjectCache.h" 8 #include "core/dom/AXObjectCache.h"
9 #include "core/dom/DOMNodeIds.h" 9 #include "core/dom/DOMNodeIds.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 child_ids->addItem(String::Number(inspected_ax_object->AxObjectID())); 716 child_ids->addItem(String::Number(inspected_ax_object->AxObjectID()));
717 return; 717 return;
718 } 718 }
719 719
720 const AXObject::AXObjectVector& children = ax_object.Children(); 720 const AXObject::AXObjectVector& children = ax_object.Children();
721 for (unsigned i = 0; i < children.size(); i++) { 721 for (unsigned i = 0; i < children.size(); i++) {
722 AXObject& child_ax_object = *children[i].Get(); 722 AXObject& child_ax_object = *children[i].Get();
723 child_ids->addItem(String::Number(child_ax_object.AxObjectID())); 723 child_ids->addItem(String::Number(child_ax_object.AxObjectID()));
724 if (&child_ax_object == inspected_ax_object) 724 if (&child_ax_object == inspected_ax_object)
725 continue; 725 continue;
726 if (&ax_object != inspected_ax_object && 726 if (&ax_object != inspected_ax_object) {
727 (ax_object.GetNode() || 727 if (!inspected_ax_object)
728 ax_object.ParentObjectUnignored() != inspected_ax_object)) { 728 continue;
729 continue; 729 if (&ax_object != inspected_ax_object->ParentObjectUnignored())
730 continue;
730 } 731 }
731 732
732 // Only add children of inspected node (or un-inspectable children of 733 // Only add children of inspected node (or un-inspectable children of
733 // inspected node) to returned nodes. 734 // inspected node) to returned nodes.
734 std::unique_ptr<AXNode> child_node = BuildProtocolAXObject( 735 std::unique_ptr<AXNode> child_node = BuildProtocolAXObject(
735 child_ax_object, inspected_ax_object, true, nodes, cache); 736 child_ax_object, inspected_ax_object, true, nodes, cache);
736 nodes->addItem(std::move(child_node)); 737 nodes->addItem(std::move(child_node));
737 } 738 }
738 } 739 }
739 740
740 DEFINE_TRACE(InspectorAccessibilityAgent) { 741 DEFINE_TRACE(InspectorAccessibilityAgent) {
741 visitor->Trace(page_); 742 visitor->Trace(page_);
742 visitor->Trace(dom_agent_); 743 visitor->Trace(dom_agent_);
743 InspectorBaseAgent::Trace(visitor); 744 InspectorBaseAgent::Trace(visitor);
744 } 745 }
745 746
746 } // namespace blink 747 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698