Bug 253198

Summary: Remove code in Editor::rangeOfString() that unnecessarily resets the searchRange after the first find operation
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: megan_gardner, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-03-01 15:28:39 PST
Hi Team,

I came across another dead-code removal from Blink's commit, which was added in WebKit with following commit:

WebKit Old Commit - http://trac.webkit.org/changeset/14782

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/857f2e42c139b277ed29cd8ae112cb4f1d6b5a90

WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/editing/Editor.cpp#3615

Just wanted to raise a get input and also I tried building local build after deleting and it works but didn't run test suite.

Appreciate if someone can give go ahead or know history of it whether it is safe to remove in WebKit or not?

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-03-08 15:29:15 PST
<rdar://problem/106456012>
Comment 2 Ahmad Saleem 2023-03-19 15:02:11 PDT
(In reply to Ahmad Saleem from comment #0)
> Hi Team,
> 
> I came across another dead-code removal from Blink's commit, which was added
> in WebKit with following commit:
> 
> WebKit Old Commit - http://trac.webkit.org/changeset/14782
> 
> Blink Commit -
> https://chromium.googlesource.com/chromium/blink/+/
> 857f2e42c139b277ed29cd8ae112cb4f1d6b5a90
> 
> WebKit Source -
> https://searchfox.org/wubkat/source/Source/WebCore/editing/Editor.cpp#3615
> 
> Just wanted to raise a get input and also I tried building local build after
> deleting and it works but didn't run test suite.
> 
> Appreciate if someone can give go ahead or know history of it whether it is
> safe to remove in WebKit or not?
> 
> Thanks!

WebKit Source link seems to be wrong here for some reason, so here is the right reference: https://github.com/WebKit/WebKit/blob/869566c01b24f8a631257c8565cc08c3cdeaf1f9/Source/WebCore/editing/Editor.cpp#L3657-L3666
Comment 3 Ahmad Saleem 2023-11-29 07:17:13 PST
*** Bug 251054 has been marked as a duplicate of this bug. ***