| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |