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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_base.cc

Issue 2664013002: input: Restrict synthetic touch gesture to view bounds.
Patch Set: Created 3 years, 11 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/input/synthetic_gesture_target_base.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc b/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
index 65667d802e9c5b95d49c9b08054c0563bd49f3d0..816b7d3c584a44dbac1890abff920144d6cb16cb 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
@@ -126,6 +126,10 @@ float SyntheticGestureTargetBase::GetMinScalingSpanInDips() const {
return 0.0f;
}
+gfx::Size SyntheticGestureTargetBase::GetViewSize() const {
+ return host_->GetView()->GetViewBounds().size();
+}
+
bool SyntheticGestureTargetBase::PointIsWithinContents(int x, int y) const {
gfx::Rect bounds = host_->GetView()->GetViewBounds();
bounds -= bounds.OffsetFromOrigin(); // Translate the bounds to (0,0).

Powered by Google App Engine
This is Rietveld 408576698