OLD | NEW |
---|---|
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 Loading... | |
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 // inheritedURL is used to make (security) decisions based on the document's |
760 // (inherited) URL, e.g. querying the cookie database for the document's | |
abarth-chromium
2014/04/22 17:36:21
You shouldn't be making security decisions based o
robwu
2014/04/22 19:05:50
I have just weakened the statement in the comment.
| |
760 // cookies. For example, if the cookie URL is http://example.com, we'll | 761 // cookies. For example, if the cookie URL is http://example.com, we'll |
761 // use the non-Secure cookies for example.com when computing | 762 // use the non-Secure cookies for example.com when computing |
762 // document.cookie. | 763 // document.cookie. |
763 // | 764 // |
764 // Q: How is the cookieURL different from the document's URL? | 765 // 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 | 766 // A: The two URLs are the same almost all the time. However, if one |
766 // document inherits the security context of another document, it | 767 // document inherits the security context of another document, it |
767 // inherits its cookieURL but not its URL. | 768 // inherits its inheritedURL but not its URL. |
768 // | 769 // |
769 const KURL& cookieURL() const { return m_cookieURL; } | 770 const KURL& inheritedURL() const { return m_inheritedURL; } |
770 void setCookieURL(const KURL& url) { m_cookieURL = url; } | 771 void setInheritedURL(const KURL& url) { m_inheritedURL = url; } |
771 | 772 |
772 const KURL& firstPartyForCookies() const; | 773 const KURL& firstPartyForCookies() const; |
773 | 774 |
774 // The following implements the rule from HTML 4 for what valid names are. | 775 // 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 | 776 // 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. | 777 // and make it sensitive to the type of document. |
777 static bool isValidName(const String&); | 778 static bool isValidName(const String&); |
778 | 779 |
779 // The following breaks a qualified name into a prefix and a local name. | 780 // 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 | 781 // 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 Loading... | |
1180 unsigned m_activeParserCount; | 1181 unsigned m_activeParserCount; |
1181 RefPtr<ContextFeatures> m_contextFeatures; | 1182 RefPtr<ContextFeatures> m_contextFeatures; |
1182 | 1183 |
1183 bool m_wellFormed; | 1184 bool m_wellFormed; |
1184 | 1185 |
1185 // Document URLs. | 1186 // Document URLs. |
1186 KURL m_url; // Document.URL: The URL from which this document was retrieved. | 1187 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 . | 1188 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). | 1189 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. | 1190 KURL m_baseElementURL; // The URL set by the <base> element. |
1190 KURL m_cookieURL; // The URL to use for cookie access. | 1191 KURL m_inheritedURL; // Same as m_url, unless the document inherits its secu rity context from another document. |
1191 | 1192 |
1192 AtomicString m_baseTarget; | 1193 AtomicString m_baseTarget; |
1193 | 1194 |
1194 // Mime-type of the document in case it was cloned or created by XHR. | 1195 // Mime-type of the document in case it was cloned or created by XHR. |
1195 AtomicString m_mimeType; | 1196 AtomicString m_mimeType; |
1196 | 1197 |
1197 RefPtr<DocumentType> m_docType; | 1198 RefPtr<DocumentType> m_docType; |
1198 OwnPtr<DOMImplementation> m_implementation; | 1199 OwnPtr<DOMImplementation> m_implementation; |
1199 | 1200 |
1200 RefPtrWillBePersistent<CSSStyleSheet> m_elemSheet; | 1201 RefPtrWillBePersistent<CSSStyleSheet> m_elemSheet; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1424 inline bool Node::isDocumentNode() const | 1425 inline bool Node::isDocumentNode() const |
1425 { | 1426 { |
1426 return this == document(); | 1427 return this == document(); |
1427 } | 1428 } |
1428 | 1429 |
1429 Node* eventTargetNodeForDocument(Document*); | 1430 Node* eventTargetNodeForDocument(Document*); |
1430 | 1431 |
1431 } // namespace WebCore | 1432 } // namespace WebCore |
1432 | 1433 |
1433 #endif // Document_h | 1434 #endif // Document_h |
OLD | NEW |