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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 return new AXMenuListPopup(axObjectCache); | 42 return new AXMenuListPopup(axObjectCache); |
43 } | 43 } |
44 | 44 |
45 bool isEnabled() const override; | 45 bool isEnabled() const override; |
46 bool isOffScreen() const override; | 46 bool isOffScreen() const override; |
47 | 47 |
48 void didUpdateActiveOption(int optionIndex); | 48 void didUpdateActiveOption(int optionIndex); |
49 void didShow(); | 49 void didShow(); |
50 void didHide(); | 50 void didHide(); |
51 AXObject* activeDescendant() final; | 51 AXObject* activeDescendant() final; |
| 52 void updateChildrenIfNecessary() override; |
52 | 53 |
53 private: | 54 private: |
54 explicit AXMenuListPopup(AXObjectCacheImpl&); | 55 explicit AXMenuListPopup(AXObjectCacheImpl&); |
55 | 56 |
56 bool isMenuListPopup() const override { return true; } | 57 bool isMenuListPopup() const override { return true; } |
57 | 58 |
58 AccessibilityRole roleValue() const override { return MenuListPopupRole; } | 59 AccessibilityRole roleValue() const override { return MenuListPopupRole; } |
59 | 60 |
60 bool isVisible() const override; | 61 bool isVisible() const override; |
61 bool press() const override; | 62 bool press() const override; |
62 void addChildren() override; | 63 void addChildren() override; |
63 void updateChildrenIfNecessary() override; | |
64 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override; | 64 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override; |
65 | 65 |
66 AXMenuListOption* menuListOptionAXObject(HTMLElement*) const; | 66 AXMenuListOption* menuListOptionAXObject(HTMLElement*) const; |
67 int getSelectedIndex() const; | 67 int getSelectedIndex() const; |
68 | 68 |
69 // Note that this may be -1 if nothing is selected. | 69 // Note that this may be -1 if nothing is selected. |
70 int m_activeIndex; | 70 int m_activeIndex; |
71 }; | 71 }; |
72 | 72 |
73 DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListPopup, isMenuListPopup()); | 73 DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListPopup, isMenuListPopup()); |
74 | 74 |
75 } // namespace blink | 75 } // namespace blink |
76 | 76 |
77 #endif // AXMenuListPopup_h | 77 #endif // AXMenuListPopup_h |
OLD | NEW |