Skip to content

Commit 4b0ce1d

Browse files
authored
browser(webkit-wpe): do not preload about:blank into popups (#724)
1 parent 09e97af commit 4b0ce1d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

browser_patches/webkit/BUILD_NUMBER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1119
1+
1120

browser_patches/webkit/patches/bootstrap.diff

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12243,7 +12243,7 @@ index 245f319abf2595e154d03e1ee8b3250d7f46aafd..9cae87b23deade7c163f34aade2b2aed
1224312243
${WPEBACKEND_FDO_INCLUDE_DIRS}
1224412244
)
1224512245
diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp
12246-
index 2d183d394123bd84545dc51f53eb9be796fb8873..355c94aff2b99de7e9ab29d2d39986df3ab700cc 100644
12246+
index 2d183d394123bd84545dc51f53eb9be796fb8873..07f31f2442bc957378dc6da026fa3c4802e1e2f9 100644
1224712247
--- a/Tools/MiniBrowser/wpe/main.cpp
1224812248
+++ b/Tools/MiniBrowser/wpe/main.cpp
1224912249
@@ -25,7 +25,7 @@
@@ -12317,7 +12317,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..355c94aff2b99de7e9ab29d2d39986df
1231712317
{
1231812318
auto backend = createViewBackend(1280, 720);
1231912319
struct wpe_view_backend* wpeBackend = backend->backend();
12320-
@@ -164,14 +189,55 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
12320+
@@ -164,14 +189,56 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
1232112321
delete static_cast<WPEToolingBackends::ViewBackend*>(data);
1232212322
}, backend.release());
1232312323

@@ -12346,7 +12346,6 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..355c94aff2b99de7e9ab29d2d39986df
1234612346
+ g_signal_connect(newWebView, "script-dialog", G_CALLBACK(scriptDialog), nullptr);
1234712347
+ g_signal_connect(newWebView, "script-dialog-handled", G_CALLBACK(scriptDialogHandled), nullptr);
1234812348
+ g_signal_connect(newWebView, "create", G_CALLBACK(createWebView), nullptr);
12349-
+ webkit_web_view_load_uri(newWebView, "about:blank");
1235012349
return newWebView;
1235112350
}
1235212351

@@ -12361,7 +12360,9 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..355c94aff2b99de7e9ab29d2d39986df
1236112360
+{
1236212361
+ if (!webContext)
1236312362
+ webContext = persistentWebContext;
12364-
+ return createWebViewImpl(nullptr, webContext);
12363+
+ WebKitWebView* webView = createWebViewImpl(nullptr, webContext);
12364+
+ webkit_web_view_load_uri(webView, "about:blank");
12365+
+ return webView;
1236512366
+}
1236612367
+
1236712368
+static void configureBrowserInspector(GMainLoop* mainLoop, WebKitWebContext *webContext)
@@ -12376,7 +12377,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..355c94aff2b99de7e9ab29d2d39986df
1237612377
int main(int argc, char *argv[])
1237712378
{
1237812379
#if ENABLE_DEVELOPER_MODE
12379-
@@ -215,7 +281,18 @@ int main(int argc, char *argv[])
12380+
@@ -215,7 +282,18 @@ int main(int argc, char *argv[])
1238012381
return 1;
1238112382
}
1238212383

@@ -12396,7 +12397,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..355c94aff2b99de7e9ab29d2d39986df
1239612397

1239712398
if (cookiesPolicy) {
1239812399
auto* cookieManager = webkit_web_context_get_cookie_manager(webContext);
12399-
@@ -280,6 +357,9 @@ int main(int argc, char *argv[])
12400+
@@ -280,6 +358,9 @@ int main(int argc, char *argv[])
1240012401
delete static_cast<WPEToolingBackends::ViewBackend*>(data);
1240112402
}, backend.release());
1240212403

@@ -12406,7 +12407,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..355c94aff2b99de7e9ab29d2d39986df
1240612407
auto* webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
1240712408
"backend", viewBackend,
1240812409
"web-context", webContext,
12409-
@@ -318,7 +398,7 @@ int main(int argc, char *argv[])
12410+
@@ -318,7 +399,7 @@ int main(int argc, char *argv[])
1241012411
g_object_unref(file);
1241112412
webkit_web_view_load_uri(webView, url);
1241212413
g_free(url);
@@ -12415,7 +12416,7 @@ index 2d183d394123bd84545dc51f53eb9be796fb8873..355c94aff2b99de7e9ab29d2d39986df
1241512416
webkit_web_view_load_uri(webView, "about:blank");
1241612417
else
1241712418
webkit_web_view_load_uri(webView, "https://wpewebkit.org");
12418-
@@ -326,8 +406,7 @@ int main(int argc, char *argv[])
12419+
@@ -326,8 +407,7 @@ int main(int argc, char *argv[])
1241912420
g_main_loop_run(loop);
1242012421

1242112422
g_object_unref(webView);

0 commit comments

Comments
 (0)