OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <script src="../../fast/../resources/ahem.js"></script> | 2 <script src="../../fast/../resources/ahem.js"></script> |
3 <script> | 3 <script> |
4 function highlightRange(id, start, end, active) { | 4 function highlightRange(id, start, end, active) { |
5 var range = document.createRange(); | 5 var range = document.createRange(); |
6 var elem = document.getElementById(id).firstChild; | 6 var elem = document.getElementById(id).firstChild; |
7 range.setStart(elem, start); | 7 range.setStart(elem, start); |
8 range.setEnd(elem, end); | 8 range.setEnd(elem, end); |
9 window.internals.addTextMatchMarker(range, active); | 9 window.internals.addTextMatchMarker(range, active); |
10 window.internals.setMarkedTextMatchesAreHighlighted(document, true); | 10 window.internals.setMarkedTextMatchesAreHighlighted(document, true); |
11 } | 11 } |
12 function highlightTest() { | 12 function highlightTest() { |
13 highlightRange('1', 2, 5, true); | 13 highlightRange('1', 2, 5, 'kActive'); |
14 } | 14 } |
15 </script> | 15 </script> |
16 | 16 |
17 <body onload="highlightTest()"> | 17 <body onload="highlightTest()"> |
18 Test for crbug.com/512354 | 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> | 19 <p>Find In Page: The below text "ndM" from findMe should be highlighted as orang
e and painted as black</p> |
20 <svg width="300px" height="100px"> | 20 <svg width="300px" height="100px"> |
21 <text id="1" x="0" y="16" style="font-family: Ahem; font-size: 20px; fill:#FF9
632;">findMe</text> | 21 <text id="1" x="0" y="16" style="font-family: Ahem; font-size: 20px; fill:#FF9
632;">findMe</text> |
22 </svg> | 22 </svg> |
23 </body> | 23 </body> |
OLD | NEW |