Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML> | |
| 2 <script src="../../resources/ahem.js"></script> | |
| 3 <script> | |
| 4 function highlightRange(id, start, end, active) { | |
|
pdr.
2015/12/01 23:58:48
Indent 4, or 2, but not both.
ramya.v
2015/12/10 09:39:37
Done.
| |
| 5 var range = document.createRange(); | |
| 6 var elem = document.getElementById(id).firstChild; | |
| 7 range.setStart(elem, start); | |
| 8 range.setEnd(elem, end); | |
| 9 window.internals.addTextMatchMarker(range, active); | |
| 10 window.internals.setMarkedTextMatchesAreHighlighted(document, true); | |
| 11 } | |
| 12 function highlightTest() { | |
| 13 highlightRange('1', 2, 5, true); | |
| 14 } | |
| 15 </script> | |
| 16 | |
| 17 <body onload="highlightTest()"> | |
| 18 Test for crbug.com/512354 | |
| 19 <p>Find In Page: The below text "ndM" from findMe should be highlighted as orang e and painted as black</p> | |
| 20 <span id="1" style="font-family: Ahem; font-size: 20px; color:#FF9632">findMe</s pan> | |
| 21 </body> | |
| OLD | NEW |