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