Truly independent web browser
LibWebView: Let tabs with an opener policy share a process
Andreas Kling198edf46f112
diff --git a/Libraries/LibWebView/CanonicalDocument.cpp b/Libraries/LibWebView/CanonicalDocument.cppindex cf5a652b416..2987a551691 100644--- a/Libraries/LibWebView/CanonicalDocument.cpp+++ b/Libraries/LibWebView/CanonicalDocument.cpp@@ -85,7 +85,7 @@ bool CanonicalDocument::may_share_a_process_with_tabs_of_its_origin() constauto const& agent = m_relevant_global_object->agent();return !agent.agent_cluster_is_origin_keyed()&& agent.agent_cluster_cross_origin_isolation_mode() == Web::HTML::CrossOriginIsolationMode::None- && m_opener_policy.value == Web::HTML::OpenerPolicyValue::UnsafeNone;+ && m_opener_policy.value != Web::HTML::OpenerPolicyValue::SameOriginPlusCOEP;}void CanonicalDocument::set_host(RefPtr<WebContentPage> host)diff --git a/Libraries/LibWebView/CanonicalDocument.h b/Libraries/LibWebView/CanonicalDocument.hindex f15556395e9..977bd600d58 100644--- a/Libraries/LibWebView/CanonicalDocument.h+++ b/Libraries/LibWebView/CanonicalDocument.h@@ -95,8 +95,8 @@ public:bool is_top_level() const;- // Whether this top-level document may be hosted by one process with the tabs of its origin. A document that asked- // to be kept apart from others, by its opener policy or by being origin-keyed, may not.+ // Whether this top-level document may be hosted by one process with the tabs of its origin. A document that is+ // origin-keyed or cross-origin isolated may not. Other opener policies only keep cross-origin windows away.bool may_share_a_process_with_tabs_of_its_origin() const;// Whether this is local file content, whose process may read local files: a document created from a file: URL, or