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

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

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Addressing review comments Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698