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, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 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) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4153 // Sandboxing a document into a unique origin shouldn't effect first-/third-
party status for | 4153 // Sandboxing a document into a unique origin shouldn't effect first-/third-
party status for |
4154 // cookies and site data. | 4154 // cookies and site data. |
4155 const OriginAccessEntry& accessEntry = topDocument().accessEntryFromURL(); | 4155 const OriginAccessEntry& accessEntry = topDocument().accessEntryFromURL(); |
4156 const Document* currentDocument = this; | 4156 const Document* currentDocument = this; |
4157 while (currentDocument) { | 4157 while (currentDocument) { |
4158 // Skip over srcdoc documents, as they are always same-origin with their
closest non-srcdoc parent. | 4158 // Skip over srcdoc documents, as they are always same-origin with their
closest non-srcdoc parent. |
4159 while (currentDocument->isSrcdocDocument()) | 4159 while (currentDocument->isSrcdocDocument()) |
4160 currentDocument = currentDocument->parentDocument(); | 4160 currentDocument = currentDocument->parentDocument(); |
4161 ASSERT(currentDocument); | 4161 ASSERT(currentDocument); |
4162 | 4162 |
4163 if (accessEntry.matchesOrigin(*currentDocument->securityOrigin()) == Ori
ginAccessEntry::DoesNotMatchOrigin) | 4163 // We use 'matchesDomain' here, as it turns out that some folks embed HT
TPS login forms |
| 4164 // into HTTP pages; we should allow this kind of upgrade. |
| 4165 if (accessEntry.matchesDomain(*currentDocument->securityOrigin()) == Ori
ginAccessEntry::DoesNotMatchOrigin) |
4164 return SecurityOrigin::urlWithUniqueSecurityOrigin(); | 4166 return SecurityOrigin::urlWithUniqueSecurityOrigin(); |
4165 | 4167 |
4166 currentDocument = currentDocument->parentDocument(); | 4168 currentDocument = currentDocument->parentDocument(); |
4167 } | 4169 } |
4168 | 4170 |
4169 return topDocument().url(); | 4171 return topDocument().url(); |
4170 } | 4172 } |
4171 | 4173 |
4172 static bool isValidNameNonASCII(const LChar* characters, unsigned length) | 4174 static bool isValidNameNonASCII(const LChar* characters, unsigned length) |
4173 { | 4175 { |
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5914 #ifndef NDEBUG | 5916 #ifndef NDEBUG |
5915 using namespace blink; | 5917 using namespace blink; |
5916 void showLiveDocumentInstances() | 5918 void showLiveDocumentInstances() |
5917 { | 5919 { |
5918 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5920 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5919 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5921 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5920 for (Document* document : set) | 5922 for (Document* document : set) |
5921 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5923 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5922 } | 5924 } |
5923 #endif | 5925 #endif |
OLD | NEW |