github web-platform-tests/wpt merge_pr_48546

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

Use selection focus for caret position while navigating using arrow keys

While moving cursor up and down, the cursor should come exactly above
and below the previous position respectively. Currently the cursor
position is not correct in these scenarios since we pass
|selection_.Start()| to calculate the x position while editing, instead
we should pass |selection_.Focus()| since focus will be having the last
position of the caret. This change is Firefox compatible.

Updated some existing web_tests that were using selection modifier and
after this CL, the caret position is now changed so these web_tests
needed to adhere to the updated caret positioning.

Updated tests:
web_tests/editing/pasteboard/paste-list-002.html
web_tests/editing/pasteboard/paste-list-003.html
web_tests/editing/pasteboard/paste-list-004.html
web_tests/editing/selection/move-3875618-fix.html
web_tests/editing/inserting/insert-3786362-fix-expected.txt

Bug: 40658856
Change-Id: Id6f00889621003072d7f88bcc00d10f8318ad8f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5804495
Reviewed-by: Siye Liu siliu@microsoft.com
Reviewed-by: Kent Tamura tkent@chromium.org
Commit-Queue: Utkarsh Pathak utpathak@microsoft.com
Reviewed-by: Sanket Joshi sajos@microsoft.com
Cr-Commit-Position: refs/heads/main@{#1368113}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.