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

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

Issue 2417463003: Account for failure of coordinate space transformations in browser (Closed)
Patch Set: Review comments addressed Created 4 years, 2 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_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 4f8da3399f3a256f523f744335cfae31637542f5..40b54b69ced633e975d5e17b74ec67d2644bc2ad 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -531,24 +531,29 @@ gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace(
point, cc::SurfaceId(frame_sink_id_, local_frame_id_));
}
-gfx::Point RenderWidgetHostViewChildFrame::TransformPointToLocalCoordSpace(
+bool RenderWidgetHostViewChildFrame::TransformPointToLocalCoordSpace(
const gfx::Point& point,
- const cc::SurfaceId& original_surface) {
+ const cc::SurfaceId& original_surface,
+ gfx::Point* transformed_point) {
+ *transformed_point = point;
if (!frame_connector_ || local_frame_id_.is_null())
- return point;
+ return false;
return frame_connector_->TransformPointToLocalCoordSpace(
- point, original_surface, cc::SurfaceId(frame_sink_id_, local_frame_id_));
+ point, original_surface, cc::SurfaceId(frame_sink_id_, local_frame_id_),
+ transformed_point);
}
-gfx::Point RenderWidgetHostViewChildFrame::TransformPointToCoordSpaceForView(
+bool RenderWidgetHostViewChildFrame::TransformPointToCoordSpaceForView(
const gfx::Point& point,
- RenderWidgetHostViewBase* target_view) {
+ RenderWidgetHostViewBase* target_view,
+ gfx::Point* transformed_point) {
if (!frame_connector_ || local_frame_id_.is_null() || target_view == this)
- return point;
+ return false;
return frame_connector_->TransformPointToCoordSpaceForView(
- point, target_view, cc::SurfaceId(frame_sink_id_, local_frame_id_));
+ point, target_view, cc::SurfaceId(frame_sink_id_, local_frame_id_),
+ transformed_point);
}
bool RenderWidgetHostViewChildFrame::IsRenderWidgetHostViewChildFrame() {
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_child_frame.h ('k') | content/browser/renderer_host/delegated_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698