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

Unified Diff: content/browser/renderer_host/delegated_frame_host.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/delegated_frame_host.h
diff --git a/content/browser/renderer_host/delegated_frame_host.h b/content/browser/renderer_host/delegated_frame_host.h
index e60855b6e20831b98d10ddcbb745911493a0f5b1..e2172205f0ccbd65b8572d7584da24bfa629c48c 100644
--- a/content/browser/renderer_host/delegated_frame_host.h
+++ b/content/browser/renderer_host/delegated_frame_host.h
@@ -161,19 +161,20 @@ class CONTENT_EXPORT DelegatedFrameHost
// Given the SurfaceID of a Surface that is contained within this class'
// Surface, find the relative transform between the Surfaces and apply it
- // to a point. If a Surface has not yet been created this returns the
- // same point with no transform applied.
- gfx::Point TransformPointToLocalCoordSpace(
- const gfx::Point& point,
- const cc::SurfaceId& original_surface);
+ // to a point. Returns false if a Surface has not yet been created or if
+ // |original_surface| is not embedded within our current Surface.
+ bool TransformPointToLocalCoordSpace(const gfx::Point& point,
+ const cc::SurfaceId& original_surface,
+ gfx::Point* transformed_point);
// Given a RenderWidgetHostViewBase that renders to a Surface that is
// contained within this class' Surface, find the relative transform between
- // the Surfaces and apply it to a point. If a Surface has not yet been
- // created this returns the same point with no transform applied.
- gfx::Point TransformPointToCoordSpaceForView(
- const gfx::Point& point,
- RenderWidgetHostViewBase* target_view);
+ // the Surfaces and apply it to a point. Returns false if a Surface has not
+ // yet been created or if |target_view| is not a descendant RWHV from our
+ // client.
+ bool TransformPointToCoordSpaceForView(const gfx::Point& point,
+ RenderWidgetHostViewBase* target_view,
+ gfx::Point* transformed_point);
// Exposed for tests.
cc::SurfaceId SurfaceIdForTesting() const {

Powered by Google App Engine
This is Rietveld 408576698