| 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/browser/accessibility/browser_accessibility_manager.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 const AXEventNotificationDetails& detail = details[index]; | 427 const AXEventNotificationDetails& detail = details[index]; |
| 428 | 428 |
| 429 // Find the node corresponding to the id that's the target of the | 429 // Find the node corresponding to the id that's the target of the |
| 430 // event (which may not be the root of the update tree). | 430 // event (which may not be the root of the update tree). |
| 431 ui::AXNode* node = tree_->GetFromId(detail.id); | 431 ui::AXNode* node = tree_->GetFromId(detail.id); |
| 432 if (!node) | 432 if (!node) |
| 433 continue; | 433 continue; |
| 434 | 434 |
| 435 ui::AXEvent event_type = detail.event_type; | 435 ui::AXEvent event_type = detail.event_type; |
| 436 | 436 |
| 437 #if defined(OS_MACOSX) | 437 // On Mac and Windows, nearly all events are now fired implicitly, |
| 438 if (event_type != ui::AX_EVENT_HOVER) | 438 // so we should ignore most events from the renderer. |
| 439 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 440 if (event_type != ui::AX_EVENT_HOVER && |
| 441 event_type != ui::AX_EVENT_LOCATION_CHANGED && |
| 442 event_type != ui::AX_EVENT_SCROLLED_TO_ANCHOR) { |
| 439 continue; | 443 continue; |
| 444 } |
| 440 #endif // !defined(OS_MACOSX) | 445 #endif // !defined(OS_MACOSX) |
| 441 | 446 |
| 442 if (event_type == ui::AX_EVENT_FOCUS || | 447 if (event_type == ui::AX_EVENT_FOCUS || |
| 443 event_type == ui::AX_EVENT_BLUR) { | 448 event_type == ui::AX_EVENT_BLUR) { |
| 444 if (osk_state_ != OSK_DISALLOWED_BECAUSE_TAB_HIDDEN && | 449 if (osk_state_ != OSK_DISALLOWED_BECAUSE_TAB_HIDDEN && |
| 445 osk_state_ != OSK_DISALLOWED_BECAUSE_TAB_JUST_APPEARED) { | 450 osk_state_ != OSK_DISALLOWED_BECAUSE_TAB_JUST_APPEARED) { |
| 446 osk_state_ = OSK_ALLOWED; | 451 osk_state_ = OSK_ALLOWED; |
| 447 } | 452 } |
| 448 | 453 |
| 449 // We already handled all focus events above. | 454 // We already handled all focus events above. |
| (...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 hit_test_result = parent; | 1317 hit_test_result = parent; |
| 1313 parent = parent->PlatformGetParent(); | 1318 parent = parent->PlatformGetParent(); |
| 1314 } | 1319 } |
| 1315 | 1320 |
| 1316 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); | 1321 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); |
| 1317 last_hover_node_id_ = hit_test_result->GetId(); | 1322 last_hover_node_id_ = hit_test_result->GetId(); |
| 1318 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); | 1323 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); |
| 1319 } | 1324 } |
| 1320 | 1325 |
| 1321 } // namespace content | 1326 } // namespace content |
| OLD | NEW |