WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
173342
Add SPI for immediate injection of user scripts
https://bugs.webkit.org/show_bug.cgi?id=173342
Summary
Add SPI for immediate injection of user scripts
Alex Christensen
Reported
2017-06-13 16:53:06 PDT
Add SPI for immediate injection of user scripts
Attachments
Patch
(21.74 KB, patch)
2017-06-13 16:58 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(22.45 KB, patch)
2017-06-13 18:18 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(29.55 KB, patch)
2017-06-14 10:42 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(29.54 KB, patch)
2017-06-14 12:00 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
WIP Rebasing
(28.66 KB, patch)
2018-07-11 10:44 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(31.77 KB, patch)
2018-07-11 16:10 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(32.48 KB, patch)
2018-07-11 17:10 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(30.68 KB, patch)
2018-07-11 17:33 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(32.80 KB, patch)
2018-07-11 17:47 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(33.07 KB, patch)
2018-07-11 18:05 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2017-06-13 16:58:37 PDT
Created
attachment 312831
[details]
Patch
Alex Christensen
Comment 2
2017-06-13 18:18:11 PDT
Created
attachment 312844
[details]
Patch
Build Bot
Comment 3
2017-06-13 18:21:04 PDT
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
Brady Eidson
Comment 4
2017-06-13 19:02:43 PDT
Comment on
attachment 312844
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=312844&action=review
> Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp:101 > + const bool immediately = false;
Are you doing all of these const bool variables to make the code more readable? Because, if so, we usually prefer to create a 2-state enum class. (This pattern is weird...)
> Source/WebKit2/UIProcess/API/C/WKUserContentControllerRef.cpp:55 > + const bool immediately = false;
Ditto...
> Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.mm:87 > + const bool immediately = false;
Ditto...
> Source/WebKit2/UIProcess/API/Cocoa/WKUserContentController.mm:178 > + const bool immediately = true;
Ditto...
> Source/WebKit2/UIProcess/API/gtk/WebKitUserContentManager.cpp:162 > + const bool immediately = false;
Ditto...
> Source/WebKit2/UIProcess/UserContent/WebUserContentControllerProxy.cpp:157 > +void WebUserContentControllerProxy::addUserScript(API::UserScript& userScript, bool immediately)
Should be that same enum class mentioned above.
> Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:388 > + const bool immediately = false;
Ditto...
Alex Christensen
Comment 5
2017-06-13 21:59:31 PDT
Yes. Any other comments?
Brady Eidson
Comment 6
2017-06-13 22:54:49 PDT
Nah
Alex Christensen
Comment 7
2017-06-14 10:42:53 PDT
Created
attachment 312904
[details]
Patch
Brady Eidson
Comment 8
2017-06-14 11:46:06 PDT
Comment on
attachment 312904
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=312904&action=review
r+ with one change (and green bots)
> Source/WebCore/page/Frame.cpp:721 > + if (script.injectedFrames() == InjectInTopFrameOnly && ownerElement()) > + return;
Checking ownerElement() is not a valid check for main-frameness Use !isMainFrame() instead.
Alex Christensen
Comment 9
2017-06-14 12:00:24 PDT
Created
attachment 312911
[details]
Patch
WebKit Commit Bot
Comment 10
2017-06-14 12:51:04 PDT
Comment on
attachment 312911
[details]
Patch Clearing flags on attachment: 312911 Committed
r218285
: <
http://trac.webkit.org/changeset/218285
>
WebKit Commit Bot
Comment 11
2017-06-14 12:51:06 PDT
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 12
2017-06-14 17:37:01 PDT
Re-opened since this is blocked by
bug 173391
youenn fablet
Comment 13
2018-07-11 10:44:11 PDT
Created
attachment 344770
[details]
WIP Rebasing
Alex Christensen
Comment 14
2018-07-11 16:10:34 PDT
Created
attachment 344785
[details]
Patch
youenn fablet
Comment 15
2018-07-11 17:07:52 PDT
Comment on
attachment 344785
[details]
Patch LGTM with happy bots. View in context:
https://bugs.webkit.org/attachment.cgi?id=344785&action=review
> Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp:180 > + process->send(Messages::WebUserContentController::AddUserScripts({ { userScript.identifier(), world->identifier(), userScript.userScript() } }, immediately), m_identifier.toUInt64());
s/m_identifier/Identifier()/
Alex Christensen
Comment 16
2018-07-11 17:10:19 PDT
Created
attachment 344790
[details]
Patch
Jessie Berlin
Comment 17
2018-07-11 17:25:19 PDT
Comment on
attachment 344785
[details]
Patch From Geoff: AddUserScriptImmediately -> InjectUserScriptImmediately
Alex Christensen
Comment 18
2018-07-11 17:33:45 PDT
Created
attachment 344795
[details]
Patch
Alex Christensen
Comment 19
2018-07-11 17:47:25 PDT
Created
attachment 344798
[details]
Patch
Alex Christensen
Comment 20
2018-07-11 18:05:30 PDT
Created
attachment 344802
[details]
Patch
WebKit Commit Bot
Comment 21
2018-07-11 19:32:25 PDT
Comment on
attachment 344802
[details]
Patch Clearing flags on attachment: 344802 Committed
r233752
: <
https://trac.webkit.org/changeset/233752
>
WebKit Commit Bot
Comment 22
2018-07-11 19:32:28 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 23
2018-07-11 19:33:22 PDT
<
rdar://problem/42101041
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug