Index: Source/core/accessibility/AXListBoxOption.cpp |
diff --git a/Source/core/accessibility/AXListBoxOption.cpp b/Source/core/accessibility/AXListBoxOption.cpp |
index 3708ccdab6792a24fd5c48330ba9a135a6c586ff..e8f82e75c5711379aea177184a9d48303a502bca 100644 |
--- a/Source/core/accessibility/AXListBoxOption.cpp |
+++ b/Source/core/accessibility/AXListBoxOption.cpp |
@@ -74,10 +74,7 @@ bool AXListBoxOption::isEnabled() const |
bool AXListBoxOption::isSelected() const |
{ |
- if (!m_optionElement) |
- return false; |
- |
- if (!m_optionElement->hasTagName(optionTag)) |
+ if (!isHTMLOptionElement(m_optionElement)) |
return false; |
return toHTMLOptionElement(m_optionElement)->selected(); |
@@ -152,10 +149,10 @@ String AXListBoxOption::stringValue() const |
if (!ariaLabel.isNull()) |
return ariaLabel; |
- if (m_optionElement->hasTagName(optionTag)) |
+ if (isHTMLOptionElement(*m_optionElement)) |
return toHTMLOptionElement(m_optionElement)->text(); |
- if (m_optionElement->hasTagName(optgroupTag)) |
+ if (isHTMLOptGroupElement(*m_optionElement)) |
return toHTMLOptGroupElement(m_optionElement)->groupLabelText(); |
return String(); |
@@ -198,10 +195,10 @@ HTMLSelectElement* AXListBoxOption::listBoxOptionParentNode() const |
if (!m_optionElement) |
return 0; |
- if (m_optionElement->hasTagName(optionTag)) |
+ if (isHTMLOptionElement(*m_optionElement)) |
return toHTMLOptionElement(m_optionElement)->ownerSelectElement(); |
- if (m_optionElement->hasTagName(optgroupTag)) |
+ if (isHTMLOptGroupElement(*m_optionElement)) |
return toHTMLOptGroupElement(m_optionElement)->ownerSelectElement(); |
return 0; |