| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../js/resources/js-test-pre.js"></script> | |
| 5 <style> | |
| 6 span#container { | |
| 7 display: inline-block; /* clamp the width of the enclosing P to its contents
*/ | |
| 8 } | |
| 9 | |
| 10 div#flexbox { | |
| 11 -webkit-box-orient: vertical; | |
| 12 -webkit-line-clamp: 1; | |
| 13 display: -webkit-box; | |
| 14 overflow-y: hidden; | |
| 15 } | |
| 16 </style> | |
| 17 </head> | |
| 18 <body> | |
| 19 <span id="container"> | |
| 20 <div id="flexbox">line one<br>line two<a id="link" href="#" onclick="this.te
xtContent='clicked'">not clicked</a></div> | |
| 21 </span> | |
| 22 <script> | |
| 23 description('Test that links painted after the ellipsis of a flexbox using -webk
it-line-clamp is hit-testable.'); | |
| 24 | |
| 25 var divRect = document.getElementById("flexbox").getBoundingClientRect(); | |
| 26 var aRect = document.getElementById("link").getBoundingClientRect(); | |
| 27 var clickX = divRect.left + divRect.width - (aRect.width / 2); | |
| 28 var clickY = divRect.top + divRect.height - (aRect.height / 2); | |
| 29 | |
| 30 if (window.eventSender) { | |
| 31 eventSender.mouseMoveTo(clickX, clickY); | |
| 32 eventSender.mouseDown(); | |
| 33 eventSender.mouseUp(); | |
| 34 } | |
| 35 | |
| 36 shouldBeEqualToString("document.getElementsByTagName('a')[0].textContent", "clic
ked"); | |
| 37 </script> | |
| 38 <script src="../js/resources/js-test-post.js"></script> | |
| 39 </body> | |
| 40 </html> | |
| OLD | NEW |