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

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

Issue 2447013009: Implement Increment and Decrement accessible actions (Closed)
Patch Set: Change to make test pass on Android Created 4 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 | « content/browser/accessibility/browser_accessibility_manager.cc ('k') | content/test/BUILD.gn » ('j') | 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) 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/renderer/accessibility/render_accessibility_impl.h" 5 #include "content/renderer/accessibility/render_accessibility_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 WebAXObject root = document.accessibilityObject(); 444 WebAXObject root = document.accessibilityObject();
445 if (!root.updateLayoutAndCheckValidity()) 445 if (!root.updateLayoutAndCheckValidity())
446 return; 446 return;
447 447
448 WebAXObject target = document.accessibilityObjectFromID(data.target_node_id); 448 WebAXObject target = document.accessibilityObjectFromID(data.target_node_id);
449 WebAXObject anchor = document.accessibilityObjectFromID(data.anchor_node_id); 449 WebAXObject anchor = document.accessibilityObjectFromID(data.anchor_node_id);
450 WebAXObject focus = document.accessibilityObjectFromID(data.focus_node_id); 450 WebAXObject focus = document.accessibilityObjectFromID(data.focus_node_id);
451 451
452 switch (data.action) { 452 switch (data.action) {
453 case ui::AX_ACTION_DECREMENT:
454 target.decrement();
455 break;
453 case ui::AX_ACTION_DO_DEFAULT: 456 case ui::AX_ACTION_DO_DEFAULT:
454 target.performDefaultAction(); 457 target.performDefaultAction();
455 break; 458 break;
456 case ui::AX_ACTION_HIT_TEST: 459 case ui::AX_ACTION_HIT_TEST:
457 OnHitTest(data.target_point); 460 OnHitTest(data.target_point);
458 break; 461 break;
462 case ui::AX_ACTION_INCREMENT:
463 target.increment();
464 break;
459 case ui::AX_ACTION_SCROLL_TO_MAKE_VISIBLE: 465 case ui::AX_ACTION_SCROLL_TO_MAKE_VISIBLE:
460 target.scrollToMakeVisibleWithSubFocus( 466 target.scrollToMakeVisibleWithSubFocus(
461 WebRect(data.target_rect.x(), data.target_rect.y(), 467 WebRect(data.target_rect.x(), data.target_rect.y(),
462 data.target_rect.width(), data.target_rect.height())); 468 data.target_rect.width(), data.target_rect.height()));
463 break; 469 break;
464 case ui::AX_ACTION_SCROLL_TO_POINT: 470 case ui::AX_ACTION_SCROLL_TO_POINT:
465 target.scrollToGlobalPoint( 471 target.scrollToGlobalPoint(
466 WebPoint(data.target_point.x(), data.target_point.y())); 472 WebPoint(data.target_point.x(), data.target_point.y()));
467 break; 473 break;
468 case ui::AX_ACTION_SET_ACCESSIBILITY_FOCUS: 474 case ui::AX_ACTION_SET_ACCESSIBILITY_FOCUS:
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 635
630 const WebDocument& document = GetMainDocument(); 636 const WebDocument& document = GetMainDocument();
631 if (document.isNull()) 637 if (document.isNull())
632 return; 638 return;
633 639
634 document.accessibilityObject().scrollToMakeVisibleWithSubFocus( 640 document.accessibilityObject().scrollToMakeVisibleWithSubFocus(
635 WebRect(bounds.x(), bounds.y(), bounds.width(), bounds.height())); 641 WebRect(bounds.x(), bounds.y(), bounds.width(), bounds.height()));
636 } 642 }
637 643
638 } // namespace content 644 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_manager.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698