| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>This tests that inline text selection on subpixel position does not leave gaps at the inline boundary.</title> | |
| <style> | |
| ::selection { | |
| background: rgba(255, 0, 0, 0.9); | |
| } | |
| body { | |
| margin: 0px; | |
| font-family: "Ahem"; | |
| color: rgba(255, 255, 255, 0); | |
| } | |
| div { | |
| font-size: 16px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div id=container> | |
| <div style="text-indent: 0.4px; margin-left: 0.1px;">foo</div> | |
| <div> </div><br> | |
| </div> | |
| <script> | |
| var range = document.createRange(); | |
| range.selectNode(document.getElementById("container")); | |
| window.getSelection().addRange(range); | |
| </script> | |
| </body> | |
| </html> |