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

Issue 11402002: Add API for hit testing layer_impl touchEventHandlerRegions from the host (Closed)

Created:
8 years, 1 month ago by Yusuf
Modified:
8 years, 1 month ago
Reviewers:
danakj, jamesr
CC:
chromium-reviews, cc-bugs_chromium.or, leviw_travelin_and_unemployed, klobag.chromium, shawnsingh
Visibility:
Public.

Description

Add API for hit testing layer_impl touchEventHandlerRegions from the host These APIs will be used for hit testing touchEvents on the compositor. Currently all touch events coming through input_event_filter return DidNotHandle. Using this check we will be able to check the touch Ppoint against the touchEventHandlerRegion in all layer_impls and return DropEvent if there are no hits. BUG=135818 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=168294

Patch Set 1 #

Patch Set 2 : Added missing compositor_bindings call #

Total comments: 4

Patch Set 3 : Renamed parameters and fixed point conversion #

Total comments: 1

Patch Set 4 : Added tests and fixed parameters on static call #

Total comments: 12

Patch Set 5 : Testing more points on the boundaries and also added test for deviceScaleFactor and pageScaleFactor #

Total comments: 19

Patch Set 6 : Fixed pageScale and deviceScale issues, started using ScalePoint instead of scale #

Patch Set 7 : Fix typo in layer_tree_host_impl #

Total comments: 1

Patch Set 8 : Renamed call to haveTouchEventHandlersAt #

Unified diffs Side-by-side diffs Delta from patch set Stats (+487 lines, -1 line) Patch
M cc/input_handler.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M cc/layer_tree_host_common.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layer_tree_host_common.cc View 1 2 3 4 5 3 chunks +53 lines, -0 lines 0 comments Download
M cc/layer_tree_host_common_unittest.cc View 1 2 3 4 5 3 chunks +408 lines, -1 line 0 comments Download
M cc/layer_tree_host_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
M webkit/compositor_bindings/web_to_ccinput_handler_adapter.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
Yusuf
This picked up and tried to address danakj@'s comments for the relevant pieces on http://codereview.chromium.org/11365113/. ...
8 years, 1 month ago (2012-11-07 22:37:30 UTC) #1
danakj
This looks pretty good, a few comments about getting coordinate spaces right. http://codereview.chromium.org/11402002/diff/2001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc ...
8 years, 1 month ago (2012-11-08 01:30:38 UTC) #2
Yusuf
https://chromiumcodereview.appspot.com/11402002/diff/2001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://chromiumcodereview.appspot.com/11402002/diff/2001/cc/layer_tree_host_common.cc#newcode880 cc/layer_tree_host_common.cc:880: static bool pointHitsRegion(const gfx::PointF& screenSpacePoint, const WebTransformationMatrix& localSpaceToScreenSpaceTransform, Region ...
8 years, 1 month ago (2012-11-08 01:53:42 UTC) #3
danakj
Thanks, this looks great. Can you please add some tests for it? There are some ...
8 years, 1 month ago (2012-11-08 02:18:48 UTC) #4
Yusuf
Added the tests! I ended up basing them mostly on the tests for findLayerThatIsHitByPoint. On ...
8 years, 1 month ago (2012-11-09 01:20:56 UTC) #5
danakj
Thanks for the tests! They're really nice. I think we could test the boundary cases ...
8 years, 1 month ago (2012-11-09 17:02:58 UTC) #6
Yusuf
Added the deviceScalefactor and pageScalefactor related test. On 2012/11/09 17:02:58, danakj wrote: > Thanks for ...
8 years, 1 month ago (2012-11-12 23:57:22 UTC) #7
Yusuf
http://codereview.chromium.org/11402002/diff/1002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/1002/cc/layer_tree_host_common_unittest.cc#newcode3692 cc/layer_tree_host_common_unittest.cc:3692: LayerTreeHostCommon::calculateDrawTransforms(root.get(), root->bounds(), 1, 1, 0, dummyMaxTextureSize, renderSurfaceLayerList); On 2012/11/09 ...
8 years, 1 month ago (2012-11-12 23:57:33 UTC) #8
danakj
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3738 cc/layer_tree_host_common_unittest.cc:3738: // by scaling the points accordingly. This sounds like ...
8 years, 1 month ago (2012-11-13 00:42:04 UTC) #9
danakj
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3746 cc/layer_tree_host_common_unittest.cc:3746: setLayerPropertiesForTesting(root.get(), identityMatrix, identityMatrix, anchor, gfx::PointF(0, 0), gfx::Size(250, 250), false); ...
8 years, 1 month ago (2012-11-13 00:50:43 UTC) #10
danakj
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common.cc#newcode889 cc/layer_tree_host_common.cc:889: gfx::PointF hitTestPointInLayerSpace = hitTestPointInContentSpace.Scale(1 / layerContentScaleX, 1 / layerContentScaleY); ...
8 years, 1 month ago (2012-11-13 00:52:47 UTC) #11
Yusuf
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3763 cc/layer_tree_host_common_unittest.cc:3763: float pageScaleFactor = 5.0f; // pageScaleFactor shouldn't factor into ...
8 years, 1 month ago (2012-11-13 00:57:36 UTC) #12
danakj
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3763 cc/layer_tree_host_common_unittest.cc:3763: float pageScaleFactor = 5.0f; // pageScaleFactor shouldn't factor into ...
8 years, 1 month ago (2012-11-13 01:07:45 UTC) #13
danakj
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3763 cc/layer_tree_host_common_unittest.cc:3763: float pageScaleFactor = 5.0f; // pageScaleFactor shouldn't factor into ...
8 years, 1 month ago (2012-11-13 01:12:39 UTC) #14
Yusuf
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3738 cc/layer_tree_host_common_unittest.cc:3738: // by scaling the points accordingly. Looking at scrollBegin(), ...
8 years, 1 month ago (2012-11-13 01:17:49 UTC) #15
danakj
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3738 cc/layer_tree_host_common_unittest.cc:3738: // by scaling the points accordingly. On 2012/11/13 01:17:49, ...
8 years, 1 month ago (2012-11-13 01:25:05 UTC) #16
Yusuf
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3738 cc/layer_tree_host_common_unittest.cc:3738: // by scaling the points accordingly. Then since the ...
8 years, 1 month ago (2012-11-13 01:41:39 UTC) #17
danakj
http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc File cc/layer_tree_host_common_unittest.cc (right): http://codereview.chromium.org/11402002/diff/6002/cc/layer_tree_host_common_unittest.cc#newcode3738 cc/layer_tree_host_common_unittest.cc:3738: // by scaling the points accordingly. On 2012/11/13 01:41:39, ...
8 years, 1 month ago (2012-11-13 01:54:00 UTC) #18
Yusuf
Sorry for bothering you this much with this, but one last question: After I change ...
8 years, 1 month ago (2012-11-13 19:40:48 UTC) #19
danakj
On Tue, Nov 13, 2012 at 2:40 PM, <yusufo@chromium.org> wrote: > Sorry for bothering you ...
8 years, 1 month ago (2012-11-13 19:56:43 UTC) #20
Yusuf
Thanks. With the changes above all the tests are working. Sending to try bots to ...
8 years, 1 month ago (2012-11-13 21:37:14 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusufo@chromium.org/11402002/16005
8 years, 1 month ago (2012-11-13 23:18:24 UTC) #22
commit-bot: I haz the power
Presubmit check for 11402002-16005 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 1 month ago (2012-11-13 23:18:30 UTC) #23
jamesr
https://chromiumcodereview.appspot.com/11402002/diff/16005/webkit/compositor_bindings/web_to_ccinput_handler_adapter.cc File webkit/compositor_bindings/web_to_ccinput_handler_adapter.cc (right): https://chromiumcodereview.appspot.com/11402002/diff/16005/webkit/compositor_bindings/web_to_ccinput_handler_adapter.cc#newcode91 webkit/compositor_bindings/web_to_ccinput_handler_adapter.cc:91: virtual bool checkTouchEventHandlerRegionHit(WebPoint point) what is the intended use ...
8 years, 1 month ago (2012-11-13 23:21:40 UTC) #24
Yusuf
nduca@ for webkit/compositor_bindings
8 years, 1 month ago (2012-11-13 23:22:03 UTC) #25
Yusuf
To be used from WebCompositorInputHandler to decide whether we are an incoming touch event is ...
8 years, 1 month ago (2012-11-13 23:23:22 UTC) #26
jamesr
I think the API name could better. Callsites will look like this: bool foo = ...
8 years, 1 month ago (2012-11-13 23:27:46 UTC) #27
Yusuf
Renamed it to haveTouchEventHandlersAt On 2012/11/13 23:27:46, jamesr wrote: > I think the API name ...
8 years, 1 month ago (2012-11-13 23:41:28 UTC) #28
Yusuf
jamesr@ can I get an LGTM for webkit/ for this? On 2012/11/13 23:41:28, Yusuf wrote: ...
8 years, 1 month ago (2012-11-15 00:12:17 UTC) #29
jamesr
lgtm
8 years, 1 month ago (2012-11-15 00:21:45 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusufo@chromium.org/11402002/1019
8 years, 1 month ago (2012-11-15 17:59:22 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusufo@chromium.org/11402002/1019
8 years, 1 month ago (2012-11-16 05:24:30 UTC) #32
commit-bot: I haz the power
8 years, 1 month ago (2012-11-16 21:42:23 UTC) #33
Change committed as 168294

Powered by Google App Engine
This is Rietveld 408576698