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

Side by Side Diff: LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-expected.html

Issue 129643002: Fix link highlights on links that contain images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>This test ensures all elements are highlighted in a multielement <a> when the text is clicked</title>
5 <script src="resources/link-highlight-helper.js"></script>
6 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css" >
7 </head>
8 <body onload="runTest();">
9 <div style="-webkit-transform: translateZ(0); padding: 20px;">
10 <a id="targetLink">
11 <font style="vertical-align: bottom" id="beforeTarget">Before Text</font>
12 <img id="imgTarget" width="320" height="240" src="resources/dice.png">
13 <font style="vertical-align: bottom" id="afterTarget">After Text</font>
14 </a>
15 </div>
16 <script>
17 function runTest() {
18 var beforeHighlight = createSquareCompositedHighlight(document.getElementByI d('beforeTarget'));
19 createSquareCompositedHighlight(document.getElementById('imgTarget'));
20 var afterHighlight = createSquareCompositedHighlight(document.getElementById ('afterTarget'));
21
22 // We need to simulate filling in the <a> tag's "line box". It's not really the line box, but
23 // to see what we're filling in, hover over the <a> tag in devtools. To do t his, we'll just
24 // strech the first highlight across the linebox to the end.
25 beforeHighlight.style.width = afterHighlight.offsetLeft +
26 afterHighlight.offsetWidth -
27 beforeHighlight.offsetLeft + "px";
28
29 if (window.testRunner)
30 testRunner.dumpAsTextWithPixelResults();
31 }
32 </script>
33 </script>
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698