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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-expected.html
diff --git a/LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-expected.html b/LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..87dec46754ca9a19b8eb0aae4face9605ec0c2e9
--- /dev/null
+++ b/LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-expected.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This test ensures all elements are highlighted in a multielement <a> when the text is clicked</title>
+<script src="resources/link-highlight-helper.js"></script>
+<link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
+</head>
+<body onload="runTest();">
+<div style="-webkit-transform: translateZ(0); padding: 20px;">
+ <a id="targetLink">
+ <font style="vertical-align: bottom" id="beforeTarget">Before Text</font>
+ <img id="imgTarget" width="320" height="240" src="resources/dice.png">
+ <font style="vertical-align: bottom" id="afterTarget">After Text</font>
+ </a>
+</div>
+<script>
+function runTest() {
+ var beforeHighlight = createSquareCompositedHighlight(document.getElementById('beforeTarget'));
+ createSquareCompositedHighlight(document.getElementById('imgTarget'));
+ var afterHighlight = createSquareCompositedHighlight(document.getElementById('afterTarget'));
+
+ // We need to simulate filling in the <a> tag's "line box". It's not really the line box, but
+ // to see what we're filling in, hover over the <a> tag in devtools. To do this, we'll just
+ // strech the first highlight across the linebox to the end.
+ beforeHighlight.style.width = afterHighlight.offsetLeft +
+ afterHighlight.offsetWidth -
+ beforeHighlight.offsetLeft + "px";
+
+ if (window.testRunner)
+ testRunner.dumpAsTextWithPixelResults();
+}
+</script>
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698