github web-platform-tests/wpt merge_pr_46863

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
6 months ago

Move the caret by paragraph granularity should cross editing boundary

Consider this test case:

P1

Paragraph 1: Hello World Test\n Paragraph 2: Hello World|

The expected behavior of `selection.modify('move', 'backward', 'paragraph')` is to move the caret to the end of p#one. But due to the presence of the non-editable node, the behavior looks like "line" granularity.

Next/PreviousParagraphPosition calls
Next/PreviousLinePosition to get the specified position until
it is no longer in the same paragraph. But InSameParagraph
does not allow cross EditingBoundary, so when there is
a non-editable node, the behavior is similar to the line.

Firefox doesn't implement paragraph, so a tentative test is added.

Bug: 326554272
Change-Id: I68115cebe3bc3845a3dfe29ef56c6a5c8f1f9969
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5319076
Reviewed-by: Koji Ishii kojii@chromium.org
Reviewed-by: Kent Tamura tkent@chromium.org
Commit-Queue: Peng Zhou zhoupeng.1996@bytedance.com
Cr-Commit-Position: refs/heads/main@{#1317952}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.