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

Unified Diff: content/renderer/accessibility/renderer_accessibility.cc

Issue 1836113002: Fix accessible touch exploration inside of iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test startup on Android Created 4 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/test/accessibility_browser_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/accessibility/renderer_accessibility.cc
diff --git a/content/renderer/accessibility/renderer_accessibility.cc b/content/renderer/accessibility/renderer_accessibility.cc
index 34f1c4571ff5276b4f83bcbe0b4dd788ef1109e0..fb8bf2d6a9fe198500cfd32afc47c46ea93a0218 100644
--- a/content/renderer/accessibility/renderer_accessibility.cc
+++ b/content/renderer/accessibility/renderer_accessibility.cc
@@ -384,8 +384,24 @@ void RendererAccessibility::OnHitTest(gfx::Point point) {
return;
WebAXObject obj = root_obj.hitTest(point);
- if (!obj.isDetached())
- HandleAXEvent(obj, ui::AX_EVENT_HOVER);
+ if (obj.isDetached())
+ return;
+
+ // If the object that was hit has a child frame, we have to send a
+ // message back to the browser to do the hit test in the child frame,
+ // recursively.
+ AXContentNodeData data;
+ tree_source_.SerializeNode(obj, &data);
+ if (data.HasContentIntAttribute(AX_CONTENT_ATTR_CHILD_ROUTING_ID) ||
+ data.HasContentIntAttribute(
+ AX_CONTENT_ATTR_CHILD_BROWSER_PLUGIN_INSTANCE_ID)) {
+ Send(new AccessibilityHostMsg_ChildFrameHitTestResult(routing_id(), point,
+ obj.axID()));
+ return;
+ }
+
+ // Otherwise, send a HOVER event on the node that was hit.
+ HandleAXEvent(obj, ui::AX_EVENT_HOVER);
}
void RendererAccessibility::OnSetAccessibilityFocus(int acc_obj_id) {
« no previous file with comments | « content/content_tests.gypi ('k') | content/test/accessibility_browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698