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

Unified Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 837183002: Add a helper function and update test results with ax role of table header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a helper function for ax table header 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
Index: content/browser/accessibility/browser_accessibility_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index 6a8acff439efb846c5c732713531aaf0cabda945..29b4b7b54959596fd02bbce61b63a320887a7eb9 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -2864,8 +2864,9 @@ HRESULT WINAPI BrowserAccessibilityWin::InternalQueryInterface(
const _ATL_INTMAP_ENTRY* entries,
REFIID iid,
void** object) {
- int32 ia_role =
- reinterpret_cast<BrowserAccessibilityWin*>(this_ptr)->ia_role_;
+ BrowserAccessibilityWin* accessibility =
+ reinterpret_cast<BrowserAccessibilityWin*>(this_ptr);
+ int32 ia_role = accessibility->ia_role_;
if (iid == IID_IAccessibleImage) {
if (ia_role != ROLE_SYSTEM_GRAPHIC) {
*object = NULL;
@@ -2877,7 +2878,7 @@ HRESULT WINAPI BrowserAccessibilityWin::InternalQueryInterface(
return E_NOINTERFACE;
}
} else if (iid == IID_IAccessibleTableCell) {
- if (ia_role != ROLE_SYSTEM_CELL) {
+ if (!accessibility->IsCellOrTableHeaderRole()) {
*object = NULL;
return E_NOINTERFACE;
}
@@ -2963,7 +2964,7 @@ void BrowserAccessibilityWin::OnDataChanged() {
}
// Expose table cell index.
- if (ia_role_ == ROLE_SYSTEM_CELL) {
+ if (IsCellOrTableHeaderRole()) {
BrowserAccessibility* table = GetParent();
while (table && table->GetRole() != ui::AX_ROLE_TABLE)
table = table->GetParent();

Powered by Google App Engine
This is Rietveld 408576698