| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "core/html/HTMLElement.h" | 32 #include "core/html/HTMLElement.h" |
| 33 #include "modules/accessibility/AXLayoutObject.h" | 33 #include "modules/accessibility/AXLayoutObject.h" |
| 34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class AXObjectCacheImpl; | 38 class AXObjectCacheImpl; |
| 39 class HTMLSelectElement; | 39 class HTMLSelectElement; |
| 40 | 40 |
| 41 class AXListBoxOption final : public AXLayoutObject { | 41 class AXListBoxOption final : public AXLayoutObject { |
| 42 WTF_MAKE_NONCOPYABLE(AXListBoxOption); |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 AXListBoxOption(LayoutObject*, AXObjectCacheImpl&); | 45 AXListBoxOption(LayoutObject*, AXObjectCacheImpl&); |
| 45 | 46 |
| 46 public: | 47 public: |
| 47 static AXListBoxOption* create(LayoutObject*, AXObjectCacheImpl&); | 48 static AXListBoxOption* create(LayoutObject*, AXObjectCacheImpl&); |
| 48 ~AXListBoxOption() override; | 49 ~AXListBoxOption() override; |
| 49 | 50 |
| 50 bool isAXListBoxOption() const override { return true; } | 51 bool isAXListBoxOption() const override { return true; } |
| 51 AccessibilityRole determineAccessibilityRole() final; | 52 AccessibilityRole determineAccessibilityRole() final; |
| 52 bool isSelected() const override; | 53 bool isSelected() const override; |
| 53 bool isEnabled() const override; | 54 bool isEnabled() const override; |
| 54 bool isSelectedOptionActive() const override; | 55 bool isSelectedOptionActive() const override; |
| 55 void setSelected(bool) override; | 56 void setSelected(bool) override; |
| 56 bool canSetSelectedAttribute() const override; | 57 bool canSetSelectedAttribute() const override; |
| 57 String textAlternative(bool recursive, bool inAriaLabelledByTraversal, AXObj
ectSet& visited, AXNameFrom&, AXRelatedObjectVector*, NameSources*) const overri
de; | 58 String textAlternative(bool recursive, bool inAriaLabelledByTraversal, AXObj
ectSet& visited, AXNameFrom&, AXRelatedObjectVector*, NameSources*) const overri
de; |
| 58 | 59 |
| 59 private: | 60 private: |
| 60 bool canHaveChildren() const override { return false; } | 61 bool canHaveChildren() const override { return false; } |
| 61 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override
; | 62 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override
; |
| 62 | 63 |
| 63 HTMLSelectElement* listBoxOptionParentNode() const; | 64 HTMLSelectElement* listBoxOptionParentNode() const; |
| 64 int listBoxOptionIndex() const; | 65 int listBoxOptionIndex() const; |
| 65 bool isParentPresentationalRole() const; | 66 bool isParentPresentationalRole() const; |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace blink | 69 } // namespace blink |
| 69 | 70 |
| 70 #endif // AXListBoxOption_h | 71 #endif // AXListBoxOption_h |
| OLD | NEW |