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

Side by Side Diff: LayoutTests/compositing/gestures/gesture-tapHighlight-on-promoted-overflow-div-scrolled.html

Issue 490783003: Reduce hit test on ShowPress by moving event targeting to WebViewImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switch back to using platform event position for content intents Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/events/hit-test-counts-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style. css"> 4 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style. css">
5 <script src="resources/link-highlight-helper.js"></script> 5 <script src="resources/link-highlight-helper.js"></script>
6 <script> 6 <script>
7 useMockHighlight(); 7 useMockHighlight();
8 if (window.internals) 8 if (window.internals)
9 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); 9 window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
10 10
11 function runTest() { 11 function runTest() {
12 var targetDiv = document.getElementById('targetDiv'); 12 var targetDiv = document.getElementById('targetDiv');
13 var resultDiv = document.getElementById('result'); 13 var resultDiv = document.getElementById('result');
14 14
15 if (window.internals) 15 if (window.internals)
16 window.internals.forceCompositingUpdate(document); 16 window.internals.forceCompositingUpdate(document);
17 17
18 var clientRect = document.getElementById('targetLink').getBoundingClient Rect(); 18 var clientRect = document.getElementById('targetLink').getBoundingClient Rect();
19 x = (clientRect.left + clientRect.right) / 2; 19 x = (clientRect.left + clientRect.right) / 2;
20 y = (clientRect.top + clientRect.bottom) / 2; 20 y = (clientRect.top + clientRect.bottom) / 2;
21 if (window.testRunner) { 21 if (window.testRunner) {
22 testRunner.dumpAsTextWithPixelResults(); 22 testRunner.dumpAsTextWithPixelResults();
23 testRunner.waitUntilDone(); 23 testRunner.waitUntilDone();
24 } 24 }
25 25
26 if (window.eventSender) { 26 if (window.eventSender) {
27 eventSender.gestureShowPress(x, y); 27 eventSender.gestureShowPress(x, y);
28 // FIXME: This is needed to make link highlighting work by marking pai nt as dirty. crbug.com/415702
29 document.querySelector("#targetLink").style.color = "red";
28 targetDiv.scrollTop += 20; 30 targetDiv.scrollTop += 20;
29 window.setTimeout(function() { window.testRunner.notifyDone(); }, 30); 31 window.setTimeout(function() { window.testRunner.notifyDone(); }, 30);
30 } else { 32 } else {
31 debug("This test requires DumpRenderTree."); 33 debug("This test requires DumpRenderTree.");
32 } 34 }
33 } 35 }
34 </script> 36 </script>
35 </head> 37 </head>
36 <body onload="runTest();"> 38 <body onload="runTest();">
37 <div style="-webkit-transform: translateZ(0); position: relative; left: 10px ; top: 10px"></div> 39 <div style="-webkit-transform: translateZ(0); position: relative; left: 10px ; top: 10px"></div>
38 <div id="targetDiv" style="position: relative; left: 10px; top: 40px; width: 200px; height: 100px; overflow-y: scroll; overflow-x: scroll;"> 40 <div id="targetDiv" style="position: relative; left: 10px; top: 40px; width: 200px; height: 100px; overflow-y: scroll; overflow-x: scroll;">
39 <a href="">Link 1</a><br> 41 <a href="">Link 1</a><br>
40 <a href="">Link 2</a><br> 42 <a href="">Link 2</a><br>
41 <a href="">Link 3</a><br> 43 <a href="">Link 3</a><br>
42 <a class="opaqueHighlight" href="" id="targetLink">Target Link.</a><br> 44 <a class="opaqueHighlight" href="" id="targetLink">Target Link.</a><br>
43 <a href="">Link 4</a><br> 45 <a href="">Link 4</a><br>
44 <a href="">Link 5</a><br> 46 <a href="">Link 5</a><br>
45 </div> 47 </div>
46 <div style="position: relative; left: 10px; top: 80px"> 48 <div style="position: relative; left: 10px; top: 80px">
47 This test is successful if "Target Link" above is covered in a green 49 This test is successful if "Target Link" above is covered in a green
48 rectangle with square corners and the list is partially scrolled. 50 rectangle with square corners and the list is partially scrolled.
49 </div> 51 </div>
50 <div id="result"></div> 52 <div id="result"></div>
51 </body> 53 </body>
52 </html> 54 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/hit-test-counts-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698