OSDN Git Service

New WebView input dispatcher.
authorJeff Brown <jeffbrown@google.com>
Wed, 21 Mar 2012 18:50:06 +0000 (11:50 -0700)
committerJohn Reck <jreck@google.com>
Wed, 11 Apr 2012 22:10:24 +0000 (15:10 -0700)
commit9d3bdbd6b8f9eda5f67212b06185cd59adcda6c8
tree28bcb76885c486fa2b91ec41cd6bd831006f50a2
parent450c75a59bf510ef97bfc208ee7c7660fdb73afa
New WebView input dispatcher.

Bug: 6317798

Stuff that's better:

1. We maintain two queues in a way that ensures that WebView and
WebKit both see consistent streams of events, even in cases
where WebKit times out.  We send ACTION_CANCEL if necessary, etc.

2. All pointer events go through the same channel, including
hover and click ("touch up") events, to ensure correct ordering.

3. Given that the input events are in a separate queue, we can
force execution of all of these events whenever we like, making new
latency optimizations possible.

4. The entire history of each touch event is sent to the web
application to enable smoother interaction.

5. The web application may choose to intercept a touch event stream
at any time by issuing "prevent default".  Previously, it could only
prevent default on the initial down event.  The new behavior is more
standards compliant.

Change-Id: I42d2d045e7d44af7c54b29570f188b7400d91d4e
core/java/android/view/MotionEvent.java
core/java/android/webkit/WebViewClassic.java
core/java/android/webkit/WebViewCore.java
core/java/android/webkit/WebViewInputDispatcher.java [new file with mode: 0644]