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

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 2607113003: Implement 5 ARIA 1.1 roles: cell, feed, figure, table, term (Closed)
Patch Set: Fix blink to Chrome enum mapping Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/accessibility/browser_accessibility_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include <UIAutomationClient.h> 7 #include <UIAutomationClient.h>
8 #include <UIAutomationCoreApi.h> 8 #include <UIAutomationCoreApi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 5331 matching lines...) Expand 10 before | Expand all | Expand 10 after
5342 ia2_role = IA2_ROLE_EMBEDDED_OBJECT; 5342 ia2_role = IA2_ROLE_EMBEDDED_OBJECT;
5343 } 5343 }
5344 break; 5344 break;
5345 case ui::AX_ROLE_FIGCAPTION: 5345 case ui::AX_ROLE_FIGCAPTION:
5346 role_name = html_tag; 5346 role_name = html_tag;
5347 ia2_role = IA2_ROLE_CAPTION; 5347 ia2_role = IA2_ROLE_CAPTION;
5348 break; 5348 break;
5349 case ui::AX_ROLE_FIGURE: 5349 case ui::AX_ROLE_FIGURE:
5350 ia_role = ROLE_SYSTEM_GROUPING; 5350 ia_role = ROLE_SYSTEM_GROUPING;
5351 break; 5351 break;
5352 case ui::AX_ROLE_FEED:
5353 ia_role = ROLE_SYSTEM_GROUPING;
5354 break;
5352 case ui::AX_ROLE_FORM: 5355 case ui::AX_ROLE_FORM:
5353 role_name = L"form"; 5356 role_name = L"form";
5354 ia2_role = IA2_ROLE_FORM; 5357 ia2_role = IA2_ROLE_FORM;
5355 break; 5358 break;
5356 case ui::AX_ROLE_FOOTER: 5359 case ui::AX_ROLE_FOOTER:
5357 ia_role = ROLE_SYSTEM_GROUPING; 5360 ia_role = ROLE_SYSTEM_GROUPING;
5358 ia2_role = IA2_ROLE_FOOTER; 5361 ia2_role = IA2_ROLE_FOOTER;
5359 break; 5362 break;
5360 case ui::AX_ROLE_GRID: 5363 case ui::AX_ROLE_GRID:
5361 ia_role = ROLE_SYSTEM_TABLE; 5364 ia_role = ROLE_SYSTEM_TABLE;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
5599 ia_role = ROLE_SYSTEM_GROUPING; 5602 ia_role = ROLE_SYSTEM_GROUPING;
5600 ia2_role = IA2_ROLE_SECTION; 5603 ia2_role = IA2_ROLE_SECTION;
5601 ia_state |= STATE_SYSTEM_READONLY; 5604 ia_state |= STATE_SYSTEM_READONLY;
5602 break; 5605 break;
5603 case ui::AX_ROLE_TAB_LIST: 5606 case ui::AX_ROLE_TAB_LIST:
5604 ia_role = ROLE_SYSTEM_PAGETABLIST; 5607 ia_role = ROLE_SYSTEM_PAGETABLIST;
5605 break; 5608 break;
5606 case ui::AX_ROLE_TAB_PANEL: 5609 case ui::AX_ROLE_TAB_PANEL:
5607 ia_role = ROLE_SYSTEM_PROPERTYPAGE; 5610 ia_role = ROLE_SYSTEM_PROPERTYPAGE;
5608 break; 5611 break;
5612 case ui::AX_ROLE_TERM:
5613 ia_role = ROLE_SYSTEM_LISTITEM;
5614 ia_state |= STATE_SYSTEM_READONLY;
5615 break;
5609 case ui::AX_ROLE_TOGGLE_BUTTON: 5616 case ui::AX_ROLE_TOGGLE_BUTTON:
5610 ia_role = ROLE_SYSTEM_PUSHBUTTON; 5617 ia_role = ROLE_SYSTEM_PUSHBUTTON;
5611 ia2_role = IA2_ROLE_TOGGLE_BUTTON; 5618 ia2_role = IA2_ROLE_TOGGLE_BUTTON;
5612 break; 5619 break;
5613 case ui::AX_ROLE_TEXT_FIELD: 5620 case ui::AX_ROLE_TEXT_FIELD:
5614 case ui::AX_ROLE_SEARCH_BOX: 5621 case ui::AX_ROLE_SEARCH_BOX:
5615 ia_role = ROLE_SYSTEM_TEXT; 5622 ia_role = ROLE_SYSTEM_TEXT;
5616 if (HasState(ui::AX_STATE_MULTILINE)) { 5623 if (HasState(ui::AX_STATE_MULTILINE)) {
5617 ia2_state |= IA2_STATE_MULTI_LINE; 5624 ia2_state |= IA2_STATE_MULTI_LINE;
5618 } else { 5625 } else {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
5706 return static_cast<BrowserAccessibilityWin*>(obj); 5713 return static_cast<BrowserAccessibilityWin*>(obj);
5707 } 5714 }
5708 5715
5709 const BrowserAccessibilityWin* 5716 const BrowserAccessibilityWin*
5710 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { 5717 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) {
5711 DCHECK(!obj || obj->IsNative()); 5718 DCHECK(!obj || obj->IsNative());
5712 return static_cast<const BrowserAccessibilityWin*>(obj); 5719 return static_cast<const BrowserAccessibilityWin*>(obj);
5713 } 5720 }
5714 5721
5715 } // namespace content 5722 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698