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

Unified Diff: cc/layer_impl.cc

Issue 11377006: LayerImpl::tryScroll must convert its content-space point to layer space before comparing to the no… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index 6db7af763c2e12d4965ff40862a007824f0484d7..c912bfd85ddf5f3c92075d88777c2263476d4edd 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -215,8 +215,9 @@ InputHandlerClient::ScrollStatus LayerImpl::tryScroll(const gfx::PointF& screenS
if (!nonFastScrollableRegion().IsEmpty()) {
bool clipped = false;
- gfx::PointF hitTestPointInLocalSpace = MathUtil::projectPoint(screenSpaceTransform().inverse(), screenSpacePoint, clipped);
- if (!clipped && nonFastScrollableRegion().Contains(gfx::ToFlooredPoint(hitTestPointInLocalSpace))) {
+ gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(screenSpaceTransform().inverse(), screenSpacePoint, clipped);
+ gfx::PointF hitTestPointInLayerSpace = hitTestPointInContentSpace.Scale(1 / contentsScaleX(), 1 / contentsScaleY());
+ if (!clipped && nonFastScrollableRegion().Contains(gfx::ToFlooredPoint(hitTestPointInLayerSpace))) {
enne (OOO) 2012/11/06 23:18:58 Can you convince me about the use of ToFlooredPoin
danakj 2012/11/06 23:21:57 I think I did ToFloored because I wanted no behavi
danakj 2012/11/06 23:22:27 Done.
TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed nonFastScrollableRegion");
return InputHandlerClient::ScrollOnMainThread;
}
« no previous file with comments | « no previous file | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698