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

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

Issue 2962453002: Move AX Role predicates into ax_role_properties.h. (Closed)
Patch Set: Android Created 3 years, 6 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_com_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_com_win.cc b/content/browser/accessibility/browser_accessibility_com_win.cc
index 8ec9e981b9f157a48844fd71d957dab25cbeaf93..ed45e17cd6a627bc3de6c2133a4a9d8962cde4e5 100644
--- a/content/browser/accessibility/browser_accessibility_com_win.cc
+++ b/content/browser/accessibility/browser_accessibility_com_win.cc
@@ -27,6 +27,7 @@
#include "content/common/accessibility_mode.h"
#include "content/public/common/content_client.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/accessibility/ax_role_properties.h"
#include "ui/accessibility/ax_text_utils.h"
#include "ui/base/win/accessibility_ids_win.h"
#include "ui/base/win/accessibility_misc_utils.h"
@@ -3495,7 +3496,7 @@ HRESULT WINAPI BrowserAccessibilityComWin::InternalQueryInterface(
return E_NOINTERFACE;
}
} else if (iid == IID_IAccessibleTableCell) {
- if (!accessibility->owner()->IsCellOrTableHeaderRole()) {
+ if (!ui::IsCellOrTableHeaderRole(accessibility->owner()->GetRole())) {
*object = NULL;
return E_NOINTERFACE;
}
@@ -3710,9 +3711,9 @@ void BrowserAccessibilityComWin::UpdateStep1ComputeWinAttributes() {
}
// Expose table cell index.
- if (owner()->IsCellOrTableHeaderRole()) {
+ if (ui::IsCellOrTableHeaderRole(owner()->GetRole())) {
BrowserAccessibility* table = owner()->PlatformGetParent();
- while (table && !table->IsTableLikeRole())
+ while (table && !ui::IsTableLikeRole(table->GetRole()))
table = table->PlatformGetParent();
if (table) {
const std::vector<int32_t>& unique_cell_ids =
@@ -3727,13 +3728,13 @@ void BrowserAccessibilityComWin::UpdateStep1ComputeWinAttributes() {
}
// Expose aria-colcount and aria-rowcount in a table, grid or treegrid.
- if (owner()->IsTableLikeRole()) {
+ if (ui::IsTableLikeRole(owner()->GetRole())) {
IntAttributeToIA2(ui::AX_ATTR_ARIA_COLUMN_COUNT, "colcount");
IntAttributeToIA2(ui::AX_ATTR_ARIA_ROW_COUNT, "rowcount");
}
// Expose aria-colindex and aria-rowindex in a cell or row.
- if (owner()->IsCellOrTableHeaderRole() ||
+ if (ui::IsCellOrTableHeaderRole(owner()->GetRole()) ||
owner()->GetRole() == ui::AX_ROLE_ROW) {
if (owner()->GetRole() != ui::AX_ROLE_ROW)
IntAttributeToIA2(ui::AX_ATTR_ARIA_CELL_COLUMN_INDEX, "colindex");
@@ -4923,7 +4924,7 @@ void BrowserAccessibilityComWin::RemoveTargetFromRelation(
}
void BrowserAccessibilityComWin::UpdateRequiredAttributes() {
- if (owner()->IsCellOrTableHeaderRole()) {
+ if (ui::IsCellOrTableHeaderRole(owner()->GetRole())) {
// Expose colspan attribute.
base::string16 colspan;
if (owner()->GetHtmlAttribute("aria-colspan", &colspan)) {

Powered by Google App Engine
This is Rietveld 408576698