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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentInit.h

Issue 1670173002: Don't set the origin twice when navigating for javascript: URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: steal dcheng's tests Created 4 years, 10 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
Index: third_party/WebKit/Source/core/dom/DocumentInit.h
diff --git a/third_party/WebKit/Source/core/dom/DocumentInit.h b/third_party/WebKit/Source/core/dom/DocumentInit.h
index 4b3437bfd73a258ff7e61da35dc0370be4b7e702..9ff2340463ef5472b259544c4234eb7517197e5a 100644
--- a/third_party/WebKit/Source/core/dom/DocumentInit.h
+++ b/third_party/WebKit/Source/core/dom/DocumentInit.h
@@ -66,6 +66,7 @@ public:
bool isHostedInReservedIPRange() const;
SecurityContext::InsecureRequestsPolicy insecureRequestsPolicy() const;
SecurityContext::InsecureNavigationsSet* insecureNavigationsToUpgrade() const;
+ bool shouldInheritSecurityOriginFromOwner() const { return m_shouldInheritSecurityOriginFromOwner; }
Document* parent() const { return m_parent.get(); }
Document* owner() const { return m_owner.get(); }
@@ -75,6 +76,7 @@ public:
DocumentInit& withRegistrationContext(CustomElementRegistrationContext*);
DocumentInit& withNewRegistrationContext();
+ DocumentInit& withoutInheritingSecurityOrigin();
PassRefPtrWillBeRawPtr<CustomElementRegistrationContext> registrationContext(Document*) const;
WeakPtrWillBeRawPtr<Document> contextDocument() const;
@@ -101,6 +103,16 @@ private:
// the network load. See also SecurityContext::isSecureTransitionTo.
// FIXME: This is for DocumentWriter creation, not for one of Document.
bool m_shouldReuseDefaultView;
+
+ // http://www.whatwg.org/specs/web-apps/current-work/#origin-0
+ //
+ // If a Document has the address "about:blank"
+ // The origin of the Document is the origin 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.
+ //
+ bool m_shouldInheritSecurityOriginFromOwner;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698