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

Side by Side Diff: content/renderer/accessibility/blink_ax_enum_conversion.cc

Issue 673143002: Unknown WebAXRole from Blink should be mapped to a valid chromium AX role. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer/accessibility/blink_ax_enum_conversion.h" 5 #include "content/renderer/accessibility/blink_ax_enum_conversion.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 return ui::AX_ROLE_TOOLTIP; 326 return ui::AX_ROLE_TOOLTIP;
327 case blink::WebAXRoleValueIndicator: 327 case blink::WebAXRoleValueIndicator:
328 return ui::AX_ROLE_VALUE_INDICATOR; 328 return ui::AX_ROLE_VALUE_INDICATOR;
329 case blink::WebAXRoleWebArea: 329 case blink::WebAXRoleWebArea:
330 return ui::AX_ROLE_WEB_AREA; 330 return ui::AX_ROLE_WEB_AREA;
331 case blink::WebAXRoleWindow: 331 case blink::WebAXRoleWindow:
332 return ui::AX_ROLE_WINDOW; 332 return ui::AX_ROLE_WINDOW;
333 default: 333 default:
334 // We can't add an assertion here, that prevents us 334 // We can't add an assertion here, that prevents us
335 // from adding new role enums in Blink. 335 // from adding new role enums in Blink.
336 return static_cast<ui::AXRole>(-1); 336 LOG(WARNING) << "Warning: Blink WebAXRole " << role
337 << " not handled by Chromium yet.";
338 return ui::AX_ROLE_UNKNOWN;
337 } 339 }
338 } 340 }
339 341
340 ui::AXEvent AXEventFromBlink(blink::WebAXEvent event) { 342 ui::AXEvent AXEventFromBlink(blink::WebAXEvent event) {
341 switch (event) { 343 switch (event) {
342 case blink::WebAXEventActiveDescendantChanged: 344 case blink::WebAXEventActiveDescendantChanged:
343 return ui::AX_EVENT_ACTIVEDESCENDANTCHANGED; 345 return ui::AX_EVENT_ACTIVEDESCENDANTCHANGED;
344 case blink::WebAXEventAlert: 346 case blink::WebAXEventAlert:
345 return ui::AX_EVENT_ALERT; 347 return ui::AX_EVENT_ALERT;
346 case blink::WebAXEventAriaAttributeChanged: 348 case blink::WebAXEventAriaAttributeChanged:
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 case blink::WebAXTextDirectionBT: 406 case blink::WebAXTextDirectionBT:
405 return ui::AX_TEXT_DIRECTION_BT; 407 return ui::AX_TEXT_DIRECTION_BT;
406 default: 408 default:
407 NOTREACHED(); 409 NOTREACHED();
408 } 410 }
409 411
410 return ui::AX_TEXT_DIRECTION_NONE; 412 return ui::AX_TEXT_DIRECTION_NONE;
411 } 413 }
412 414
413 } // namespace content 415 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698