Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index 5c47a5e73341b62b98a43d514dd642f74ffa96aa..e982660a8a5b0a44e669ff5ea94555b00fa36481 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -78,6 +78,7 @@ |
#include "content/public/common/url_utils.h" |
#include "ui/accessibility/ax_tree.h" |
#include "ui/accessibility/ax_tree_update.h" |
+#include "ui/gfx/geometry/quad_f.h" |
#include "url/gurl.h" |
#if defined(OS_ANDROID) |
@@ -634,6 +635,25 @@ gfx::Point RenderFrameHostImpl::AccessibilityOriginInScreen( |
return gfx::Point(); |
} |
+gfx::Rect RenderFrameHostImpl::AccessibilityTransformToRootCoordSpace( |
+ const gfx::Rect& bounds) { |
+ RenderWidgetHostViewBase* view = |
+ static_cast<RenderWidgetHostViewBase*>(GetView()); |
+ gfx::Point p1 = view->TransformPointToRootCoordSpace(bounds.origin()); |
+ gfx::Point p2 = view->TransformPointToRootCoordSpace(bounds.top_right()); |
+ gfx::Point p3 = view->TransformPointToRootCoordSpace(bounds.bottom_right()); |
+ gfx::Point p4 = view->TransformPointToRootCoordSpace(bounds.bottom_left()); |
+ gfx::QuadF transformed_quad = gfx::QuadF( |
+ gfx::PointF(p1), gfx::PointF(p2), gfx::PointF(p3), gfx::PointF(p4)); |
+ gfx::RectF new_bounds = transformed_quad.BoundingBox(); |
+ return gfx::Rect(new_bounds.x(), new_bounds.y(), |
+ new_bounds.width(), new_bounds.height()); |
+} |
+ |
+SiteInstance* RenderFrameHostImpl::AccessibilityGetSiteInstance() { |
+ return GetSiteInstance(); |
+} |
+ |
void RenderFrameHostImpl::AccessibilityHitTest(const gfx::Point& point) { |
Send(new AccessibilityMsg_HitTest(routing_id_, point)); |
} |