@@ -11508,6 +11508,30 @@ index 935a7fd136754694c5301100ad4699ccb2210e67..2a04380900326ec5ef03ff5b78c67643
11508
11508
11509
11509
# Experimental features
11510
11510
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_APPLICATION_MANIFEST PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
11511
+ diff --git a/Tools/MiniBrowser/gtk/BrowserTab.c b/Tools/MiniBrowser/gtk/BrowserTab.c
11512
+ index 9e9978efd3d821c7afcd7b65e14c64e36b355802..ab97c2301577989461aadc853055076d8dfab451 100644
11513
+ --- a/Tools/MiniBrowser/gtk/BrowserTab.c
11514
+ +++ b/Tools/MiniBrowser/gtk/BrowserTab.c
11515
+ @@ -147,6 +147,11 @@ static void loadChanged(WebKitWebView *webView, WebKitLoadEvent loadEvent, Brows
11516
+ gtk_container_foreach(GTK_CONTAINER(tab), (GtkCallback)removeChildIfInfoBar, tab);
11517
+ }
11518
+
11519
+ +static void loadFailed()
11520
+ +{
11521
+ + return TRUE;
11522
+ +}
11523
+ +
11524
+ static GtkWidget *createInfoBarQuestionMessage(const char *title, const char *text)
11525
+ {
11526
+ GtkWidget *dialog = gtk_info_bar_new_with_buttons("No", GTK_RESPONSE_NO, "Yes", GTK_RESPONSE_YES, NULL);
11527
+ @@ -457,6 +462,7 @@ static void browserTabConstructed(GObject *gObject)
11528
+ g_signal_connect(tab->webView, "notify::is-loading", G_CALLBACK(isLoadingChanged), tab);
11529
+ g_signal_connect(tab->webView, "decide-policy", G_CALLBACK(decidePolicy), tab);
11530
+ g_signal_connect(tab->webView, "load-changed", G_CALLBACK(loadChanged), tab);
11531
+ + g_signal_connect(tab->webView, "load-failed", G_CALLBACK(loadFailed), tab);
11532
+ g_signal_connect(tab->webView, "load-failed-with-tls-errors", G_CALLBACK(loadFailedWithTLSerrors), tab);
11533
+ g_signal_connect(tab->webView, "permission-request", G_CALLBACK(decidePermissionRequest), tab);
11534
+ g_signal_connect(tab->webView, "run-color-chooser", G_CALLBACK(runColorChooserCallback), tab);
11511
11535
diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.h b/Tools/MiniBrowser/gtk/BrowserWindow.h
11512
11536
index 1570d65effb5d601ee3c44a2a7461436f4691c2c..456f96cf589320efa70a76f76e230b6795886b5a 100644
11513
11537
--- a/Tools/MiniBrowser/gtk/BrowserWindow.h
@@ -12183,7 +12207,7 @@ index 245f319abf2595e154d03e1ee8b3250d7f46aafd..9cae87b23deade7c163f34aade2b2aed
12183
12207
${WPEBACKEND_FDO_INCLUDE_DIRS}
12184
12208
)
12185
12209
diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp
12186
- index 2d183d394123bd84545dc51f53eb9be796fb8873..249c35ffd8344212cb11aec4e2b7e6396ce0a2fd 100644
12210
+ index 2d183d394123bd84545dc51f53eb9be796fb8873..05df1b0713cd6c7cf22d8f3a298d86364fdbc5e6 100644
12187
12211
--- a/Tools/MiniBrowser/wpe/main.cpp
12188
12212
+++ b/Tools/MiniBrowser/wpe/main.cpp
12189
12213
@@ -25,7 +25,7 @@
@@ -12222,7 +12246,17 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..249c35ffd8344212cb11aec4e2b7e639
12222
12246
return std::make_unique<WPEToolingBackends::WindowViewBackend>(width, height);
12223
12247
}
12224
12248
12225
- @@ -152,7 +156,23 @@ static void webViewClose(WebKitWebView* webView, gpointer)
12249
+ @@ -147,12 +151,33 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
12250
+ g_main_loop_quit(data->mainLoop);
12251
+ }
12252
+
12253
+ +static gboolean webViewLoadFailed()
12254
+ +{
12255
+ + return TRUE;
12256
+ +}
12257
+ +
12258
+ static void webViewClose(WebKitWebView* webView, gpointer)
12259
+ {
12226
12260
g_object_unref(webView);
12227
12261
}
12228
12262
@@ -12247,7 +12281,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..249c35ffd8344212cb11aec4e2b7e639
12247
12281
{
12248
12282
auto backend = createViewBackend(1280, 720);
12249
12283
struct wpe_view_backend* wpeBackend = backend->backend();
12250
- @@ -164,14 +184,54 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
12284
+ @@ -164,14 +189,55 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
12251
12285
delete static_cast<WPEToolingBackends::ViewBackend*>(data);
12252
12286
}, backend.release());
12253
12287
@@ -12272,6 +12306,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..249c35ffd8344212cb11aec4e2b7e639
12272
12306
12273
12307
g_signal_connect(newWebView, "close", G_CALLBACK(webViewClose), nullptr);
12274
12308
-
12309
+ + g_signal_connect(newWebView, "load-failed", G_CALLBACK(webViewLoadFailed), nullptr);
12275
12310
+ g_signal_connect(newWebView, "script-dialog", G_CALLBACK(scriptDialog), nullptr);
12276
12311
+ g_signal_connect(newWebView, "script-dialog-handled", G_CALLBACK(scriptDialogHandled), nullptr);
12277
12312
+ g_signal_connect(newWebView, "create", G_CALLBACK(createWebView), nullptr);
@@ -12305,7 +12340,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..249c35ffd8344212cb11aec4e2b7e639
12305
12340
int main(int argc, char *argv[])
12306
12341
{
12307
12342
#if ENABLE_DEVELOPER_MODE
12308
- @@ -215,7 +275 ,18 @@ int main(int argc, char *argv[])
12343
+ @@ -215,7 +281 ,18 @@ int main(int argc, char *argv[])
12309
12344
return 1;
12310
12345
}
12311
12346
@@ -12325,7 +12360,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..249c35ffd8344212cb11aec4e2b7e639
12325
12360
12326
12361
if (cookiesPolicy) {
12327
12362
auto* cookieManager = webkit_web_context_get_cookie_manager(webContext);
12328
- @@ -280,6 +351 ,9 @@ int main(int argc, char *argv[])
12363
+ @@ -280,6 +357 ,9 @@ int main(int argc, char *argv[])
12329
12364
delete static_cast<WPEToolingBackends::ViewBackend*>(data);
12330
12365
}, backend.release());
12331
12366
@@ -12335,7 +12370,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..249c35ffd8344212cb11aec4e2b7e639
12335
12370
auto* webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
12336
12371
"backend", viewBackend,
12337
12372
"web-context", webContext,
12338
- @@ -318,7 +392 ,7 @@ int main(int argc, char *argv[])
12373
+ @@ -318,7 +398 ,7 @@ int main(int argc, char *argv[])
12339
12374
g_object_unref(file);
12340
12375
webkit_web_view_load_uri(webView, url);
12341
12376
g_free(url);
0 commit comments