Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 3b0b38b56fd88293a6901e60f057e37cfc54546a..099ca44b9851a89c09b282724363060adbcbfdb7 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -5113,6 +5113,19 @@ const KURL& Document::BaseURLForOverride(const KURL& base_url_override) const { |
return base_url_from_parent ? *base_url_from_parent : base_url_override; |
} |
+// static |
+bool Document::ShouldInheritSecurityOriginFromOwner(const KURL& url) { |
+ // https://html.spec.whatwg.org/multipage/browsers.html#origin |
+ // |
+ // If a Document is the initial "about:blank" document The origin and |
+ // effective script origin of the Document are those it was assigned when its |
+ // browsing context was created. |
+ // |
+ // Note: We generalize this to all "blank" URLs and invalid URLs because we |
+ // treat all of these URLs as about:blank. |
+ return url.IsEmpty() || url.ProtocolIsAbout(); |
+} |
+ |
KURL Document::OpenSearchDescriptionURL() { |
static const char kOpenSearchMIMEType[] = |
"application/opensearchdescription+xml"; |