Bug 260208

Summary: WKUserContentController methods shouldn't show or remove user content scripts and stylesheets used by Web Extensions
Product: WebKit Reporter: Kiara Rose <kiara_rose>
Component: WebKit ExtensionsAssignee: Kiara Rose <kiara_rose>
Status: NEW ---    
Severity: Normal CC: timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description Kiara Rose 2023-08-15 11:03:15 PDT
From DDG: "We've noticed that removeAllUserScripts removes not only user scripts but also all web extensions, which was unexpected. It would be great to have a way to avoid this if possible."

Scripts and stylesheets added for Safari's internal use for Web Extensions should not be exposed on the public objects and methods clients use on the WKUserContentController. We should filter out user scripts and stylesheets owned by Web Extensions when we return the list of scripts and stylesheets. We should also not remove web extension scripts/stylesheets when client call removeAllUserScripts/removeAllUserStyleSheets.
Comment 1 Radar WebKit Bug Importer 2023-09-01 08:57:53 PDT
<rdar://problem/114823215>