Summary: | Bind _WKUserStyleSheets to WKUserContentWorlds to allow for grouping of user content by associating to a world | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||
Component: | New Bugs | Assignee: | Sam Weinig <sam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Sam Weinig
2016-02-28 13:08:09 PST
Created attachment 272463 [details]
Patch
Created attachment 272464 [details]
Patch
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; }); Committed r197302: <http://trac.webkit.org/changeset/197302> |