This patch makes `AccessibleCaretManager::GetFrameForRangeStart()` and `AccessibleCaretManager::GetFrameForRangeEnd()` use the new utility methods which are designed for them. These changes will fix the following cases: * the first/last container element in the range is completely invisible * the first/last leaf in the range is wrapped in an unselectable element These changes won't fix the following issue: * not supporting ranges across shadow DOM boundaries (bug 1607497) * not properly showing the carets if first/last range is collapsed Differential Revision: https://phabricator.services.mozilla.com/D274094
15 lines
394 B
HTML
15 lines
394 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<link rel="match" href="select-unselectable-span-1-ref.html">
|
|
</head>
|
|
<body>
|
|
<!-- Accessible carets should be put around the <span> having big padding -->
|
|
<div><span style="user-select:none;padding:100px">ABC</span></span></div>
|
|
<script>
|
|
getSelection().selectAllChildren(document.querySelector("div"));
|
|
</script>
|
|
</body>
|
|
</html>
|