Title: [267871] trunk/Tools
Revision
267871
Author
[email protected]
Date
2020-10-02 04:44:57 -0700 (Fri, 02 Oct 2020)

Log Message

[GTK] Fix MiniBrowser compilation warnings
https://bugs.webkit.org/show_bug.cgi?id=217208

Patch by Philippe Normand <[email protected]> on 2020-10-02
Reviewed by Carlos Garcia Campos.

webkit_web_context_set_network_proxy_settings() is deprecated in favor of
webkit_website_data_manager_set_network_proxy_settings().
webkit_web_context_set_tls_errors_policy() is deprecated in favor of
webkit_website_data_manager_set_tls_errors_policy().

* MiniBrowser/gtk/main.c:
(activate):
* MiniBrowser/wpe/main.cpp:
(main):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (267870 => 267871)


--- trunk/Tools/ChangeLog	2020-10-02 09:38:52 UTC (rev 267870)
+++ trunk/Tools/ChangeLog	2020-10-02 11:44:57 UTC (rev 267871)
@@ -1,3 +1,20 @@
+2020-10-02  Philippe Normand  <[email protected]>
+
+        [GTK] Fix MiniBrowser compilation warnings
+        https://bugs.webkit.org/show_bug.cgi?id=217208
+
+        Reviewed by Carlos Garcia Campos.
+
+        webkit_web_context_set_network_proxy_settings() is deprecated in favor of
+        webkit_website_data_manager_set_network_proxy_settings().
+        webkit_web_context_set_tls_errors_policy() is deprecated in favor of
+        webkit_website_data_manager_set_tls_errors_policy().
+
+        * MiniBrowser/gtk/main.c:
+        (activate):
+        * MiniBrowser/wpe/main.cpp:
+        (main):
+
 2020-10-02  Kimmo Kinnunen  <[email protected]>
 
         [iOS WK1] Crashes when using ANGLE WebGL from another thread

Modified: trunk/Tools/MiniBrowser/gtk/main.c (267870 => 267871)


--- trunk/Tools/MiniBrowser/gtk/main.c	2020-10-02 09:38:52 UTC (rev 267870)
+++ trunk/Tools/MiniBrowser/gtk/main.c	2020-10-02 11:44:57 UTC (rev 267871)
@@ -626,6 +626,16 @@
     }
 
     webkit_website_data_manager_set_itp_enabled(manager, enableITP);
+
+    if (proxy) {
+        WebKitNetworkProxySettings *webkitProxySettings = webkit_network_proxy_settings_new(proxy, ignoreHosts);
+        webkit_website_data_manager_set_network_proxy_settings(manager, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, webkitProxySettings);
+        webkit_network_proxy_settings_free(webkitProxySettings);
+    }
+
+    if (ignoreTLSErrors)
+        webkit_website_data_manager_set_tls_errors_policy(manager, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
+
     WebKitWebContext *webContext = g_object_new(WEBKIT_TYPE_WEB_CONTEXT, "website-data-manager", manager, "process-swap-on-cross-site-navigation-enabled", TRUE,
 #if !GTK_CHECK_VERSION(3, 98, 0)
         "use-system-appearance-for-scrollbars", FALSE,
@@ -648,12 +658,6 @@
         webkit_cookie_manager_set_persistent_storage(cookieManager, cookiesFile, storageType);
     }
 
-    if (proxy) {
-        WebKitNetworkProxySettings *webkitProxySettings = webkit_network_proxy_settings_new(proxy, ignoreHosts);
-        webkit_web_context_set_network_proxy_settings(webContext, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, webkitProxySettings);
-        webkit_network_proxy_settings_free(webkitProxySettings);
-    }
-
     // Enable the favicon database, by specifying the default directory.
     webkit_web_context_set_favicon_database_directory(webContext, NULL);
 
@@ -694,9 +698,6 @@
     webkit_web_context_set_automation_allowed(webContext, automationMode);
     g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), application);
 
-    if (ignoreTLSErrors)
-        webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
-
     BrowserWindow *mainWindow = BROWSER_WINDOW(browser_window_new(NULL, webContext));
     gtk_application_add_window(GTK_APPLICATION(application), GTK_WINDOW(mainWindow));
     if (darkMode)

Modified: trunk/Tools/MiniBrowser/wpe/main.cpp (267870 => 267871)


--- trunk/Tools/MiniBrowser/wpe/main.cpp	2020-10-02 09:38:52 UTC (rev 267870)
+++ trunk/Tools/MiniBrowser/wpe/main.cpp	2020-10-02 11:44:57 UTC (rev 267871)
@@ -218,6 +218,16 @@
 
     auto* manager = (privateMode || automationMode) ? webkit_website_data_manager_new_ephemeral() : webkit_website_data_manager_new(nullptr);
     webkit_website_data_manager_set_itp_enabled(manager, enableITP);
+
+    if (proxy) {
+        auto* webkitProxySettings = webkit_network_proxy_settings_new(proxy, ignoreHosts);
+        webkit_website_data_manager_set_network_proxy_settings(manager, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, webkitProxySettings);
+        webkit_network_proxy_settings_free(webkitProxySettings);
+    }
+
+    if (ignoreTLSErrors)
+        webkit_website_data_manager_set_tls_errors_policy(manager, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
+
     auto* webContext = webkit_web_context_new_with_website_data_manager(manager);
     g_object_unref(manager);
 
@@ -236,12 +246,6 @@
         webkit_cookie_manager_set_persistent_storage(cookieManager, cookiesFile, storageType);
     }
 
-    if (proxy) {
-        auto* webkitProxySettings = webkit_network_proxy_settings_new(proxy, ignoreHosts);
-        webkit_web_context_set_network_proxy_settings(webContext, WEBKIT_NETWORK_PROXY_MODE_CUSTOM, webkitProxySettings);
-        webkit_network_proxy_settings_free(webkitProxySettings);
-    }
-
     const char* singleprocess = g_getenv("MINIBROWSER_SINGLEPROCESS");
     webkit_web_context_set_process_model(webContext, (singleprocess && *singleprocess) ?
         WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS : WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
@@ -309,9 +313,6 @@
     g_signal_connect(webView, "close", G_CALLBACK(webViewClose), nullptr);
     g_hash_table_add(openViews, webView);
 
-    if (ignoreTLSErrors)
-        webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
-
     WebKitColor color;
     if (bgColor && webkit_color_parse(&color, bgColor))
         webkit_web_view_set_background_color(webView, &color);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to