Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/paint/text/text-match-highlights-big-line-height.html |
| diff --git a/third_party/WebKit/LayoutTests/paint/text/text-match-highlights-big-line-height.html b/third_party/WebKit/LayoutTests/paint/text/text-match-highlights-big-line-height.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..45d6f255770fbd7a5cfbf0d282cfc8e90b8860f4 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/paint/text/text-match-highlights-big-line-height.html |
| @@ -0,0 +1,26 @@ |
| +<!DOCTYPE html> |
| +Text match highlight should not extend into the line spacing. |
| +<div style="line-height: 30px; font-size: 15px"> |
| +<br id='b1'>AAA |
| +</div> |
| + |
| +<div style="line-height: 30px; font-size: 15px; writing-mode: vertical-rl"> |
| +<br id='b2'>AAA |
| +</div> |
| + |
| +<script> |
| +function highlightRange(element, start, end, active) { |
| + var range = document.createRange(); |
| + range.setStart(element, start); |
| + range.setEnd(element, end); |
| + internals.addTextMatchMarker(range, active); |
| +} |
| + |
| +if (window.internals) { |
| + onload = function() { |
|
jbroman
2016/06/15 08:37:10
Is the execution of the onload handler guaranteed
Xianzhu
2016/06/15 16:40:48
Yes, layout test wait for finish of onload and tak
jbroman
2016/06/15 18:19:47
Ah yes, of course. I must have forgotten that it g
|
| + highlightRange(document.getElementById('b1').nextSibling, 0, 3, false); |
| + highlightRange(document.getElementById('b2').nextSibling, 0, 3, true); |
| + internals.setMarkedTextMatchesAreHighlighted(document, true); |
| + }; |
| +} |
| +</script> |