Files
sousa-gecko/testing/web-platform/mozilla/tests/selection/select-unselectable-img.html
T
Masayuki Nakano c6a0e55250 Bug 2000978 - Rewrite AccessibleCaretManager::GetFrameForRange(Start|End) r=TYLin,layout-reviewers
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
2025-12-15 07:53:02 +00:00

17 lines
446 B
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="match" href="select-unselectable-img-ref.html">
</head>
<body>
<div><img
style="user-select:none;width:100px;height:100px"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAE0lEQVR4nGNk+M+ADJgYGCjiAwBPkgEJOTC6CgAAAABJRU5ErkJggg=="
></div>
<script>
getSelection().selectAllChildren(document.querySelector("div"));
</script>
</body>
</html>