| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/InspectorTypeBuilderHelper.h" | 5 #include "modules/accessibility/InspectorTypeBuilderHelper.h" |
| 6 | 6 |
| 7 #include "core/dom/DOMNodeIds.h" | 7 #include "core/dom/DOMNodeIds.h" |
| 8 #include "modules/accessibility/AXObject.h" | 8 #include "modules/accessibility/AXObject.h" |
| 9 #include "modules/accessibility/AXObjectCacheImpl.h" | 9 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 using namespace HTMLNames; | 13 using namespace HTMLNames; |
| 14 using namespace protocol::Accessibility; | 14 using namespace protocol::Accessibility; |
| 15 | 15 |
| 16 std::unique_ptr<AXProperty> createProperty(const String& name, | 16 std::unique_ptr<AXProperty> createProperty(const String& name, |
| 17 std::unique_ptr<AXValue> value) { | 17 std::unique_ptr<AXValue> value) { |
| 18 return AXProperty::create().setName(name).setValue(std::move(value)).build(); | 18 return AXProperty::create().setName(name).setValue(std::move(value)).build(); |
| 19 } | 19 } |
| 20 | 20 |
| 21 String ignoredReasonName(AXIgnoredReason reason) { | 21 String ignoredReasonName(AXIgnoredReason reason) { |
| 22 switch (reason) { | 22 switch (reason) { |
| 23 case AXActiveModalDialog: | 23 case AXActiveModalDialog: |
| 24 return "activeModalDialog"; | 24 return "activeModalDialog"; |
| 25 case AXAncestorDisallowsChild: | 25 case AXAncestorDisallowsChild: |
| 26 return "ancestorDisallowsChild"; | 26 return "ancestorDisallowsChild"; |
| 27 case AXAncestorIsLeafNode: | 27 case AXAncestorIsLeafNode: |
| 28 return "ancestorIsLeafNode"; | 28 return "ancestorIsLeafNode"; |
| 29 case AXAriaHidden: | 29 case AXAriaHiddenElement: |
| 30 return "ariaHidden"; | 30 return "ariaHiddenElement"; |
| 31 case AXAriaHiddenRoot: | 31 case AXAriaHiddenSubtree: |
| 32 return "ariaHiddenRoot"; | 32 return "ariaHiddenSubtree"; |
| 33 case AXEmptyAlt: | 33 case AXEmptyAlt: |
| 34 return "emptyAlt"; | 34 return "emptyAlt"; |
| 35 case AXEmptyText: | 35 case AXEmptyText: |
| 36 return "emptyText"; | 36 return "emptyText"; |
| 37 case AXInert: | 37 case AXInertElement: |
| 38 return "inert"; | 38 return "inertElement"; |
| 39 case AXInertSubtree: |
| 40 return "inertSubtree"; |
| 39 case AXInheritsPresentation: | 41 case AXInheritsPresentation: |
| 40 return "inheritsPresentation"; | 42 return "inheritsPresentation"; |
| 41 case AXLabelContainer: | 43 case AXLabelContainer: |
| 42 return "labelContainer"; | 44 return "labelContainer"; |
| 43 case AXLabelFor: | 45 case AXLabelFor: |
| 44 return "labelFor"; | 46 return "labelFor"; |
| 45 case AXNotRendered: | 47 case AXNotRendered: |
| 46 return "notRendered"; | 48 return "notRendered"; |
| 47 case AXNotVisible: | 49 case AXNotVisible: |
| 48 return "notVisible"; | 50 return "notVisible"; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 if (nameSource.superseded) | 236 if (nameSource.superseded) |
| 235 valueSource->setSuperseded(true); | 237 valueSource->setSuperseded(true); |
| 236 if (nameSource.invalid) | 238 if (nameSource.invalid) |
| 237 valueSource->setInvalid(true); | 239 valueSource->setInvalid(true); |
| 238 if (nameSource.nativeSource != AXTextFromNativeHTMLUninitialized) | 240 if (nameSource.nativeSource != AXTextFromNativeHTMLUninitialized) |
| 239 valueSource->setNativeSource(nativeSourceType(nameSource.nativeSource)); | 241 valueSource->setNativeSource(nativeSourceType(nameSource.nativeSource)); |
| 240 return valueSource; | 242 return valueSource; |
| 241 } | 243 } |
| 242 | 244 |
| 243 } // namespace blink | 245 } // namespace blink |
| OLD | NEW |