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

Side by Side Diff: Source/core/dom/Document.h

Issue 246433004: Rename cookieURL to inheritedURL and add inheritedURL() to WebDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: weaken statement about inheritedURL Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 String cookie(ExceptionState&) const; 749 String cookie(ExceptionState&) const;
750 void setCookie(const String&, ExceptionState&); 750 void setCookie(const String&, ExceptionState&);
751 751
752 const AtomicString& referrer() const; 752 const AtomicString& referrer() const;
753 753
754 String domain() const; 754 String domain() const;
755 void setDomain(const String& newDomain, ExceptionState&); 755 void setDomain(const String& newDomain, ExceptionState&);
756 756
757 String lastModified() const; 757 String lastModified() const;
758 758
759 // The cookieURL is used to query the cookie database for this document's 759 // Returns the document's (inherited) URL. Should only be used for decisions that
760 // are solely based on the document's URL. For anything security-related, us e
761 // securityOrigin() instead.
762 // inheritedURL is also used to query the cookie database for the document's
760 // cookies. For example, if the cookie URL is http://example.com, we'll 763 // cookies. For example, if the cookie URL is http://example.com, we'll
761 // use the non-Secure cookies for example.com when computing 764 // use the non-Secure cookies for example.com when computing
762 // document.cookie. 765 // document.cookie.
763 // 766 //
764 // Q: How is the cookieURL different from the document's URL? 767 // Q: How is the inheritedURL different from the document's URL?
765 // A: The two URLs are the same almost all the time. However, if one 768 // A: The two URLs are the same almost all the time. However, if one
766 // document inherits the security context of another document, it 769 // document inherits the security context of another document, it
767 // inherits its cookieURL but not its URL. 770 // inherits its inheritedURL but not its URL.
768 // 771 //
769 const KURL& cookieURL() const { return m_cookieURL; } 772 const KURL& inheritedURL() const { return m_inheritedURL; }
770 void setCookieURL(const KURL& url) { m_cookieURL = url; } 773 void setInheritedURL(const KURL& url) { m_inheritedURL = url; }
771 774
772 const KURL& firstPartyForCookies() const; 775 const KURL& firstPartyForCookies() const;
773 776
774 // The following implements the rule from HTML 4 for what valid names are. 777 // The following implements the rule from HTML 4 for what valid names are.
775 // To get this right for all the XML cases, we probably have to improve this or move it 778 // To get this right for all the XML cases, we probably have to improve this or move it
776 // and make it sensitive to the type of document. 779 // and make it sensitive to the type of document.
777 static bool isValidName(const String&); 780 static bool isValidName(const String&);
778 781
779 // The following breaks a qualified name into a prefix and a local name. 782 // The following breaks a qualified name into a prefix and a local name.
780 // It also does a validity check, and returns false if the qualified name 783 // It also does a validity check, and returns false if the qualified name
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 unsigned m_activeParserCount; 1183 unsigned m_activeParserCount;
1181 RefPtr<ContextFeatures> m_contextFeatures; 1184 RefPtr<ContextFeatures> m_contextFeatures;
1182 1185
1183 bool m_wellFormed; 1186 bool m_wellFormed;
1184 1187
1185 // Document URLs. 1188 // Document URLs.
1186 KURL m_url; // Document.URL: The URL from which this document was retrieved. 1189 KURL m_url; // Document.URL: The URL from which this document was retrieved.
1187 KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs . 1190 KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs .
1188 KURL m_baseURLOverride; // An alternative base URL that takes precedence ove r m_baseURL (but not m_baseElementURL). 1191 KURL m_baseURLOverride; // An alternative base URL that takes precedence ove r m_baseURL (but not m_baseElementURL).
1189 KURL m_baseElementURL; // The URL set by the <base> element. 1192 KURL m_baseElementURL; // The URL set by the <base> element.
1190 KURL m_cookieURL; // The URL to use for cookie access. 1193 KURL m_inheritedURL; // Same as m_url, unless the document inherits its secu rity context from another document.
1191 1194
1192 AtomicString m_baseTarget; 1195 AtomicString m_baseTarget;
1193 1196
1194 // Mime-type of the document in case it was cloned or created by XHR. 1197 // Mime-type of the document in case it was cloned or created by XHR.
1195 AtomicString m_mimeType; 1198 AtomicString m_mimeType;
1196 1199
1197 RefPtr<DocumentType> m_docType; 1200 RefPtr<DocumentType> m_docType;
1198 OwnPtr<DOMImplementation> m_implementation; 1201 OwnPtr<DOMImplementation> m_implementation;
1199 1202
1200 RefPtrWillBePersistent<CSSStyleSheet> m_elemSheet; 1203 RefPtrWillBePersistent<CSSStyleSheet> m_elemSheet;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 inline bool Node::isDocumentNode() const 1427 inline bool Node::isDocumentNode() const
1425 { 1428 {
1426 return this == document(); 1429 return this == document();
1427 } 1430 }
1428 1431
1429 Node* eventTargetNodeForDocument(Document*); 1432 Node* eventTargetNodeForDocument(Document*);
1430 1433
1431 } // namespace WebCore 1434 } // namespace WebCore
1432 1435
1433 #endif // Document_h 1436 #endif // Document_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698