This would be similar as for user style sheets from bug #34551 but in this case for user scripts.
Created attachment 234583 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Created attachment 234648 [details] Patch
Comment on attachment 234648 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=234648&action=review The API looks good to me, it's the equivalent to the style sheets API. > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:133 > - removeOldInjectedStyleSheetsAndResetLists(test->m_userContentManager.get(), whitelist, blacklist); > + removeOldInjectedContentAndResetLists(test->m_userContentManager.get(), whitelist, blacklist); Why do we need to remove also the scripts? > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:135 > + // Without a whitelist or a blacklist all URLs should have the injected style sheet. Looks like this method is for testing style sheets (testUserContentManagerInjectedStyleSheet), but it's testing user scripts instead. > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:171 > +static void testUserContentManagerInjectedScript(UserContentManagerTest* test, gconstpointer) And here you are testing the style sheets . . .
Comment on attachment 234648 [details] Patch API looks good to me as well =)
Created attachment 236098 [details] Patch for landing
Comment on attachment 236098 [details] Patch for landing Clearing flags on attachment: 236098 Committed r172147: <http://trac.webkit.org/changeset/172147>
All reviewed patches have been landed. Closing bug.