fune/testing/web-platform/tests/selection
Masayuki Nakano 022eb9e926 Bug 1897255 - Make nsIFrame::PeekOffsetForLine won't cross editing host boundary unless the callers allows that r=emilio, a=dmeehan
The problems in the testcase are, `nsIFrame::PeekOffsetForLine` returns a frame
for any content node outside the editing host and `nsIFrame::GetLastLeaf`
returns a native anonymous subtree node if the frame is for the native
anonymous subtree root like `<input>` or `<textarea>`.

For fixing the former, the methods need to check whether found frame's editable
state **and** whether the editable node is an inclusive descendant of the
editing host.  However, there are complicated cases with inline editing hosts
and elements whose `contenteditable` is set to `false` and this is a new
regression for ESR 128.  Therefore, we need to fix this without any behavior
changes as far as possible.  Therefore, this patch basically checks only whether
the editing state of found one is editable and/or whether the one is an
inclusive descendant of the editing host to avoid `Selection` moves outside the
editing host.  The reaming complicated cases should be handled in new bugs which
blocks bug 1873155.

For fixing the latter, `nsIFrame::GetLastLeaf` needs to check the given frame's
content is a native anonymous subtree root or not.

Differential Revision: https://phabricator.services.mozilla.com/D216371
2024-07-19 08:13:10 +00:00
..
anonymous
bidi
caret
contenteditable Bug 1878273 - Make Shift + right click should work as a right click without Shift if contextmenu should forcibly be open r=emilio 2024-02-12 01:42:34 +00:00
crashtests Bug 1897255 - Make nsIFrame::PeekOffsetForLine won't cross editing host boundary unless the callers allows that r=emilio, a=dmeehan 2024-07-19 08:13:10 +00:00
shadow-dom Bug 1891783 - Fix two more bugs in ShadowDOM Selection r=jjaschke,smaug,dom-core 2024-05-13 20:24:04 +00:00
textcontrols Bug 1885722 [wpt PR 45145] - Coalesce selectionchange events per https://github.com/w3c/selection-api/issues/170, a=testonly 2024-03-27 10:30:15 +00:00
addRange-00.html
addRange-04.html
addRange-08.html
addRange-12.html
addRange-16.html
addRange-20.html
addRange-24.html
addRange-28.html
addRange-32.html
addRange-36.html
addRange-40.html
addRange-44.html
addRange-48.html
addRange-52.html
addRange-56.html
addRange.htm
addRange.js
addRange.tentative.html
collapse-00.html
collapse-15.html
collapse-30.html
collapse-45.html
collapse.htm
collapse.js
collapseToStartEnd.html
common.js
deleteFromDocument.html
dir-manual.html
Document-open.html
drag-disabled-textarea-shadow-dom.html
extend-00.html
extend-20.html
extend-40.html
extend-exception.html
extend.js
getRangeAt.html
getSelection.html
idlharness.window.js
isCollapsed.html
META.yml
modify-extend-word-trailing-inline-block.tentative.html
modify-line-flex-column.tentative.html
modify-line-flex-row.tentative.html
modify-line-grid-basic.tentative.html
modify.tentative.html
move-selection-range-into-different-root.tentative.html Bug 1878191 - Make nsRange delete itself from Selections if it becomes a range in different root r=smaug,jjaschke,dom-core 2024-02-07 04:34:37 +00:00
onselectionchange-on-distinct-text-controls.html Bug 1885722 [wpt PR 45145] - Coalesce selectionchange events per https://github.com/w3c/selection-api/issues/170, a=testonly 2024-03-27 10:30:15 +00:00
onselectionchange-on-document.html Bug 1885722 [wpt PR 45145] - Coalesce selectionchange events per https://github.com/w3c/selection-api/issues/170, a=testonly 2024-03-27 10:30:15 +00:00
removeAllRanges.html
removeRange.html
script-and-style-elements.html
select-end-of-line-image.tentative.html
selectAllChildren.html
selection-nested-video.html Bug 1887963 - Fix a bug where the commonAncestor could be null when range boundaries are not in flat tree. r=smaug 2024-04-03 20:15:40 +00:00
selection-range-after-editinghost-removed.html Bug 1883802 - Make ShadowRoot notify mutation observers of "parent chain changed" r=smaug 2024-03-11 23:46:58 +00:00
selection-range-after-textcontrol-removed.html Bug 1883802 - Make ShadowRoot notify mutation observers of "parent chain changed" r=smaug 2024-03-11 23:46:58 +00:00
selection-range-in-shadow-after-the-shadow-removed.tentative.html Bug 1883802 - Make ShadowRoot notify mutation observers of "parent chain changed" r=smaug 2024-03-11 23:46:58 +00:00
selection-select-all-move-input-crash.html
selection-shadow-dom-crash-print.html
setBaseAndExtent.html
stringifier.tentative.html
test-iframe.html
toString-ff-bug-001.html
type.html
user-select-on-input-and-contenteditable.html