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

Unified Diff: Source/modules/accessibility/AXMenuListOption.h

Issue 1059503002: Re-land: Don't keep recreating AXMenuListPopup (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@suppress_extra_events
Patch Set: Fix optgroup Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/accessibility/AXMenuList.cpp ('k') | Source/modules/accessibility/AXMenuListOption.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXMenuListOption.h
diff --git a/Source/modules/accessibility/AXMenuListOption.h b/Source/modules/accessibility/AXMenuListOption.h
index 73188591614a0a2c7d1f9b47ae072cbd4e4ae7f5..c2df35befa89347f27cdf92d450d5b4f2294ad17 100644
--- a/Source/modules/accessibility/AXMenuListOption.h
+++ b/Source/modules/accessibility/AXMenuListOption.h
@@ -26,24 +26,25 @@
#ifndef AXMenuListOption_h
#define AXMenuListOption_h
+#include "core/html/HTMLOptionElement.h"
#include "modules/accessibility/AXMockObject.h"
namespace blink {
class AXObjectCacheImpl;
-class HTMLElement;
class AXMenuListOption final : public AXMockObject {
public:
- static PassRefPtr<AXMenuListOption> create(AXObjectCacheImpl* axObjectCache) { return adoptRef(new AXMenuListOption(axObjectCache)); }
-
- void setElement(HTMLElement*);
+ static PassRefPtr<AXMenuListOption> create(HTMLOptionElement* element, AXObjectCacheImpl* axObjectCache) { return adoptRef(new AXMenuListOption(element, axObjectCache)); }
private:
- explicit AXMenuListOption(AXObjectCacheImpl*);
+ explicit AXMenuListOption(HTMLOptionElement*, AXObjectCacheImpl*);
virtual bool isMenuListOption() const override { return true; }
+ virtual Node* node() const override { return m_element; }
+ virtual void detach() override;
+ virtual bool isDetached() const override { return !m_element; }
virtual AccessibilityRole roleValue() const override { return MenuListOptionRole; }
virtual bool canHaveChildren() const override { return false; }
@@ -58,7 +59,7 @@ private:
virtual String stringValue() const override;
virtual bool computeAccessibilityIsIgnored() const override;
- RefPtrWillBePersistent<HTMLElement> m_element;
+ HTMLOptionElement* m_element;
};
DEFINE_AX_OBJECT_TYPE_CASTS(AXMenuListOption, isMenuListOption());
« no previous file with comments | « Source/modules/accessibility/AXMenuList.cpp ('k') | Source/modules/accessibility/AXMenuListOption.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698