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()) |