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

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

Issue 587543004: Revert of Reduce hit test on ShowPress by moving event targeting to WebViewImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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";
30 targetDiv.scrollTop += 20; 28 targetDiv.scrollTop += 20;
31 window.setTimeout(function() { window.testRunner.notifyDone(); }, 30); 29 window.setTimeout(function() { window.testRunner.notifyDone(); }, 30);
32 } else { 30 } else {
33 debug("This test requires DumpRenderTree."); 31 debug("This test requires DumpRenderTree.");
34 } 32 }
35 } 33 }
36 </script> 34 </script>
37 </head> 35 </head>
38 <body onload="runTest();"> 36 <body onload="runTest();">
39 <div style="-webkit-transform: translateZ(0); position: relative; left: 10px ; top: 10px"></div> 37 <div style="-webkit-transform: translateZ(0); position: relative; left: 10px ; top: 10px"></div>
40 <div id="targetDiv" style="position: relative; left: 10px; top: 40px; width: 200px; height: 100px; overflow-y: scroll; overflow-x: scroll;"> 38 <div id="targetDiv" style="position: relative; left: 10px; top: 40px; width: 200px; height: 100px; overflow-y: scroll; overflow-x: scroll;">
41 <a href="">Link 1</a><br> 39 <a href="">Link 1</a><br>
42 <a href="">Link 2</a><br> 40 <a href="">Link 2</a><br>
43 <a href="">Link 3</a><br> 41 <a href="">Link 3</a><br>
44 <a class="opaqueHighlight" href="" id="targetLink">Target Link.</a><br> 42 <a class="opaqueHighlight" href="" id="targetLink">Target Link.</a><br>
45 <a href="">Link 4</a><br> 43 <a href="">Link 4</a><br>
46 <a href="">Link 5</a><br> 44 <a href="">Link 5</a><br>
47 </div> 45 </div>
48 <div style="position: relative; left: 10px; top: 80px"> 46 <div style="position: relative; left: 10px; top: 80px">
49 This test is successful if "Target Link" above is covered in a green 47 This test is successful if "Target Link" above is covered in a green
50 rectangle with square corners and the list is partially scrolled. 48 rectangle with square corners and the list is partially scrolled.
51 </div> 49 </div>
52 <div id="result"></div> 50 <div id="result"></div>
53 </body> 51 </body>
54 </html> 52 </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