Index: Source/core/accessibility/AXObjectCache.cpp |
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp |
index dfec8eb35fc1ef3983ce56deb5090c5b1993846f..3debe18072b80d7dc13c00e1c4e3cb68cc9e020b 100644 |
--- a/Source/core/accessibility/AXObjectCache.cpp |
+++ b/Source/core/accessibility/AXObjectCache.cpp |
@@ -791,7 +791,7 @@ void AXObjectCache::handleAttributeChanged(const QualifiedName& attrName, Elemen |
handleAriaRoleChanged(element); |
else if (attrName == altAttr || attrName == titleAttr) |
textChanged(element); |
- else if (attrName == forAttr && element->hasTagName(labelTag)) |
+ else if (attrName == forAttr && isHTMLLabelElement(element)) |
labelChanged(element); |
if (!attrName.localName().string().startsWith("aria-")) |
@@ -819,9 +819,7 @@ void AXObjectCache::handleAttributeChanged(const QualifiedName& attrName, Elemen |
void AXObjectCache::labelChanged(Element* element) |
{ |
- ASSERT(element->hasTagName(labelTag)); |
- HTMLElement* correspondingControl = static_cast<HTMLLabelElement*>(element)->control(); |
- textChanged(correspondingControl); |
+ textChanged(toHTMLLabelElement(element)->control()); |
} |
void AXObjectCache::recomputeIsIgnored(RenderObject* renderer) |