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

Unified Diff: Source/modules/accessibility/AXTableCell.cpp

Issue 833083012: Adding isTableHeaderCell method. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 | « Source/modules/accessibility/AXTableCell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXTableCell.cpp
diff --git a/Source/modules/accessibility/AXTableCell.cpp b/Source/modules/accessibility/AXTableCell.cpp
index 3d669dfda73050cb93ec4a65eb0a6ebde28c6648..306215b4391ecc746a0e4d5c204d56c878902912 100644
--- a/Source/modules/accessibility/AXTableCell.cpp
+++ b/Source/modules/accessibility/AXTableCell.cpp
@@ -51,6 +51,11 @@ PassRefPtr<AXTableCell> AXTableCell::create(RenderObject* renderer, AXObjectCach
return adoptRef(new AXTableCell(renderer, axObjectCache));
}
+bool AXTableCell::isTableHeaderCell() const
+{
+ return node() && node()->hasTagName(thTag);
+}
+
bool AXTableCell::computeAccessibilityIsIgnored() const
{
AXObjectInclusion decision = defaultObjectInclusion();
@@ -104,8 +109,7 @@ static AccessibilityRole decideRoleFromSibling(Node* siblingNode)
AccessibilityRole AXTableCell::scanToDecideHeaderRole()
{
- Node* node = m_renderer ? m_renderer->node() : 0;
- if (!node || !node->hasTagName(thTag))
+ if (!isTableHeaderCell())
return CellRole;
// Check scope attribute first.
« no previous file with comments | « Source/modules/accessibility/AXTableCell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698