Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 18259016: Introduce isHTMLLabelElement and toHTMLLabelElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Took tkent's comment into consideration Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
« no previous file with comments | « Source/WebKit/chromium/src/WebLabelElement.cpp ('k') | Source/core/accessibility/AccessibilityNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698