| Index: Source/modules/accessibility/AXMenuListOption.cpp
|
| diff --git a/Source/modules/accessibility/AXMenuListOption.cpp b/Source/modules/accessibility/AXMenuListOption.cpp
|
| index d6ee7be4c0485cc6b70362f98e81d5e3feb2e036..3267f6b624686b738152ff1b8b706c8f39938efe 100644
|
| --- a/Source/modules/accessibility/AXMenuListOption.cpp
|
| +++ b/Source/modules/accessibility/AXMenuListOption.cpp
|
| @@ -34,27 +34,28 @@ namespace blink {
|
|
|
| using namespace HTMLNames;
|
|
|
| -AXMenuListOption::AXMenuListOption(AXObjectCacheImpl* axObjectCache)
|
| +AXMenuListOption::AXMenuListOption(HTMLOptionElement* element, AXObjectCacheImpl* axObjectCache)
|
| : AXMockObject(axObjectCache)
|
| + , m_element(element)
|
| {
|
| }
|
|
|
| -void AXMenuListOption::setElement(HTMLElement* element)
|
| +void AXMenuListOption::detach()
|
| {
|
| - ASSERT_ARG(element, isHTMLOptionElement(element));
|
| - m_element = element;
|
| + m_element = nullptr;
|
| + AXMockObject::detach();
|
| }
|
|
|
| Element* AXMenuListOption::actionElement() const
|
| {
|
| - return m_element.get();
|
| + return m_element;
|
| }
|
|
|
| bool AXMenuListOption::isEnabled() const
|
| {
|
| // isDisabledFormControl() returns true if the parent <select> element is disabled,
|
| // which we don't want.
|
| - return !toHTMLOptionElement(m_element)->ownElementDisabled();
|
| + return !m_element->ownElementDisabled();
|
| }
|
|
|
| bool AXMenuListOption::isVisible() const
|
| @@ -78,7 +79,7 @@ bool AXMenuListOption::isSelected() const
|
| AXMenuListPopup* parent = static_cast<AXMenuListPopup*>(parentObject());
|
| if (parent && !parent->isOffScreen())
|
| return parent->activeChild() == this;
|
| - return toHTMLOptionElement(m_element)->selected();
|
| + return m_element->selected();
|
| }
|
|
|
| void AXMenuListOption::setSelected(bool b)
|
| @@ -86,7 +87,7 @@ void AXMenuListOption::setSelected(bool b)
|
| if (!canSetSelectedAttribute())
|
| return;
|
|
|
| - toHTMLOptionElement(m_element)->setSelected(b);
|
| + m_element->setSelected(b);
|
| }
|
|
|
| bool AXMenuListOption::canSetSelectedAttribute() const
|
| @@ -112,7 +113,7 @@ LayoutRect AXMenuListOption::elementRect() const
|
|
|
| String AXMenuListOption::stringValue() const
|
| {
|
| - return toHTMLOptionElement(m_element)->text();
|
| + return m_element->text();
|
| }
|
|
|
| } // namespace blink
|
|
|