Initial browser-side implementation for touch-action
Receive SetTouchAction messages and filter GestureEvents in the browser
based on them.
The logic here so far is pretty trivial, but will get more complex, eg:
- addition of pinch and double-tap gesture handling
- support for pan-x, pan-y, pan-x/y and potentially other touch actions
- more sophisticated handling of multiple fingers (pending WG discussion)
See touch-action design doc at http://goo.gl/KcKbxQ for more details.
Depends on blink-side change in https://codereview.chromium.org/16507017/
BUG=316735
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239611
Sadrul, please review.
Jared - take a look if you like, it's the basic design we discussed offline, but
happy to get any feedback you have.
I've tested this on ChromeOS and Android devices using the test cases I wrote
for the blink side of the patch, and verified the behavior is consistent with
IE11 (modulo one blink/spec bug, and unresolved multi-finger weirdness in IE -
both pending w3c working group discussions).
Thanks,
Rick
jdduke (slow)
https://codereview.chromium.org/67383002/diff/1/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/67383002/diff/1/content/common/view_messages.h#newcode1865 content/common/view_messages.h:1865: IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchAction, Could we make this an InputHostMsg and put ...
https://codereview.chromium.org/67383002/diff/1/content/common/view_messages.h
File content/common/view_messages.h (right):
https://codereview.chromium.org/67383002/diff/1/content/common/view_messages....
content/common/view_messages.h:1865:
IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchAction,
On 2013/11/19 22:14:59, Rick Byers wrote:
> On 2013/11/18 15:56:00, jdduke wrote:
> >
> > Could we make this an InputHostMsg and put in
> > content/common/input/input_messages.h?
>
> Done. I saw this as similar to ViewHostMsg_HasTouchEventHandlers - wasn't
sure
> why that was a ViewHostMsg. I could move it here too if you like.
Ah, you're right of course. I've been meaning to change that, but as long as we
already handle ViewHostMsg types in the router I'm fine with either ViewHost or
InputHost prefixes.
On 2013/11/20 00:35:22, jdduke wrote:
> https://codereview.chromium.org/67383002/diff/1/content/common/view_messages.h
> File content/common/view_messages.h (right):
>
>
https://codereview.chromium.org/67383002/diff/1/content/common/view_messages....
> content/common/view_messages.h:1865:
> IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchAction,
> On 2013/11/19 22:14:59, Rick Byers wrote:
> > On 2013/11/18 15:56:00, jdduke wrote:
> > >
> > > Could we make this an InputHostMsg and put in
> > > content/common/input/input_messages.h?
> >
> > Done. I saw this as similar to ViewHostMsg_HasTouchEventHandlers - wasn't
> sure
> > why that was a ViewHostMsg. I could move it here too if you like.
>
> Ah, you're right of course. I've been meaning to change that, but as long as
we
> already handle ViewHostMsg types in the router I'm fine with either ViewHost
or
> InputHost prefixes.
I think InputHost is the right place, so I'll leave it there. But I'll avoid
polluting this CL with the unrelated change to move HasTouchEventHandlers. I
can do that in another CL though.
I've made all the changes I anticipate as a result of the blink side review. Do
you guys have any other feedback?
On 2013/11/20 00:35:22, jdduke wrote:
> https://codereview.chromium.org/67383002/diff/1/content/common/view_messages.h
> File content/common/view_messages.h (right):
>
>
https://codereview.chromium.org/67383002/diff/1/content/common/view_messages....
> content/common/view_messages.h:1865:
> IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTouchAction,
> On 2013/11/19 22:14:59, Rick Byers wrote:
> > On 2013/11/18 15:56:00, jdduke wrote:
> > >
> > > Could we make this an InputHostMsg and put in
> > > content/common/input/input_messages.h?
> >
> > Done. I saw this as similar to ViewHostMsg_HasTouchEventHandlers - wasn't
> sure
> > why that was a ViewHostMsg. I could move it here too if you like.
>
> Ah, you're right of course. I've been meaning to change that, but as long as
we
> already handle ViewHostMsg types in the router I'm fine with either ViewHost
or
> InputHost prefixes.
I think InputHost is the right place, so I'll leave it there. But I'll avoid
polluting this CL with the unrelated change to move HasTouchEventHandlers. I
can do that in another CL though.
I've made all the changes I anticipate as a result of the blink side review. Do
you guys have any other feedback?
jdduke (slow)
lgtm with a few nits, sadrul@ will probably also want to weigh in here. The ...
On 2013/11/20 23:03:02, jdduke wrote:
> lgtm with a few nits, sadrul@ will probably also want to weigh in here.
>
> The one question I have is w.r.t. security (or maybe just user experience).
If
> the renderer is able to arbitrarily disable scrolling, that could leave the
top
> controls in a permanently hidden state on Android... Now, we have that problem
> already with certain sites, but can you see this posing a risk? I haven't
really
> though through it.
>
Nevermind, the renderer can already do this by consuming TouchEvents after a
scroll, so this isn't really any added risk.
sadrul
LGTM https://codereview.chromium.org/67383002/diff/350001/content/browser/renderer_host/input/immediate_input_router.cc File content/browser/renderer_host/input/immediate_input_router.cc (right): https://codereview.chromium.org/67383002/diff/350001/content/browser/renderer_host/input/immediate_input_router.cc#newcode485 content/browser/renderer_host/input/immediate_input_router.cc:485: // Synthetic touchsstart events should get filtered out ...
7 years, 1 month ago
(2013-11-20 23:28:30 UTC)
#10
LGTM+nit https://codereview.chromium.org/67383002/diff/490001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/67383002/diff/490001/content/renderer/render_widget.cc#newcode2809 content/renderer/render_widget.cc:2809: NOTREACHED(); nit: remove default case to get a ...
7 years, 1 month ago
(2013-11-21 05:16:27 UTC)
#12
7 years, 1 month ago
(2013-11-21 22:34:04 UTC)
#13
Thanks Antoine.
https://codereview.chromium.org/67383002/diff/490001/content/renderer/render_...
File content/renderer/render_widget.cc (right):
https://codereview.chromium.org/67383002/diff/490001/content/renderer/render_...
content/renderer/render_widget.cc:2809: NOTREACHED();
On 2013/11/21 05:16:27, piman wrote:
> nit: remove default case to get a compile-time warning instead of a run-time
> one, if the enum changes.
That would make it extremely painful to extend the blink API. My next step is
to add some more values to the enum. If we compile-time-asserted in chromium
then we'd have no way to add values to the definition in blink (other than
create a new enum and APIs that use it and migrate over). I can avoid actually
sending the new values at runtime though until the chromium side has been
updated to use them.
Sigh - can't wait until blink and chromium are in the same tree ;-)
piman
On Thu, Nov 21, 2013 at 2:34 PM, <rbyers@chromium.org> wrote: > Thanks Antoine. > > ...
7 years, 1 month ago
(2013-11-21 22:56:33 UTC)
#14
On Thu, Nov 21, 2013 at 2:34 PM, <rbyers@chromium.org> wrote:
> Thanks Antoine.
>
>
>
> https://codereview.chromium.org/67383002/diff/490001/
> content/renderer/render_widget.cc
> File content/renderer/render_widget.cc (right):
>
> https://codereview.chromium.org/67383002/diff/490001/
> content/renderer/render_widget.cc#newcode2809
> content/renderer/render_widget.cc:2809: NOTREACHED();
> On 2013/11/21 05:16:27, piman wrote:
>
>> nit: remove default case to get a compile-time warning instead of a
>>
> run-time
>
>> one, if the enum changes.
>>
>
> That would make it extremely painful to extend the blink API. My next
> step is to add some more values to the enum. If we
> compile-time-asserted in chromium then we'd have no way to add values to
> the definition in blink (other than create a new enum and APIs that use
> it and migrate over). I can avoid actually sending the new values at
> runtime though until the chromium side has been updated to use them.
>
I see - sort of like default implementations for webkit embedder APIs. LGTM
as is, with the promise to clean up once we merged the repos.
>
> Sigh - can't wait until blink and chromium are in the same tree ;-)
>
> https://codereview.chromium.org/67383002/
>
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.
kenrb
lgtm
7 years, 1 month ago
(2013-11-22 19:00:13 UTC)
#15
lgtm
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rbyers@chromium.org/67383002/600001
Issue 67383002: Initial browser-side implementation for touch-action
(Closed)
Created 7 years, 1 month ago by Rick Byers
Modified 7 years ago
Reviewers: sadrul, jdduke (slow), kenrb, piman
Base URL: svn://svn.chromium.org/chrome/trunk/src
Comments: 39