| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef AccessibleNode_h | 5 #ifndef AccessibleNode_h |
| 6 #define AccessibleNode_h | 6 #define AccessibleNode_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/bindings/ScriptWrappable.h" | 9 #include "platform/bindings/ScriptWrappable.h" |
| 10 #include "platform/wtf/HashMap.h" | 10 #include "platform/wtf/HashMap.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Spec: https://wicg.github.io/aom/spec/ | 42 // Spec: https://wicg.github.io/aom/spec/ |
| 43 class CORE_EXPORT AccessibleNode | 43 class CORE_EXPORT AccessibleNode |
| 44 : public GarbageCollectedFinalized<AccessibleNode>, | 44 : public GarbageCollectedFinalized<AccessibleNode>, |
| 45 public ScriptWrappable { | 45 public ScriptWrappable { |
| 46 DEFINE_WRAPPERTYPEINFO(); | 46 DEFINE_WRAPPERTYPEINFO(); |
| 47 | 47 |
| 48 public: | 48 public: |
| 49 explicit AccessibleNode(Element*); | 49 explicit AccessibleNode(Element*); |
| 50 virtual ~AccessibleNode(); | 50 virtual ~AccessibleNode(); |
| 51 | 51 |
| 52 // Returns the given string property if the Element has an AccessibleNode. |
| 53 static const AtomicString& GetProperty(Element*, AOMStringProperty); |
| 54 |
| 52 // Returns the given string property if the Element has an AccessibleNode, | 55 // Returns the given string property if the Element has an AccessibleNode, |
| 53 // otherwise returns the equivalent ARIA attribute. | 56 // otherwise returns the equivalent ARIA attribute. |
| 54 static const AtomicString& GetProperty(Element*, AOMStringProperty); | 57 static const AtomicString& GetPropertyOrARIAAttribute(Element*, |
| 58 AOMStringProperty); |
| 55 | 59 |
| 56 AtomicString autocomplete() const; | 60 AtomicString autocomplete() const; |
| 57 void setAutocomplete(const AtomicString&); | 61 void setAutocomplete(const AtomicString&); |
| 58 | 62 |
| 59 AtomicString checked() const; | 63 AtomicString checked() const; |
| 60 void setChecked(const AtomicString&); | 64 void setChecked(const AtomicString&); |
| 61 | 65 |
| 62 AtomicString current() const; | 66 AtomicString current() const; |
| 63 void setCurrent(const AtomicString&); | 67 void setCurrent(const AtomicString&); |
| 64 | 68 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 108 |
| 105 Vector<std::pair<AOMStringProperty, AtomicString>> string_properties_; | 109 Vector<std::pair<AOMStringProperty, AtomicString>> string_properties_; |
| 106 | 110 |
| 107 // This object's owner Element. | 111 // This object's owner Element. |
| 108 Member<Element> element_; | 112 Member<Element> element_; |
| 109 }; | 113 }; |
| 110 | 114 |
| 111 } // namespace blink | 115 } // namespace blink |
| 112 | 116 |
| 113 #endif // AccessibleNode_h | 117 #endif // AccessibleNode_h |
| OLD | NEW |