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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text.html

Issue 1394833002: Find In Page doesn't correctly highlight wrapped text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/ahem.js"></script>
3 <script src="../../resources/run-after-layout-and-paint.js"></script>
4 <pre id="demo" style="font-family: Ahem; width: 2em; white-space: pre-wrap">a b </pre>
5 <p>Test for crbug.com/521047. Passes if find-in-page marker highlight is visible in both lines above.
6 <script>
7 function highlightRange(id, start, end, active) {
8 var range = document.createRange();
9 var elem = document.getElementById(id).firstChild;
10 range.setStart(elem, start);
11 range.setEnd(elem, end);
12 if (window.internals) {
13 window.internals.addTextMatchMarker(range, active);
14 window.internals.setMarkedTextMatchesAreHighlighted(document, true);
15 }
16 }
17
18 runAfterLayoutAndPaint(function() {
19 highlightRange('demo', 0, 4, true);
20 }, true);
21 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/repaint/text-match-pre-wrapped-text-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698