Chromium Code Reviews| 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 49364b1931cb671dded685d71bb0bffb12ffe968..f26bcdb90b1d976e5241408eabb1d33d485f95df 100644 |
| --- a/third_party/WebKit/Source/core/dom/Document.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp |
| @@ -5123,6 +5123,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 |
|
lunalu1
2017/04/13 20:54:04
nit: s/The/, the
|
| + // 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"; |