Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h

Issue 1899823002: Uses the activedescendant_changed event received from Blink to fire the right focus event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed menu-list-open Layout test. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 28 matching lines...) Expand all
39 39
40 public: 40 public:
41 static AXMenuListPopup* create(AXObjectCacheImpl& axObjectCache) { return ne w AXMenuListPopup(axObjectCache); } 41 static AXMenuListPopup* create(AXObjectCacheImpl& axObjectCache) { return ne w AXMenuListPopup(axObjectCache); }
42 42
43 bool isEnabled() const override; 43 bool isEnabled() const override;
44 bool isOffScreen() const override; 44 bool isOffScreen() const override;
45 45
46 void didUpdateActiveOption(int optionIndex); 46 void didUpdateActiveOption(int optionIndex);
47 void didShow(); 47 void didShow();
48 void didHide(); 48 void didHide();
49 AXObject* activeChild(); 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(); } 56 LayoutRect elementRect() const override { return LayoutRect(); }
57 AccessibilityRole roleValue() const override { return MenuListPopupRole; } 57 AccessibilityRole roleValue() const override { return MenuListPopupRole; }
58 58
59 bool isVisible() const override; 59 bool isVisible() const override;
60 bool press() const override; 60 bool press() const override;
61 void addChildren() override; 61 void addChildren() override;
62 void updateChildrenIfNecessary() override; 62 void updateChildrenIfNecessary() override;
63 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override ; 63 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override ;
64 64
65 AXMenuListOption* menuListOptionAXObject(HTMLElement*) const; 65 AXMenuListOption* menuListOptionAXObject(HTMLElement*) const;
66 int getSelectedIndex() const; 66 int getSelectedIndex() const;
67 67
68 // Note that this may be -1 if nothing is selected. 68 // Note that this may be -1 if nothing is selected.
69 int m_activeIndex; 69 int m_activeIndex;
70 }; 70 };
71 71
72 DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListPopup, isMenuListPopup()); 72 DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListPopup, isMenuListPopup());
73 73
74 } // namespace blink 74 } // namespace blink
75 75
76 #endif // AXMenuListPopup_h 76 #endif // AXMenuListPopup_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698