Index: Source/core/accessibility/AccessibilityRenderObject.cpp |
diff --git a/Source/core/accessibility/AccessibilityRenderObject.cpp b/Source/core/accessibility/AccessibilityRenderObject.cpp |
index bd9806d5bb3d2431cba9b7f380fbe714393c7555..2b8b25120e7ac98ada150d0b93ebfdf9262f1a8d 100644 |
--- a/Source/core/accessibility/AccessibilityRenderObject.cpp |
+++ b/Source/core/accessibility/AccessibilityRenderObject.cpp |
@@ -270,8 +270,8 @@ HTMLLabelElement* AccessibilityRenderObject::labelElementContainer() const |
// find if this has a parent that is a label |
for (Node* parentNode = m_renderer->node(); parentNode; parentNode = parentNode->parentNode()) { |
- if (parentNode->hasTagName(labelTag)) |
- return static_cast<HTMLLabelElement*>(parentNode); |
+ if (isHTMLLabelElement(parentNode)) |
+ return toHTMLLabelElement(parentNode); |
} |
return 0; |
@@ -404,7 +404,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole() |
if (node && node->hasTagName(pTag)) |
return ParagraphRole; |
- if (node && node->hasTagName(labelTag)) |
+ if (node && isHTMLLabelElement(node)) |
return LabelRole; |
if (node && node->hasTagName(divTag)) |
@@ -725,7 +725,7 @@ bool AccessibilityRenderObject::computeAccessibilityIsIgnored() const |
// don't ignore labels, because they serve as TitleUIElements |
Node* node = m_renderer->node(); |
- if (node && node->hasTagName(labelTag)) |
+ if (node && isHTMLLabelElement(node)) |
return false; |
// Anything that is content editable should not be ignored. |