Title: [236385] trunk/Tools
Revision
236385
Author
[email protected]
Date
2018-09-22 05:43:35 -0700 (Sat, 22 Sep 2018)

Log Message

[WPE] Be very permissive in the MiniBrowser.
https://bugs.webkit.org/show_bug.cgi?id=189800

This is just a test tool and we should make
it just work, security and privacy is not really
a primary focus here.

Patch by Thibault Saunier <[email protected]> on 2018-09-22
Reviewed by Žan Doberšek.

* MiniBrowser/wpe/main.cpp:
(decidePermissionRequest):
(main):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (236384 => 236385)


--- trunk/Tools/ChangeLog	2018-09-22 08:13:52 UTC (rev 236384)
+++ trunk/Tools/ChangeLog	2018-09-22 12:43:35 UTC (rev 236385)
@@ -1,3 +1,18 @@
+2018-09-22  Thibault Saunier  <[email protected]>
+
+        [WPE] Be very permissive in the MiniBrowser.
+        https://bugs.webkit.org/show_bug.cgi?id=189800
+
+        This is just a test tool and we should make
+        it just work, security and privacy is not really
+        a primary focus here.
+
+        Reviewed by Žan Doberšek.
+
+        * MiniBrowser/wpe/main.cpp:
+        (decidePermissionRequest):
+        (main):
+
 2018-09-21  Thomas Denney  <[email protected]>
 
         [WHLSL] Local variables should be statically allocated

Modified: trunk/Tools/MiniBrowser/wpe/main.cpp (236384 => 236385)


--- trunk/Tools/MiniBrowser/wpe/main.cpp	2018-09-22 08:13:52 UTC (rev 236384)
+++ trunk/Tools/MiniBrowser/wpe/main.cpp	2018-09-22 12:43:35 UTC (rev 236385)
@@ -92,6 +92,14 @@
     g_signal_connect(session, "create-web-view", G_CALLBACK(createWebViewForAutomationCallback), view);
 }
 
+static gboolean decidePermissionRequest(WebKitWebView *webView, WebKitPermissionRequest *request, gpointer unused_udata)
+{
+    g_print("Accepting %s request\n", G_OBJECT_TYPE_NAME(request));
+    webkit_permission_request_allow(request);
+
+    return TRUE;
+}
+
 static std::unique_ptr<WPEToolingBackends::ViewBackend> createViewBackend(uint32_t width, uint32_t height)
 {
     if (headlessMode)
@@ -178,6 +186,7 @@
 
     webkit_web_context_set_automation_allowed(webContext, automationMode);
     g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), webView);
+    g_signal_connect(webView, "permission-request", G_CALLBACK(decidePermissionRequest), NULL);
 
     if (ignoreTLSErrors)
         webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to