WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
209845
Add SPI to make WKUserScripts wait for a notification
https://bugs.webkit.org/show_bug.cgi?id=209845
Summary
Add SPI to make WKUserScripts wait for a notification
Alex Christensen
Reported
2020-03-31 20:13:07 PDT
Add SPI to make WKUserScripts wait for a notification
Attachments
Patch
(58.82 KB, patch)
2020-03-31 20:15 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(64.40 KB, patch)
2020-03-31 21:36 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(64.83 KB, patch)
2020-03-31 21:50 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(67.40 KB, patch)
2020-04-01 09:11 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(68.41 KB, patch)
2020-04-01 10:24 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(68.58 KB, patch)
2020-04-03 16:42 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2020-03-31 20:15:58 PDT
Created
attachment 395124
[details]
Patch
Alex Christensen
Comment 2
2020-03-31 20:16:01 PDT
<
rdar://problem/60342299
>
Alex Christensen
Comment 3
2020-03-31 21:36:29 PDT
Created
attachment 395126
[details]
Patch
EWS Watchlist
Comment 4
2020-03-31 21:37:28 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
Alex Christensen
Comment 5
2020-03-31 21:50:23 PDT
Created
attachment 395127
[details]
Patch
Alex Christensen
Comment 6
2020-04-01 09:11:06 PDT
Created
attachment 395173
[details]
Patch
Alex Christensen
Comment 7
2020-04-01 10:24:59 PDT
Created
attachment 395183
[details]
Patch
Jeff Miller
Comment 8
2020-04-02 11:24:47 PDT
Comment on
attachment 395183
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=395183&action=review
> Source/WebKit/UIProcess/API/APIPageConfiguration.h:193 > + bool m_userScriptsShouldWaitUntilNotification { true };
Shouldn't this default to false?
Alex Christensen
Comment 9
2020-04-02 16:19:17 PDT
Comment on
attachment 395183
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=395183&action=review
>> Source/WebKit/UIProcess/API/APIPageConfiguration.h:193 >> + bool m_userScriptsShouldWaitUntilNotification { true }; > > Shouldn't this default to false?
This means that the user script that say to wait until notification should wait for notification. By default user scripts do not say to wait until notification.
Jeff Miller
Comment 10
2020-04-02 17:39:02 PDT
Comment on
attachment 395183
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=395183&action=review
>>> Source/WebKit/UIProcess/API/APIPageConfiguration.h:193 >>> + bool m_userScriptsShouldWaitUntilNotification { true }; >> >> Shouldn't this default to false? > > This means that the user script that say to wait until notification should wait for notification. By default user scripts do not say to wait until notification.
I see, I was confused by the name. Maybe this should be something like "m_deferredUserScriptsShouldWaitUntilNotification" to emphasize that it only applies to user scripts that have requested to be deferred, with a similar name for the WKWebViewConfiguration property you're adding. You could also rename the parameter to the new WKUserScript initializer you added, e.g.: - (instancetype)_initWithSource:(NSString *)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly legacyWhitelist:(NSArray<NSString *> *)legacyWhitelist legacyBlacklist:(NSArray<NSString *> *)legacyBlacklist associatedURL:(NSURL *)associatedURL contentWorld:(WKContentWorld *)contentWorld deferRunningUntilNotification:(BOOL)deferRunningUntilNotification WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
Alex Christensen
Comment 11
2020-04-03 16:42:08 PDT
Created
attachment 395416
[details]
Patch
EWS
Comment 12
2020-04-03 17:44:37 PDT
Committed
r259523
: <
https://trac.webkit.org/changeset/259523
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 395416
[details]
.
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