| 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/renderer_accessibility.h" | 5 #include "content/renderer/accessibility/renderer_accessibility.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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } | 547 } |
| 548 | 548 |
| 549 WebAXObject focus_obj = document.accessibilityObjectFromID(focus_acc_obj_id); | 549 WebAXObject focus_obj = document.accessibilityObjectFromID(focus_acc_obj_id); |
| 550 if (focus_obj.isDetached()) { | 550 if (focus_obj.isDetached()) { |
| 551 #ifndef NDEBUG | 551 #ifndef NDEBUG |
| 552 LOG(WARNING) << "SetTextSelection on invalid object id " | 552 LOG(WARNING) << "SetTextSelection on invalid object id " |
| 553 << focus_acc_obj_id; | 553 << focus_acc_obj_id; |
| 554 #endif | 554 #endif |
| 555 return; | 555 return; |
| 556 } | 556 } |
| 557 | 557 LOG(ERROR) << "set!" << anchor_offset << " " << focus_offset; |
| 558 anchor_obj.setSelection(anchor_obj, anchor_offset, focus_obj, focus_offset); | 558 anchor_obj.setSelection(anchor_obj, anchor_offset, focus_obj, focus_offset); |
| 559 WebAXObject root = document.accessibilityObject(); | 559 WebAXObject root = document.accessibilityObject(); |
| 560 if (root.isDetached()) { | 560 if (root.isDetached()) { |
| 561 #ifndef NDEBUG | 561 #ifndef NDEBUG |
| 562 LOG(WARNING) << "OnSetAccessibilityFocus but root is invalid"; | 562 LOG(WARNING) << "OnSetAccessibilityFocus but root is invalid"; |
| 563 #endif | 563 #endif |
| 564 return; | 564 return; |
| 565 } | 565 } |
| 566 HandleAXEvent(root, ui::AX_EVENT_LAYOUT_COMPLETE); | 566 HandleAXEvent(root, ui::AX_EVENT_LAYOUT_COMPLETE); |
| 567 } | 567 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 595 #ifndef NDEBUG | 595 #ifndef NDEBUG |
| 596 LOG(WARNING) << "ShowContextMenu on invalid object id " << acc_obj_id; | 596 LOG(WARNING) << "ShowContextMenu on invalid object id " << acc_obj_id; |
| 597 #endif | 597 #endif |
| 598 return; | 598 return; |
| 599 } | 599 } |
| 600 | 600 |
| 601 obj.showContextMenu(); | 601 obj.showContextMenu(); |
| 602 } | 602 } |
| 603 | 603 |
| 604 } // namespace content | 604 } // namespace content |
| OLD | NEW |