Title: [263192] trunk/Source/WebKit
Revision
263192
Author
[email protected]
Date
2020-06-17 16:57:59 -0700 (Wed, 17 Jun 2020)

Log Message

Remove references to blacklist/whitelist in the old C API
https://bugs.webkit.org/show_bug.cgi?id=213322

Reviewed by Tim Horton.

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserStyleSheet):
(WKPageGroupAddUserScript):
* UIProcess/API/C/WKPageGroup.h:
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (263191 => 263192)


--- trunk/Source/WebKit/ChangeLog	2020-06-17 23:53:37 UTC (rev 263191)
+++ trunk/Source/WebKit/ChangeLog	2020-06-17 23:57:59 UTC (rev 263192)
@@ -1,3 +1,16 @@
+2020-06-17  Beth Dakin  <[email protected]>
+
+        Remove references to blacklist/whitelist in the old C API
+        https://bugs.webkit.org/show_bug.cgi?id=213322
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/C/WKPageGroup.cpp:
+        (WKPageGroupAddUserStyleSheet):
+        (WKPageGroupAddUserScript):
+        * UIProcess/API/C/WKPageGroup.h:
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+
 2020-06-17  Alex Christensen  <[email protected]>
 
         Null check plugin.m_data before using it in PDFPlugin::ByteRangeRequest::completeUnconditionally

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPageGroup.cpp (263191 => 263192)


--- trunk/Source/WebKit/UIProcess/API/C/WKPageGroup.cpp	2020-06-17 23:53:37 UTC (rev 263191)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPageGroup.cpp	2020-06-17 23:57:59 UTC (rev 263192)
@@ -66,7 +66,7 @@
     return toAPI(&toImpl(pageGroupRef)->userContentController());
 }
 
-void WKPageGroupAddUserStyleSheet(WKPageGroupRef pageGroupRef, WKStringRef sourceRef, WKURLRef baseURLRef, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames injectedFrames)
+void WKPageGroupAddUserStyleSheet(WKPageGroupRef pageGroupRef, WKStringRef sourceRef, WKURLRef baseURLRef, WKArrayRef allowedURLPatterns, WKArrayRef blockedURLPatterns, WKUserContentInjectedFrames injectedFrames)
 {
     auto source = toWTFString(sourceRef);
 
@@ -74,10 +74,10 @@
         return;
 
     auto baseURLString = toWTFString(baseURLRef);
-    auto whitelist = toImpl(whitelistedURLPatterns);
-    auto blacklist = toImpl(blacklistedURLPatterns);
+    auto allowlist = toImpl(allowedURLPatterns);
+    auto blocklist = toImpl(blockedURLPatterns);
 
-    Ref<API::UserStyleSheet> userStyleSheet = API::UserStyleSheet::create(WebCore::UserStyleSheet { source, (baseURLString.isEmpty() ? aboutBlankURL() :  URL(URL(), baseURLString)), whitelist ? whitelist->toStringVector() : Vector<String>(), blacklist ? blacklist->toStringVector() : Vector<String>(), toUserContentInjectedFrames(injectedFrames), WebCore::UserStyleUserLevel }, API::ContentWorld::pageContentWorld());
+    Ref<API::UserStyleSheet> userStyleSheet = API::UserStyleSheet::create(WebCore::UserStyleSheet { source, (baseURLString.isEmpty() ? aboutBlankURL() :  URL(URL(), baseURLString)), allowlist ? allowlist->toStringVector() : Vector<String>(), blocklist ? blocklist->toStringVector() : Vector<String>(), toUserContentInjectedFrames(injectedFrames), WebCore::UserStyleUserLevel }, API::ContentWorld::pageContentWorld());
 
     toImpl(pageGroupRef)->userContentController().addUserStyleSheet(userStyleSheet.get());
 }
@@ -87,7 +87,7 @@
     toImpl(pageGroup)->userContentController().removeAllUserStyleSheets();
 }
 
-void WKPageGroupAddUserScript(WKPageGroupRef pageGroupRef, WKStringRef sourceRef, WKURLRef baseURLRef, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames injectedFrames, _WKUserScriptInjectionTime injectionTime)
+void WKPageGroupAddUserScript(WKPageGroupRef pageGroupRef, WKStringRef sourceRef, WKURLRef baseURLRef, WKArrayRef allowedURLPatterns, WKArrayRef blockedURLPatterns, WKUserContentInjectedFrames injectedFrames, _WKUserScriptInjectionTime injectionTime)
 {
     auto source = toWTFString(sourceRef);
 
@@ -95,11 +95,11 @@
         return;
 
     auto baseURLString = toWTFString(baseURLRef);
-    auto whitelist = toImpl(whitelistedURLPatterns);
-    auto blacklist = toImpl(blacklistedURLPatterns);
+    auto allowlist = toImpl(allowedURLPatterns);
+    auto blocklist = toImpl(blockedURLPatterns);
     
     auto url = "" ? aboutBlankURL() :  URL(URL(), baseURLString);
-    Ref<API::UserScript> userScript = API::UserScript::create(WebCore::UserScript { WTFMove(source), WTFMove(url), whitelist ? whitelist->toStringVector() : Vector<String>(), blacklist ? blacklist->toStringVector() : Vector<String>(), toUserScriptInjectionTime(injectionTime), toUserContentInjectedFrames(injectedFrames), WebCore::WaitForNotificationBeforeInjecting::No }, API::ContentWorld::pageContentWorld());
+    Ref<API::UserScript> userScript = API::UserScript::create(WebCore::UserScript { WTFMove(source), WTFMove(url), allowlist ? allowlist->toStringVector() : Vector<String>(), blocklist ? blocklist->toStringVector() : Vector<String>(), toUserScriptInjectionTime(injectionTime), toUserContentInjectedFrames(injectedFrames), WebCore::WaitForNotificationBeforeInjecting::No }, API::ContentWorld::pageContentWorld());
     toImpl(pageGroupRef)->userContentController().addUserScript(userScript.get(), InjectUserScriptImmediately::No);
 }
 

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPageGroup.h (263191 => 263192)


--- trunk/Source/WebKit/UIProcess/API/C/WKPageGroup.h	2020-06-17 23:53:37 UTC (rev 263191)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPageGroup.h	2020-06-17 23:57:59 UTC (rev 263192)
@@ -43,10 +43,10 @@
 
 WK_EXPORT WKUserContentControllerRef WKPageGroupGetUserContentController(WKPageGroupRef pageGroup);
 
-WK_EXPORT void WKPageGroupAddUserStyleSheet(WKPageGroupRef pageGroup, WKStringRef source, WKURLRef baseURL, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames);
+WK_EXPORT void WKPageGroupAddUserStyleSheet(WKPageGroupRef pageGroup, WKStringRef source, WKURLRef baseURL, WKArrayRef allowedURLPatterns, WKArrayRef blockedURLPatterns, WKUserContentInjectedFrames);
 WK_EXPORT void WKPageGroupRemoveAllUserStyleSheets(WKPageGroupRef pageGroup);
     
-WK_EXPORT void WKPageGroupAddUserScript(WKPageGroupRef pageGroup, WKStringRef source, WKURLRef baseURL, WKArrayRef whitelistedURLPatterns, WKArrayRef blacklistedURLPatterns, WKUserContentInjectedFrames, _WKUserScriptInjectionTime);
+WK_EXPORT void WKPageGroupAddUserScript(WKPageGroupRef pageGroup, WKStringRef source, WKURLRef baseURL, WKArrayRef allowedURLPatterns, WKArrayRef blockedURLPatterns, WKUserContentInjectedFrames, _WKUserScriptInjectionTime);
 WK_EXPORT void WKPageGroupRemoveAllUserScripts(WKPageGroupRef pageGroup);
 
 #ifdef __cplusplus

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (263191 => 263192)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2020-06-17 23:53:37 UTC (rev 263191)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2020-06-17 23:57:59 UTC (rev 263192)
@@ -70,8 +70,8 @@
 WK_EXPORT WKArrayRef WKBundleGetLiveDocumentURLs(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool excludeDocumentsInPageGroupPages);
 
 // UserContent API
-WK_EXPORT void WKBundleAddUserScript(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef whitelist, WKArrayRef blacklist, _WKUserScriptInjectionTime injectionTime, WKUserContentInjectedFrames injectedFrames) WK_C_API_DEPRECATED_WITH_REPLACEMENT(WKBundlePageAddUserScript);
-WK_EXPORT void WKBundleAddUserStyleSheet(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef whitelist, WKArrayRef blacklist, WKUserContentInjectedFrames injectedFrames) WK_C_API_DEPRECATED_WITH_REPLACEMENT(WKBundlePageAddUserStyleSheet);
+WK_EXPORT void WKBundleAddUserScript(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef allowlist, WKArrayRef blocklist, _WKUserScriptInjectionTime injectionTime, WKUserContentInjectedFrames injectedFrames) WK_C_API_DEPRECATED_WITH_REPLACEMENT(WKBundlePageAddUserScript);
+WK_EXPORT void WKBundleAddUserStyleSheet(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef allowlist, WKArrayRef blocklist, WKUserContentInjectedFrames injectedFrames) WK_C_API_DEPRECATED_WITH_REPLACEMENT(WKBundlePageAddUserStyleSheet);
 WK_EXPORT void WKBundleRemoveUserScript(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKURLRef url) WK_C_API_DEPRECATED;
 WK_EXPORT void WKBundleRemoveUserStyleSheet(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKURLRef url) WK_C_API_DEPRECATED;
 WK_EXPORT void WKBundleRemoveUserScripts(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld) WK_C_API_DEPRECATED;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to