Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index d6c9e8ae39f27940447b603a035a7fae50266572..6f41f1eedf77f83b06581aa506395dde18cf16a0 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -3970,6 +3970,9 @@ String Document::lastModified() const |
const KURL& Document::firstPartyForCookies() const |
{ |
+ if (SchemeRegistry::shouldTreatURLSchemeAsFirstPartyWhenTopLevel(topDocument().url().protocol())) |
+ return topDocument().url(); |
+ |
// We're intentionally using the URL of each document rather than the document's SecurityOrigin. |
// Sandboxing a document into a unique origin shouldn't effect first-/third-party status for |
// cookies and site data. |