WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
154798
Bind _WKUserStyleSheets to WKUserContentWorlds to allow for grouping of user content by associating to a world
https://bugs.webkit.org/show_bug.cgi?id=154798
Summary
Bind _WKUserStyleSheets to WKUserContentWorlds to allow for grouping of user ...
Sam Weinig
Reported
2016-02-28 13:08:09 PST
Bind _WKUserStyleSheets to WKUserContentWorlds to allow for grouping of user content by associating to a world
Attachments
Patch
(45.99 KB, patch)
2016-02-28 13:17 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(33.68 KB, patch)
2016-02-28 13:30 PST
,
Sam Weinig
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2016-02-28 13:17:39 PST
Created
attachment 272463
[details]
Patch
Sam Weinig
Comment 2
2016-02-28 13:30:32 PST
Created
attachment 272464
[details]
Patch
mitz
Comment 3
2016-02-28 13:43:22 PST
Comment on
attachment 272464
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=272464&action=review
> Source/WebKit2/Shared/API/APIArray.h:95 > + return m_elements.removeAllMatching( > + [&] (const RefPtr<Object>& object) -> bool {
I think these should be one line.
> Source/WebKit2/Shared/API/APIArray.h:99 > + if (object->type() != T::APIType) > + return false; > + return matchFunction(static_pointer_cast<T>(object)); > + });
And then this should be less indented.
> Source/WebKit2/UIProcess/API/Cocoa/_WKUserStyleSheet.h:45 > +- (instancetype)initWithSource:(NSString *)source forMainFrameOnly:(BOOL)forMainFrameOnly legacyWhitelist:(WK_ARRAY(NSString *) *)legacyWhitelist legacyBlacklist:(WK_ARRAY(NSString *) *)legacyBlacklist userContentWorld:(_WKUserContentWorld *)userContentWorld;
Missing availability.
> Source/WebKit2/UIProcess/UserContent/WebUserContentControllerProxy.cpp:194 > + unsigned userScriptsRemoved = m_userScripts->removeAllOfTypeMatching<API::UserScript>( > + [&] (const RefPtr<API::UserScript>& userScript) -> bool { > + return &userScript->userContentWorld() == &world; > + });
Weird indentation, as evident from that last line! I’d write it like this: unsigned userScriptsRemoved = m_userScripts->removeAllOfTypeMatching<API::UserScript>([&] (const RefPtr<API::UserScript>& userScript) -> bool { return &userScript->userContentWorld() == &world; });
Sam Weinig
Comment 4
2016-02-28 13:56:35 PST
Committed
r197302
: <
http://trac.webkit.org/changeset/197302
>
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