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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1713723002: Implement accessibility support for CSS-transformed iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gn build 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
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));
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/frame_host/render_widget_host_view_child_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698