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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects.js

Issue 1884863003: Non passive touch end or touch cancel listeners should not block scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects.js
diff --git a/third_party/WebKit/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects.js b/third_party/WebKit/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects.js
index a6c6e27d9f25ae4fc0f9b4dc9c5b922aec46a469..02cfeb7ad1cfc890c28debd714f6c97c4cba7e91 100644
--- a/third_party/WebKit/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects.js
+++ b/third_party/WebKit/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects.js
@@ -136,6 +136,12 @@ if (window.internals) {
window.onload = function() {
// Run each general test case.
var tests = document.querySelectorAll('.testcase');
+
+ // Add document wide touchend and touchcancel events to ensure they
+ // are not added to the compositor hit test rects.
tdresser 2016/04/13 16:52:35 Nit: we're adding listeners, not events. I'm a bi
dtapuska 2016/04/13 18:00:15 touchend and touchcancel use to be added to the hi
tdresser 2016/04/13 18:44:39 Ah, makes sense. Maybe reword "to ensure" to "and
dtapuska 2016/04/13 18:49:08 Done.
+ document.documentElement.addEventListener('touchend', listener, false);
+ document.documentElement.addEventListener('touchcancel', listener, false);
+
for ( var i = 0; i < tests.length; i++) {
// Force a compositing update before testing each case to ensure that
// any subsequent touch rect updates are actually done because of

Powered by Google App Engine
This is Rietveld 408576698