Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Unified Diff: third_party/WebKit/Source/core/dom/DocumentInit.cpp

Issue 1670173002: Don't set the origin twice when navigating for javascript: URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: steal dcheng's tests Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/DocumentInit.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentInit.cpp b/third_party/WebKit/Source/core/dom/DocumentInit.cpp
index d8e85c112159f624e6d092aee3525b04ef5765c3..4b80976c213978391cbefb9f7f5522af9c8c2d09 100644
--- a/third_party/WebKit/Source/core/dom/DocumentInit.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentInit.cpp
@@ -72,6 +72,7 @@ DocumentInit::DocumentInit(const KURL& url, LocalFrame* frame, WeakPtrWillBeRawP
, m_importsController(importsController)
, m_createNewRegistrationContext(false)
, m_shouldReuseDefaultView(frame && frame->shouldReuseDefaultView(url))
+ , m_shouldInheritSecurityOriginFromOwner(url.isEmpty() || url.protocolIsAbout())
{
}
@@ -172,6 +173,12 @@ DocumentInit& DocumentInit::withNewRegistrationContext()
return *this;
}
+DocumentInit& DocumentInit::withoutInheritingSecurityOrigin()
+{
+ m_shouldInheritSecurityOriginFromOwner = false;
+ return *this;
+}
+
PassRefPtrWillBeRawPtr<CustomElementRegistrationContext> DocumentInit::registrationContext(Document* document) const
{
if (!document->isHTMLDocument() && !document->isXHTMLDocument())
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentInit.h ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698