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

Issue 11377006: LayerImpl::tryScroll must convert its content-space point to layer space before comparing to the no… (Closed)

Created:
8 years, 1 month ago by danakj
Modified:
8 years, 1 month ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, backer, piman, Yusuf
Visibility:
Public.

Description

LayerImpl::tryScroll must convert its content-space point to layer space before comparing to the nonFastScrollableRegion. The hit test resulting point that the tryScroll() method gets is in content space, since it is the result of mapping via the inverse screenSpaceTransform. However, the nonFastScrollableRegion is in layer space, so it should not compare the point against the region directly. We add a conversion from content to layer space before doing the test. This is now covered by the following tests. Because the layer is given a contentsScale, the tests fail without the above change made to tryScroll. Tests: cc_unittests:LayerTreeHostImplTest.nonFastScrollableRegionBasic cc_unittests:LayerTreeHostImplTest.nonFastScrollableRegionWithOffset R=enne BUG=159676 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=166353

Patch Set 1 #

Total comments: 3

Patch Set 2 : ToRoundedPoint #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -5 lines) Patch
M cc/layer_impl.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 2 chunks +7 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
danakj
8 years, 1 month ago (2012-11-06 23:08:45 UTC) #1
enne (OOO)
https://codereview.chromium.org/11377006/diff/1/cc/layer_impl.cc File cc/layer_impl.cc (right): https://codereview.chromium.org/11377006/diff/1/cc/layer_impl.cc#newcode220 cc/layer_impl.cc:220: if (!clipped && nonFastScrollableRegion().Contains(gfx::ToFlooredPoint(hitTestPointInLayerSpace))) { Can you convince me ...
8 years, 1 month ago (2012-11-06 23:18:58 UTC) #2
danakj
https://codereview.chromium.org/11377006/diff/1/cc/layer_impl.cc File cc/layer_impl.cc (right): https://codereview.chromium.org/11377006/diff/1/cc/layer_impl.cc#newcode220 cc/layer_impl.cc:220: if (!clipped && nonFastScrollableRegion().Contains(gfx::ToFlooredPoint(hitTestPointInLayerSpace))) { On 2012/11/06 23:18:58, enne ...
8 years, 1 month ago (2012-11-06 23:21:57 UTC) #3
danakj
https://codereview.chromium.org/11377006/diff/1/cc/layer_impl.cc File cc/layer_impl.cc (right): https://codereview.chromium.org/11377006/diff/1/cc/layer_impl.cc#newcode220 cc/layer_impl.cc:220: if (!clipped && nonFastScrollableRegion().Contains(gfx::ToFlooredPoint(hitTestPointInLayerSpace))) { On 2012/11/06 23:21:57, danakj ...
8 years, 1 month ago (2012-11-06 23:22:27 UTC) #4
enne (OOO)
lgtm
8 years, 1 month ago (2012-11-06 23:24:52 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11377006/7001
8 years, 1 month ago (2012-11-07 01:02:06 UTC) #6
commit-bot: I haz the power
8 years, 1 month ago (2012-11-07 04:48:26 UTC) #7
Change committed as 166353

Powered by Google App Engine
This is Rietveld 408576698