| Index: Source/modules/accessibility/AXMenuListOption.cpp
|
| diff --git a/Source/modules/accessibility/AXMenuListOption.cpp b/Source/modules/accessibility/AXMenuListOption.cpp
|
| index 458c0f0457dcef12c00715c38940ed6b21e3665e..79719176bce054e53adce5ae3b258d8ba4220fe1 100644
|
| --- a/Source/modules/accessibility/AXMenuListOption.cpp
|
| +++ b/Source/modules/accessibility/AXMenuListOption.cpp
|
| @@ -54,7 +54,7 @@ bool AXMenuListOption::isEnabled() const
|
| {
|
| // isDisabledFormControl() returns true if the parent <select> element is disabled,
|
| // which we don't want.
|
| - return !m_element->ownElementDisabled();
|
| + return m_element && !m_element->ownElementDisabled();
|
| }
|
|
|
| bool AXMenuListOption::isVisible() const
|
| @@ -78,12 +78,12 @@ bool AXMenuListOption::isSelected() const
|
| AXMenuListPopup* parent = static_cast<AXMenuListPopup*>(parentObject());
|
| if (parent && !parent->isOffScreen())
|
| return parent->activeChild() == this;
|
| - return m_element->selected();
|
| + return m_element && m_element->selected();
|
| }
|
|
|
| void AXMenuListOption::setSelected(bool b)
|
| {
|
| - if (!canSetSelectedAttribute())
|
| + if (!m_element || !canSetSelectedAttribute())
|
| return;
|
|
|
| m_element->setSelected(b);
|
| @@ -112,7 +112,13 @@ LayoutRect AXMenuListOption::elementRect() const
|
|
|
| String AXMenuListOption::stringValue() const
|
| {
|
| - return m_element->text();
|
| + return m_element ? m_element->text() : String();
|
| +}
|
| +
|
| +DEFINE_TRACE(AXMenuListOption)
|
| +{
|
| + visitor->trace(m_element);
|
| + AXMockObject::trace(visitor);
|
| }
|
|
|
| } // namespace blink
|
|
|