mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-19 08:41:53 +00:00
LibWebView+WebContent: Add a command-line flag to disable site isolation
This commit is contained in:
parent
89f8dd9b3b
commit
fce5d24e5f
Notes:
github-actions[bot]
2025-03-12 02:02:01 +00:00
Author: https://github.com/trflynn89
Commit: fce5d24e5f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3909
Reviewed-by: https://github.com/tcl3 ✅
6 changed files with 28 additions and 0 deletions
|
@ -11,8 +11,18 @@
|
|||
|
||||
namespace WebView {
|
||||
|
||||
static bool s_site_isolation_enabled = true;
|
||||
|
||||
void disable_site_isolation()
|
||||
{
|
||||
s_site_isolation_enabled = false;
|
||||
}
|
||||
|
||||
bool is_url_suitable_for_same_process_navigation(URL::URL const& current_url, URL::URL const& target_url)
|
||||
{
|
||||
if (!s_site_isolation_enabled)
|
||||
return true;
|
||||
|
||||
// Allow navigating from about:blank to any site.
|
||||
if (Web::HTML::url_matches_about_blank(current_url))
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue