Bug 251020

Summary: Update Position member variables in FrameSelection after Text::splitText()
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=275185

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