| Index: LayoutTests/editing/selection/select-first-letter.html
|
| diff --git a/LayoutTests/editing/selection/select-first-letter.html b/LayoutTests/editing/selection/select-first-letter.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9ac9221e583855911053784d5116adb2196e781c
|
| --- /dev/null
|
| +++ b/LayoutTests/editing/selection/select-first-letter.html
|
| @@ -0,0 +1,20 @@
|
| +<head>
|
| +<style>
|
| +p:first-letter {
|
| + color: red;
|
| +}
|
| +</style>
|
| +</head>
|
| +<body>
|
| +<p>All text are selected.</p>
|
| +<div id="output"></div>
|
| +</body>
|
| +<script>
|
| +var range = document.createRange();
|
| +range.selectNode(document.querySelector('p'));
|
| +range.startContainer.focus();
|
| +var selection = window.getSelection();
|
| +selection.removeAllRanges();
|
| +selection.addRange(range);
|
| +document.getElementById('output').textContent = selection.anchorOffset + ' ' + selection.focusOffset
|
| +</script>
|
|
|