| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "core/html/HTMLOptionElement.h" | 29 #include "core/html/HTMLOptionElement.h" |
| 30 #include "modules/accessibility/AXMockObject.h" | 30 #include "modules/accessibility/AXMockObject.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class AXObjectCacheImpl; | 34 class AXObjectCacheImpl; |
| 35 | 35 |
| 36 class AXMenuListOption final : public AXMockObject { | 36 class AXMenuListOption final : public AXMockObject { |
| 37 public: | 37 public: |
| 38 static PassRefPtrWillBeRawPtr<AXMenuListOption> create(HTMLOptionElement* el
ement, AXObjectCacheImpl& axObjectCache) { return adoptRefWillBeNoop(new AXMenuL
istOption(element, axObjectCache)); } | 38 static PassRefPtrWillBeRawPtr<AXMenuListOption> create(HTMLOptionElement* el
ement, AXObjectCacheImpl& axObjectCache) { return adoptRefWillBeNoop(new AXMenuL
istOption(element, axObjectCache)); } |
| 39 virtual ~AXMenuListOption(); | 39 ~AXMenuListOption() override; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 AXMenuListOption(HTMLOptionElement*, AXObjectCacheImpl&); | 42 AXMenuListOption(HTMLOptionElement*, AXObjectCacheImpl&); |
| 43 DECLARE_VIRTUAL_TRACE(); | 43 DECLARE_VIRTUAL_TRACE(); |
| 44 | 44 |
| 45 virtual bool isMenuListOption() const override { return true; } | 45 bool isMenuListOption() const override { return true; } |
| 46 | 46 |
| 47 virtual Node* node() const override { return m_element; } | 47 Node* node() const override { return m_element; } |
| 48 virtual void detach() override; | 48 void detach() override; |
| 49 virtual bool isDetached() const override { return !m_element; } | 49 bool isDetached() const override { return !m_element; } |
| 50 virtual AccessibilityRole roleValue() const override { return MenuListOption
Role; } | 50 AccessibilityRole roleValue() const override { return MenuListOptionRole; } |
| 51 virtual bool canHaveChildren() const override { return false; } | 51 bool canHaveChildren() const override { return false; } |
| 52 | 52 |
| 53 virtual Element* actionElement() const override; | 53 Element* actionElement() const override; |
| 54 virtual bool isEnabled() const override; | 54 bool isEnabled() const override; |
| 55 virtual bool isVisible() const override; | 55 bool isVisible() const override; |
| 56 virtual bool isOffScreen() const override; | 56 bool isOffScreen() const override; |
| 57 virtual bool isSelected() const override; | 57 bool isSelected() const override; |
| 58 virtual void setSelected(bool) override; | 58 void setSelected(bool) override; |
| 59 virtual bool canSetSelectedAttribute() const override; | 59 bool canSetSelectedAttribute() const override; |
| 60 virtual LayoutRect elementRect() const override; | 60 LayoutRect elementRect() const override; |
| 61 virtual String stringValue() const override; | 61 String stringValue() const override; |
| 62 virtual bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const
override; | 62 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override
; |
| 63 | 63 |
| 64 RawPtrWillBeMember<HTMLOptionElement> m_element; | 64 RawPtrWillBeMember<HTMLOptionElement> m_element; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListOption, isMenuListOption()); | 67 DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListOption, isMenuListOption()); |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| 70 | 70 |
| 71 #endif // AXMenuListOption_h | 71 #endif // AXMenuListOption_h |
| OLD | NEW |