jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 Apple Inc. All Rights Reserved. |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
commit-queue@webkit.org | d862d77 | 2016-10-31 22:07:53 +0000 | [diff] [blame] | 26 | #pragma once |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 27 | |
cfleizach@apple.com | f0e3a9a | 2011-10-07 19:12:59 +0000 | [diff] [blame] | 28 | #include "AccessibilityMockObject.h" |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 29 | |
| 30 | namespace WebCore { |
| 31 | |
| 32 | class AccessibilityMenuList; |
| 33 | class AccessibilityMenuListOption; |
| 34 | class HTMLElement; |
| 35 | |
cdumez@apple.com | b6fc847 | 2014-10-28 22:42:37 +0000 | [diff] [blame] | 36 | class AccessibilityMenuListPopup final : public AccessibilityMockObject { |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 37 | public: |
akling@apple.com | ad2beb5 | 2014-12-25 07:50:20 +0000 | [diff] [blame] | 38 | static Ref<AccessibilityMenuListPopup> create() { return adoptRef(*new AccessibilityMenuListPopup); } |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 39 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 40 | bool isEnabled() const override; |
| 41 | bool isOffScreen() const override; |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 42 | |
jhoneycutt@apple.com | a461af4 | 2011-07-18 23:16:31 +0000 | [diff] [blame] | 43 | void didUpdateActiveOption(int optionIndex); |
| 44 | |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 45 | private: |
| 46 | AccessibilityMenuListPopup(); |
| 47 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 48 | bool isMenuListPopup() const override { return true; } |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 49 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 50 | LayoutRect elementRect() const override { return LayoutRect(); } |
| 51 | AccessibilityRole roleValue() const override { return MenuListPopupRole; } |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 52 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 53 | bool isVisible() const override; |
| 54 | bool press() override; |
| 55 | void addChildren() override; |
| 56 | void childrenChanged() override; |
| 57 | bool computeAccessibilityIsIgnored() const override; |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 58 | |
| 59 | AccessibilityMenuListOption* menuListOptionAccessibilityObject(HTMLElement*) const; |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 60 | }; |
| 61 | |
jhoneycutt@apple.com | c344ece | 2010-01-20 01:43:26 +0000 | [diff] [blame] | 62 | } // namespace WebCore |
| 63 | |
cdumez@apple.com | 234cbdc | 2014-10-20 19:08:40 +0000 | [diff] [blame] | 64 | SPECIALIZE_TYPE_TRAITS_ACCESSIBILITY(AccessibilityMenuListPopup, isMenuListPopup()) |