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

Unified Diff: content/browser/renderer_host/render_widget_host_view_base.h

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/renderer_host/render_widget_host_view_base.h
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 7ea34285895c492e4c5845e362b4fa6c229d655a..b556e1cdec81a2b1e161f32525d3743b2aa1351a 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -257,18 +257,21 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// RenderWidget and needs to be translated to viewport coordinates for the
// root RWHV, in which case this method is called on the root RWHV with the
// out-of-process iframe's SurfaceId.
- // This does not transform points between surfaces where one does not
- // contain the other. To transform between sibling surfaces, the point must
- // be transformed to the root's coordinate space as an intermediate step.
- virtual gfx::Point TransformPointToLocalCoordSpace(
+ // Returns false when this attempts to transform a point between coordinate
+ // spaces of surfaces where one does not contain the other. To transform
+ // between sibling surfaces, the point must be transformed to the root's
+ // coordinate space as an intermediate step.
+ virtual bool TransformPointToLocalCoordSpace(
const gfx::Point& point,
- const cc::SurfaceId& original_surface);
+ const cc::SurfaceId& original_surface,
+ gfx::Point* transformed_point);
// Transform a point that is in the coordinate space for the current
// RenderWidgetHostView to the coordinate space of the target_view.
- virtual gfx::Point TransformPointToCoordSpaceForView(
+ virtual bool TransformPointToCoordSpaceForView(
const gfx::Point& point,
- RenderWidgetHostViewBase* target_view);
+ RenderWidgetHostViewBase* target_view,
+ gfx::Point* transformed_point);
// TODO(kenrb, wjmaclean): This is a temporary subclass identifier for
// RenderWidgetHostViewGuests that is needed for special treatment during

Powered by Google App Engine
This is Rietveld 408576698