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

Side by Side Diff: LayoutTests/fast/dom/nodesFromRect/nodesFromRect-links-and-text.html

Issue 685963002: We need to account for culled inline parents of the hit-tested nodes.(Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 <title>Document::nodesFromRect : basic text nodes and links test - bug 47795</ title> 4 <title>Document::nodesFromRect : basic text nodes and links test - bug 47795</ title>
5 <style type="text/css"> @import "resources/nodesFromRect.css"; </style> 5 <style type="text/css"> @import "resources/nodesFromRect.css"; </style>
6 <script src="../../../resources/js-test.js"></script> 6 <script src="../../../resources/js-test.js"></script>
7 <script src="resources/nodesFromRect.js"></script> 7 <script src="resources/nodesFromRect.js"></script>
8 <script type="application/javascript"> 8 <script type="application/javascript">
9 function runTest() 9 function runTest()
10 { 10 {
(...skipping 11 matching lines...) Expand all
22 var centerA1 = getCenterFor(e.a1); 22 var centerA1 = getCenterFor(e.a1);
23 var centerA2 = getCenterFor(e.a2); 23 var centerA2 = getCenterFor(e.a2);
24 var centerA3 = getCenterFor(e.a3); 24 var centerA3 = getCenterFor(e.a3);
25 var topP1 = getTopFor(e.p1); 25 var topP1 = getTopFor(e.p1);
26 var topA1 = getTopFor(e.a1); 26 var topA1 = getTopFor(e.a1);
27 var centerText = { x : (centerA2.x + centerA1.x) / 2, y : centerA1.y }; // text node between a1 and a2 27 var centerText = { x : (centerA2.x + centerA1.x) / 2, y : centerA1.y }; // text node between a1 and a2
28 28
29 check(centerA1.x, centerA1.y, 0, 0, 0, 0, [e.a1.firstChild]); 29 check(centerA1.x, centerA1.y, 0, 0, 0, 0, [e.a1.firstChild]);
30 check(centerA1.x, centerA1.y, topA1.y - topP1.y, 0, 0, 0, [e.a1.firstChild , e.a1, e.p1]); 30 check(centerA1.x, centerA1.y, topA1.y - topP1.y, 0, 0, 0, [e.a1.firstChild , e.a1, e.p1]);
31 31
32 check(centerA1.x, centerA1.y, 0, 0, centerA3.y - centerA1.y, 0, [e.a3.firs tChild, e.a3, e.p1, e.a1.firstChild, e.a1]); 32 check(centerA1.x, centerA1.y, 0, 0, centerA3.y - centerA1.y, 0, [e.a3.firs tChild, e.a3, e.a1, e.p1, e.a1.firstChild]);
33 check(centerA1.x, centerA1.y, 0, centerText.x - centerA1.x, 0, 0, [e.p1.ch ildNodes[2], e.a1.firstChild, e.a1, e.p1]); 33 check(centerA1.x, centerA1.y, 0, centerText.x - centerA1.x, 0, 0, [e.p1.ch ildNodes[2], e.a1.firstChild, e.a1, e.p1]);
34 check(centerA1.x, centerA1.y, 0, centerA2.x - centerA1.x, 0, 0, [e.a2.firs tChild, e.a2, e.p1.childNodes[2], e.a1.firstChild, e.a1, e.p1]); 34 check(centerA1.x, centerA1.y, 0, centerA2.x - centerA1.x, 0, 0, [e.a2.firs tChild, e.a2, e.p1.childNodes[2], e.a1.firstChild, e.a1, e.p1]);
35 check(centerA1.x, centerA1.y, 0, centerA2.x - centerA1.x, centerA3.y - cen terA1.y, 0, [e.a3.firstChild, e.a3, e.p1, e.a2.firstChild, e.a2, e.p1.childNodes [2], e.a1.firstChild, e.a1]); 35 check(centerA1.x, centerA1.y, 0, centerA2.x - centerA1.x, centerA3.y - cen terA1.y, 0, [e.a3.firstChild, e.a3, e.a2, e.a1, e.p1, e.a2.firstChild, e.p1.chil dNodes[2], e.a1.firstChild]);
36 36
37 } 37 }
38 window.onload = runTest; 38 window.onload = runTest;
39 </script> 39 </script>
40 </head> 40 </head>
41 <body id="body"> 41 <body id="body">
42 <p id="p1"> 42 <p id="p1">
43 <a href="#" id="a1">A</a> / <a href="#" id="a2">B</a><br/><a href="#" id="a3 ">C</a> 43 <a href="#" id="a1">A</a> / <a href="#" id="a2">B</a><br/><a href="#" id="a3 ">C</a>
44 </p> 44 </p>
45 45
46 <span id="console"></span> 46 <span id="console"></span>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698