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

Unified Diff: Source/core/accessibility/AXList.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
« no previous file with comments | « no previous file | Source/core/accessibility/AXListBox.cpp » ('j') | Source/core/accessibility/AXNodeObject.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXList.cpp
diff --git a/Source/core/accessibility/AXList.cpp b/Source/core/accessibility/AXList.cpp
index c1cbe2764de8c7558bec3f3a90f94c2aa5620e72..3015a1ab319f4e3ef2481e33fa117e3e611d1b94 100644
--- a/Source/core/accessibility/AXList.cpp
+++ b/Source/core/accessibility/AXList.cpp
@@ -29,6 +29,7 @@
#include "config.h"
#include "core/accessibility/AXList.h"
+#include "core/html/HTMLUListElement.h"
#include "core/rendering/RenderObject.h"
using namespace std;
@@ -61,15 +62,13 @@ bool AXList::isUnorderedList() const
if (!m_renderer)
return false;
- Node* node = m_renderer->node();
-
// The ARIA spec says the "list" role is supposed to mimic a UL or OL tag.
// Since it can't be both, it's probably OK to say that it's an un-ordered list.
// On the Mac, there's no distinction to the client.
if (ariaRoleAttribute() == ListRole)
return true;
- return node && node->hasTagName(ulTag);
+ return isHTMLUListElement(m_renderer->node());
}
bool AXList::isOrderedList() const
@@ -81,8 +80,7 @@ bool AXList::isOrderedList() const
if (ariaRoleAttribute() == DirectoryRole)
return true;
- Node* node = m_renderer->node();
- return node && node->hasTagName(olTag);
+ return isHTMLOListElement(m_renderer->node());
}
bool AXList::isDescriptionList() const
@@ -90,8 +88,7 @@ bool AXList::isDescriptionList() const
if (!m_renderer)
return false;
- Node* node = m_renderer->node();
- return node && node->hasTagName(dlTag);
+ return isHTMLDListElement(m_renderer->node());
}
« no previous file with comments | « no previous file | Source/core/accessibility/AXListBox.cpp » ('j') | Source/core/accessibility/AXNodeObject.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698