| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_auralinux.h" | 5 #include "content/browser/accessibility/browser_accessibility_auralinux.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 gint y, | 137 gint y, |
| 138 AtkCoordType coord_type) { | 138 AtkCoordType coord_type) { |
| 139 g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), 0); | 139 g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), 0); |
| 140 | 140 |
| 141 BrowserAccessibilityAuraLinux* obj = | 141 BrowserAccessibilityAuraLinux* obj = |
| 142 ToBrowserAccessibilityAuraLinux(atk_component); | 142 ToBrowserAccessibilityAuraLinux(atk_component); |
| 143 if (!obj) | 143 if (!obj) |
| 144 return NULL; | 144 return NULL; |
| 145 | 145 |
| 146 gfx::Point point(x, y); | 146 gfx::Point point(x, y); |
| 147 if (!obj->GetScreenBoundsRect().Contains(point)) | 147 BrowserAccessibility* result = obj->manager()->CachingAsyncHitTest(point); |
| 148 return NULL; | |
| 149 | |
| 150 BrowserAccessibility* result = obj->BrowserAccessibilityForPoint(point); | |
| 151 if (!result) | 148 if (!result) |
| 152 return NULL; | 149 return NULL; |
| 153 | 150 |
| 154 AtkObject* atk_result = | 151 AtkObject* atk_result = |
| 155 ToBrowserAccessibilityAuraLinux(result)->GetAtkObject(); | 152 ToBrowserAccessibilityAuraLinux(result)->GetAtkObject(); |
| 156 g_object_ref(atk_result); | 153 g_object_ref(atk_result); |
| 157 return atk_result; | 154 return atk_result; |
| 158 } | 155 } |
| 159 | 156 |
| 160 static void browser_accessibility_get_extents(AtkComponent* atk_component, | 157 static void browser_accessibility_get_extents(AtkComponent* atk_component, |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 atk_role_ = ATK_ROLE_SECTION; | 953 atk_role_ = ATK_ROLE_SECTION; |
| 957 #endif | 954 #endif |
| 958 break; | 955 break; |
| 959 default: | 956 default: |
| 960 atk_role_ = ATK_ROLE_UNKNOWN; | 957 atk_role_ = ATK_ROLE_UNKNOWN; |
| 961 break; | 958 break; |
| 962 } | 959 } |
| 963 } | 960 } |
| 964 | 961 |
| 965 } // namespace content | 962 } // namespace content |
| OLD | NEW |