Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../resources/ahem.js"></script> | 3 <script src="../../resources/ahem.js"></script> |
| 4 <style> | 4 <style> |
| 5 html { | 5 html { |
| 6 font: Ahem 10px; | 6 font: Ahem 10px; |
| 7 -webkit-font-smoothing: none; | 7 -webkit-font-smoothing: none; |
| 8 } | 8 } |
| 9 ::-webkit-scrollbar { | 9 ::-webkit-scrollbar { |
| 10 width: 13px; | 10 width: 13px; |
| 11 height: 13px; | 11 height: 13px; |
| 12 } | 12 } |
| 13 ::-webkit-scrollbar-track { | 13 ::-webkit-scrollbar-track { |
| 14 background-color:green; | 14 background-color:green; |
| 15 } | 15 } |
| 16 ::-webkit-scrollbar-thumb { | 16 ::-webkit-scrollbar-thumb { |
| 17 background-color:rgba(128, 128, 128, 0.8); /* Let tickmark shine through */ | 17 background-color:rgba(128, 128, 128, 0.8); /* Let tickmark shine through */ |
| 18 } | 18 } |
| 19 </style> | 19 </style> |
| 20 <script> | 20 <script> |
| 21 function highlight() | 21 function highlight() |
| 22 { | 22 { |
| 23 var range = document.createRange(); | 23 var range = document.createRange(); |
| 24 var elt = document.getElementById('elt'); | 24 var elt = document.getElementById('elt'); |
| 25 range.selectNodeContents(elt); | 25 range.selectNodeContents(elt); |
| 26 if (window.internals) { | 26 if (window.internals) { |
| 27 window.internals.addTextMatchMarker(range, true); | 27 window.internals.addTextMatchMarker(range, "Active"); |
|
Xiaocheng
2017/04/04 21:48:38
nit: use single quotes for JavaScript strings.
| |
| 28 } | 28 } |
| 29 if (window.testRunner) | 29 if (window.testRunner) |
| 30 testRunner.dumpAsTextWithPixelResults(); | 30 testRunner.dumpAsTextWithPixelResults(); |
| 31 } | 31 } |
| 32 </script> | 32 </script> |
| 33 </head> | 33 </head> |
| 34 <body onload="highlight();"> | 34 <body onload="highlight();"> |
| 35 | 35 |
| 36 <div style="height:600px"></div> | 36 <div style="height:600px"></div> |
| 37 <span id="elt" style="position:absolute; top:300px"> </span> | 37 <span id="elt" style="position:absolute; top:300px"> </span> |
| 38 | 38 |
| 39 </body> | 39 </body> |
| 40 </html> | 40 </html> |
| OLD | NEW |