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

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

Issue 2748463003: Generalize the HIT_TEST accessibility action so that it can send any event. (Closed)
Patch Set: Created 3 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
Index: content/renderer/accessibility/render_accessibility_impl.cc
diff --git a/content/renderer/accessibility/render_accessibility_impl.cc b/content/renderer/accessibility/render_accessibility_impl.cc
index c4c2723fd1815f7e9808f22a28d8d554699245e6..a4e0f7e6f1ce06a468a51d2d1cad0c241236626a 100644
--- a/content/renderer/accessibility/render_accessibility_impl.cc
+++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -467,7 +467,7 @@ void RenderAccessibilityImpl::OnPerformAction(
OnGetImageData(target, data.target_rect.size());
break;
case ui::AX_ACTION_HIT_TEST:
- OnHitTest(data.target_point);
+ OnHitTest(data.target_point, data.hit_test_event_to_fire);
break;
case ui::AX_ACTION_INCREMENT:
target.increment();
@@ -531,7 +531,8 @@ void RenderAccessibilityImpl::OnFatalError() {
CHECK(false) << "Invalid accessibility tree.";
}
-void RenderAccessibilityImpl::OnHitTest(const gfx::Point& point) {
+void RenderAccessibilityImpl::OnHitTest(const gfx::Point& point,
+ ui::AXEvent event_to_fire) {
const WebDocument& document = GetMainDocument();
if (document.isNull())
return;
@@ -552,13 +553,13 @@ void RenderAccessibilityImpl::OnHitTest(const gfx::Point& point) {
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()));
+ Send(new AccessibilityHostMsg_ChildFrameHitTestResult(
+ routing_id(), point, obj.axID(), event_to_fire));
return;
}
- // Otherwise, send a HOVER event on the node that was hit.
- HandleAXEvent(obj, ui::AX_EVENT_HOVER);
+ // Otherwise, send an event on the node that was hit.
+ HandleAXEvent(obj, event_to_fire);
}
void RenderAccessibilityImpl::OnSetAccessibilityFocus(

Powered by Google App Engine
This is Rietveld 408576698