Event.cancelable for touch (and I guess wheel) events indicates whether scrolling is blocked on the event. When scrolling isn't blocked (eg. async touchmove), we set cancelable to false. This is useful for measuring the scroll jank caused by handlers - eg. see http://rbyers.net/scroll-latency.html. When ALL listeners are passive (and so we're not blocking scrolling on the event), the event should get marked cancelable=false. See https://w3c.github.io/touch-events/#cancelability and https://dom.spec.whatwg.org/#observing-event-listeners.
Dave's working on this but I'm guessing it won't make the beta cut. Stable should be fine.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/afb8f54b782055923cadd711452c2448f3f7b5b4 commit afb8f54b782055923cadd711452c2448f3f7b5b4 Author: dtapuska <dtapuska@chromium.org> Date: Wed Apr 20 21:38:20 2016 Articulate the cancel behavior in the WebTouchEvent. Change the cancelable flag to be an enumeration so that we can determine if it is blocking or non-blocking and the reason. Wheel events will add this flag in a follow up CL. BUG= 601661 Review URL: https://codereview.chromium.org/1888163003 Cr-Commit-Position: refs/heads/master@{#388585} [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/components/test_runner/event_sender.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/browser/renderer_host/input/input_router_impl.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/browser/renderer_host/input/touch_emulator_unittest.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/browser/renderer_host/input/touch_event_queue.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/browser/renderer_host/input/touch_event_queue_unittest.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/common/input/web_input_event_traits.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/common/input/web_input_event_traits_unittest.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/common/input/web_touch_event_traits.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/renderer/input/input_event_filter_unittest.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/renderer/input/main_thread_event_queue.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/renderer/input/main_thread_event_queue_unittest.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/renderer/input/render_widget_input_handler.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/content/renderer/render_widget_unittest.cc [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/third_party/WebKit/Source/platform/PlatformEvent.h [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/third_party/WebKit/Source/platform/PlatformTouchEvent.h [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/third_party/WebKit/Source/web/WebInputEvent.cpp [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/third_party/WebKit/Source/web/WebInputEventConversion.cpp [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/third_party/WebKit/Source/web/tests/TouchActionTest.cpp [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/third_party/WebKit/public/web/WebInputEvent.h [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/tools/metrics/histograms/histograms.xml [modify] https://crrev.com/afb8f54b782055923cadd711452c2448f3f7b5b4/ui/events/blink/blink_event_util.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8050a57a2e31012caa7d0521a9be661491f8ef3d commit 8050a57a2e31012caa7d0521a9be661491f8ef3d Author: dtapuska <dtapuska@chromium.org> Date: Thu Apr 21 00:43:49 2016 Articulate the cancel behavior in WebMouseWheelEvent. Add a DispatchType to mouse wheel events; set the cancelable flag based on the dispatch type. This change is similar to the one done for touch events see https://codereview.chromium.org/1888163003/. BUG= 601661 Review URL: https://codereview.chromium.org/1894363004 Cr-Commit-Position: refs/heads/master@{#388643} [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/content/renderer/input/input_event_filter_unittest.cc [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/content/renderer/input/main_thread_event_queue.cc [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/content/renderer/input/main_thread_event_queue_unittest.cc [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/content/renderer/input/render_widget_input_handler.cc [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/third_party/WebKit/Source/core/events/WheelEvent.cpp [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/third_party/WebKit/Source/core/events/WheelEvent.h [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/third_party/WebKit/Source/platform/PlatformWheelEvent.h [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/third_party/WebKit/Source/web/WebInputEvent.cpp [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/third_party/WebKit/Source/web/WebInputEventConversion.cpp [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp [modify] https://crrev.com/8050a57a2e31012caa7d0521a9be661491f8ef3d/third_party/WebKit/public/web/WebInputEvent.h
Your change meets the bar and is auto-approved for M51 (branch: 2704)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d6939cf25aa552bc77692aabe894ba5ba0bd6de commit 0d6939cf25aa552bc77692aabe894ba5ba0bd6de Author: Dave Tapuska <dtapuska@chromium.org> Date: Fri Apr 22 13:54:21 2016 Articulate the cancel behavior in the WebTouchEvent. Change the cancelable flag to be an enumeration so that we can determine if it is blocking or non-blocking and the reason. Wheel events will add this flag in a follow up CL. BUG= 601661 Review URL: https://codereview.chromium.org/1888163003 Cr-Commit-Position: refs/heads/master@{#388585} (cherry picked from commit afb8f54b782055923cadd711452c2448f3f7b5b4) Review URL: https://codereview.chromium.org/1911373002 . Cr-Commit-Position: refs/branch-heads/2704@{#181} Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251} [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/components/test_runner/event_sender.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/browser/renderer_host/input/input_router_impl.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/browser/renderer_host/input/touch_emulator_unittest.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/browser/renderer_host/input/touch_event_queue.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/browser/renderer_host/input/touch_event_queue_unittest.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/common/input/web_input_event_traits.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/common/input/web_input_event_traits_unittest.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/common/input/web_touch_event_traits.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/renderer/input/input_event_filter_unittest.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/renderer/input/main_thread_event_queue.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/renderer/input/main_thread_event_queue_unittest.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/renderer/input/render_widget_input_handler.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/content/renderer/render_widget_unittest.cc [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/third_party/WebKit/Source/platform/PlatformEvent.h [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/third_party/WebKit/Source/platform/PlatformTouchEvent.h [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/third_party/WebKit/Source/web/WebInputEvent.cpp [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/third_party/WebKit/Source/web/WebInputEventConversion.cpp [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/third_party/WebKit/Source/web/tests/TouchActionTest.cpp [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/third_party/WebKit/public/web/WebInputEvent.h [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/tools/metrics/histograms/histograms.xml [modify] https://crrev.com/0d6939cf25aa552bc77692aabe894ba5ba0bd6de/ui/events/blink/blink_event_util.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0da211979aa69008d06680383c5f32f804ba632a commit 0da211979aa69008d06680383c5f32f804ba632a Author: Dave Tapuska <dtapuska@chromium.org> Date: Fri Apr 22 13:59:14 2016 Articulate the cancel behavior in WebMouseWheelEvent. Add a DispatchType to mouse wheel events; set the cancelable flag based on the dispatch type. This change is similar to the one done for touch events see https://codereview.chromium.org/1888163003/. BUG= 601661 Review URL: https://codereview.chromium.org/1894363004 Cr-Commit-Position: refs/heads/master@{#388643} (cherry picked from commit 8050a57a2e31012caa7d0521a9be661491f8ef3d) Review URL: https://codereview.chromium.org/1912153002 . Cr-Commit-Position: refs/branch-heads/2704@{#182} Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251} [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/content/renderer/input/input_event_filter_unittest.cc [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/content/renderer/input/main_thread_event_queue.cc [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/content/renderer/input/main_thread_event_queue_unittest.cc [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/content/renderer/input/render_widget_input_handler.cc [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/third_party/WebKit/Source/core/events/WheelEvent.cpp [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/third_party/WebKit/Source/core/events/WheelEvent.h [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/third_party/WebKit/Source/platform/PlatformWheelEvent.h [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/third_party/WebKit/Source/web/WebInputEvent.cpp [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/third_party/WebKit/Source/web/WebInputEventConversion.cpp [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp [modify] https://crrev.com/0da211979aa69008d06680383c5f32f804ba632a/third_party/WebKit/public/web/WebInputEvent.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3a9e709d7ff6ae4f2db9a8bd5556ab129539ff86 commit 3a9e709d7ff6ae4f2db9a8bd5556ab129539ff86 Author: Dave Tapuska <dtapuska@chromium.org> Date: Fri Apr 22 16:21:12 2016 [M51] Fix build with merge problem of change refs/branch-heads/2704@{#181} Remove dead code. BUG= 601661 (cherry picked from commit e60a138240398b337584baaf5800c6123e06189d) Review URL: https://codereview.chromium.org/1905403002 . Cr-Commit-Position: refs/branch-heads/2704@{#187} Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251} [modify] https://crrev.com/3a9e709d7ff6ae4f2db9a8bd5556ab129539ff86/content/browser/renderer_host/input/input_router_impl.cc
Comment 1 by rbyers@chromium.org
, Apr 8 2016