Title: [283973] trunk/Source/WebCore
Revision
283973
Author
[email protected]
Date
2021-10-12 01:40:24 -0700 (Tue, 12 Oct 2021)

Log Message

Use isSameOriginAsTopDocument() in DocumentLoader::shouldOpenExternalURLsPolicyToPropagate
https://bugs.webkit.org/show_bug.cgi?id=231539

Reviewed by Youenn Fablet.

No behavior change, same thing.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (283972 => 283973)


--- trunk/Source/WebCore/ChangeLog	2021-10-12 08:07:07 UTC (rev 283972)
+++ trunk/Source/WebCore/ChangeLog	2021-10-12 08:40:24 UTC (rev 283973)
@@ -1,3 +1,15 @@
+2021-10-12  Tim Nguyen  <[email protected]>
+
+        Use isSameOriginAsTopDocument() in DocumentLoader::shouldOpenExternalURLsPolicyToPropagate
+        https://bugs.webkit.org/show_bug.cgi?id=231539
+
+        Reviewed by Youenn Fablet.
+
+        No behavior change, same thing.
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate const):
+
 2021-10-11  Saam Barati  <[email protected]>
 
         Remove ImplicitAddress

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (283972 => 283973)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2021-10-12 08:07:07 UTC (rev 283972)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2021-10-12 08:40:24 UTC (rev 283973)
@@ -2338,10 +2338,8 @@
     if (m_frame->isMainFrame())
         return m_shouldOpenExternalURLsPolicy;
 
-    if (auto* currentDocument = document()) {
-        if (currentDocument->securityOrigin().isSameOriginAs(currentDocument->topOrigin()))
-            return m_shouldOpenExternalURLsPolicy;
-    }
+    if (document() && document()->isSameOriginAsTopDocument())
+        return m_shouldOpenExternalURLsPolicy;
 
     return ShouldOpenExternalURLsPolicy::ShouldNotAllow;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to