Bug 251020 - Update Position member variables in FrameSelection after Text::splitText()
Summary: Update Position member variables in FrameSelection after Text::splitText()
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-23 09:44 PST by Ahmad Saleem
Modified: 2024-06-05 16:22 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-01-23 09:44:48 PST
Hi Team,

While going through Blink's commit, I came across following failing test case in Safari 16.2 & STP161:

Test Case - https://jsfiddle.net/cq243gao/show

^ Both Chrome Canary 111 and Firefox Nightly 111 passes this.

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/247377b029a93bad78e778aa1e55127a69638384

Don't know whether it is possible to merge 1-1 or Selection API changes will fix it or not but just wanted to raise it for tracking purposes.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-01-30 09:45:19 PST
<rdar://problem/104824715>
Comment 2 Ahmad Saleem 2023-02-02 04:12:51 PST
(In reply to Ahmad Saleem from comment #0)
> Hi Team,
> 
> While going through Blink's commit, I came across following failing test
> case in Safari 16.2 & STP161:
> 
> Test Case - https://jsfiddle.net/cq243gao/show
> 
> ^ Both Chrome Canary 111 and Firefox Nightly 111 passes this.
> 
> Blink Commit -
> https://chromium.googlesource.com/chromium/blink/+/
> 247377b029a93bad78e778aa1e55127a69638384
> 
> Don't know whether it is possible to merge 1-1 or Selection API changes will
> fix it or not but just wanted to raise it for tracking purposes.
> 
> Thanks!

Just to update, I checked on WebKit Trunk (259707@main), it still fails with Live Range and show following:

PASS selection.type is "Range"
FAIL selection.anchorNode should be [object Text]. Was [object Text].
FAIL selection.anchorOffset should be 3. Was 6.
FAIL selection.focusNode should be [object Text]. Was [object Text].
FAIL selection.focusOffset should be 6. Was 9.
FAIL selection.toString() should be baz. Was .
PASS successfullyParsed is true
Some tests failed.

TEST COMPLETE