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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/touch/resources/compositor-touch-hit-rects-iframe-doc.html

Issue 2127163002: Limit PassiveDocumentEventListeners to touch and make it experimental (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="stylesheet" href="compositor-touch-hit-rects.css"> 4 <link rel="stylesheet" href="compositor-touch-hit-rects.css">
5 <style> 5 <style>
6 html { 6 html {
7 font-size: 10px; 7 font-size: 10px;
8 } 8 }
9 #tests { 9 #tests {
10 /* Make sure the html/body nodes have 0 height */ 10 /* Make sure the html/body nodes have 0 height */
11 position: absolute; 11 position: absolute;
12 } 12 }
13 </style> 13 </style>
14 </head> 14 </head>
15 <body> 15 <body>
16 <div id='tests'> 16 <div id='tests'>
17 Document with touch handlers. 17 Document with touch handlers.
18 <br><br> 18 <br><br>
19 <br><br><br> 19 <br><br><br>
20 </div> 20 </div>
21 <script> 21 <script>
22 if (window.testRunner) 22 if (window.testRunner)
23 document.documentElement.setAttribute('dumpRenderTree', 'true'); 23 document.documentElement.setAttribute('dumpRenderTree', 'true');
24 24
25 function handler() {}; 25 function handler() {};
26 frameElement.addHandlers = function() { 26 frameElement.addHandlers = function() {
27 document.addEventListener('touchstart', handler, false); 27 document.addEventListener('touchstart', handler, {passive: false});
28 } 28 }
29 frameElement.removeHandlers = function() { 29 frameElement.removeHandlers = function() {
30 document.removeEventListener('touchstart', handler, false); 30 document.removeEventListener('touchstart', handler, false);
31 } 31 }
32 </script> 32 </script>
33 33
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698