mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibWebView: Keep javascript URL navigations in the same process
JavaScript URLs run in the same document context the navigation was started in, so they're not eligible to be moved to a new WebContent process. Fixes the "Login as demo user" link on https://demo.immich.app/
This commit is contained in:
parent
c8787e6a9f
commit
61c1e4a855
Notes:
github-actions[bot]
2025-03-16 15:00:33 +00:00
Author: https://github.com/Lubrsi
Commit: 61c1e4a855
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3966
3 changed files with 16 additions and 0 deletions
|
@ -27,6 +27,10 @@ bool is_url_suitable_for_same_process_navigation(URL::URL const& current_url, UR
|
|||
if (Web::HTML::url_matches_about_blank(current_url))
|
||||
return true;
|
||||
|
||||
// Make sure JavaScript URLs run in the same process.
|
||||
if (target_url.scheme() == "javascript"sv)
|
||||
return true;
|
||||
|
||||
// Allow cross-scheme non-HTTP(S) navigation. Disallow cross-scheme HTTP(s) navigation.
|
||||
auto current_url_is_http = Web::Fetch::Infrastructure::is_http_or_https_scheme(current_url.scheme());
|
||||
auto target_url_is_http = Web::Fetch::Infrastructure::is_http_or_https_scheme(target_url.scheme());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue