Summary: | Replace instances of blacklist in WebCore with blocklist | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Beth Dakin <bdakin> | ||||
Component: | WebCore Misc. | Assignee: | Beth Dakin <bdakin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bdakin, cdumez, dino, esprehn+autocc, ews-watchlist, graouts, kangil.han, kondapallykalyan, sam, simon.fraser, thorton, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Local Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 213092 | ||||||
Attachments: |
|
Description
Beth Dakin
2020-06-10 20:42:06 PDT
Created attachment 401616 [details]
Patch
Comment on attachment 401616 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401616&action=review > Source/WebCore/page/UserContentURLPattern.cpp:37 > + // In order for a URL to be a match it has to be present in the whitelist and not present in the blocklist. You missed a "whitelist" > Source/WebCore/page/UserContentURLPattern.cpp:61 > + return matchesWhitelist && !matchesBlocklist; and here (In reply to Tim Horton from comment #2) > Comment on attachment 401616 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=401616&action=review > > > Source/WebCore/page/UserContentURLPattern.cpp:37 > > + // In order for a URL to be a match it has to be present in the whitelist and not present in the blocklist. > > You missed a "whitelist" > > > Source/WebCore/page/UserContentURLPattern.cpp:61 > > + return matchesWhitelist && !matchesBlocklist; > > and here Oh I missed ALL of whitelists! I thought I'd do a second patch just to keep the patches smaller, but it's an arbitrary division. Committed r262894: <https://trac.webkit.org/changeset/262894> All reviewed patches have been landed. Closing bug and clearing flags on attachment 401616 [details]. Comment on attachment 401616 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401616&action=review > Source/WebCore/page/UserStyleSheet.h:60 > const Vector<String>& whitelist() const { return m_whitelist; } > - const Vector<String>& blacklist() const { return m_blacklist; } > + const Vector<String>& blocklist() const { return m_blocklist; } I think we should match the naming elsewhere, and rename these to includeMatchPatternStrings/excludeMatchPatternStrings. This has the added benefit of actually explaining what these do. Alternatively, we could use the terms the developer.apple.com uses (https://developer.apple.com/documentation/safariservices/safari_app_extensions/safari_app_extension_info_property_list_keys/about_content_script_and_style_sheet_keys), allowedURLPatterns/excludedURLPatterns. Either way, we should use the same terminology for both UserStyleSheet and UserScript. > Source/WebCore/platform/mac/PasteboardMac.mm:570 > - // Blacklist types that might contain subframe information. > + // Blocklist types that might contain subframe information. This sentence no longer makes sense. I would replace Blocklist with "Reject" |