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

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

Issue 192413002: Use new is*Element() helper functions in accessibility code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 4d93f0b5a48c8042300d36384037b5aa585d5a29..132e04d673b9770d96c46bcf0aced2f799beaa33 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -271,7 +271,7 @@ static PassRefPtr<AXObject> createFromRenderer(RenderObject* renderer)
// If the node is aria role="list" or the aria role is empty and its a
// ul/ol/dl type (it shouldn't be a list if aria says otherwise).
if (node && ((nodeHasRole(node, "list") || nodeHasRole(node, "directory"))
- || (nodeHasRole(node, nullAtom) && (node->hasTagName(ulTag) || node->hasTagName(olTag) || node->hasTagName(dlTag)))))
+ || (nodeHasRole(node, nullAtom) && (isHTMLUListElement(*node) || isHTMLOListElement(*node) || isHTMLDListElement(*node)))))
return AXList::create(renderer);
// aria tables
@@ -831,7 +831,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-"))
@@ -920,7 +920,7 @@ void AXObjectCache::textMarkerDataForVisiblePosition(TextMarkerData& textMarkerD
if (!domNode)
return;
- if (domNode->hasTagName(inputTag) && toHTMLInputElement(domNode)->isPasswordField())
+ if (isHTMLInputElement(*domNode) && toHTMLInputElement(*domNode).isPasswordField())
return;
// find or create an accessibility object for this node

Powered by Google App Engine
This is Rietveld 408576698