WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99528
[WebKit2] Create Objective-C API for adding and removing user scripts
https://bugs.webkit.org/show_bug.cgi?id=99528
Summary
[WebKit2] Create Objective-C API for adding and removing user scripts
Andy Estes
Reported
2012-10-16 17:22:33 PDT
[WebKit2] Create Objective-C API for adding and removing user scripts
Attachments
Patch
(15.65 KB, patch)
2012-10-16 17:28 PDT
,
Andy Estes
andersca
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andy Estes
Comment 1
2012-10-16 17:28:11 PDT
Created
attachment 169064
[details]
Patch
Anders Carlsson
Comment 2
2012-10-16 17:44:21 PDT
Comment on
attachment 169064
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169064&action=review
> Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm:125 > +- (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WKUserScriptInjectionTime)injectionTime mainFrameOnly:(BOOL)mainFrameOnly
I think we should use more descriptive names for the whitelist and blacklist. How about whitelistedURLPatterns and blacklistedURLPatterns.
> Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm:128 > + if (!source) > + return;
I think it's an error for source to be null, so we should not return early in that case. Ideally we'd throw an invalid argument exception but crashing is fine for now.
Andy Estes
Comment 3
2012-10-16 19:00:37 PDT
Committed
r131544
: <
http://trac.webkit.org/changeset/131544
>
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