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 4053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4064 // Sandboxing a document into a unique origin shouldn't effect first-/third-
party status for | 4064 // Sandboxing a document into a unique origin shouldn't effect first-/third-
party status for |
4065 // cookies and site data. | 4065 // cookies and site data. |
4066 const OriginAccessEntry& accessEntry = topDocument().accessEntryFromURL(); | 4066 const OriginAccessEntry& accessEntry = topDocument().accessEntryFromURL(); |
4067 const Document* currentDocument = this; | 4067 const Document* currentDocument = this; |
4068 while (currentDocument) { | 4068 while (currentDocument) { |
4069 // Skip over srcdoc documents, as they are always same-origin with their
closest non-srcdoc parent. | 4069 // Skip over srcdoc documents, as they are always same-origin with their
closest non-srcdoc parent. |
4070 while (currentDocument->isSrcdocDocument()) | 4070 while (currentDocument->isSrcdocDocument()) |
4071 currentDocument = currentDocument->parentDocument(); | 4071 currentDocument = currentDocument->parentDocument(); |
4072 ASSERT(currentDocument); | 4072 ASSERT(currentDocument); |
4073 | 4073 |
4074 if (accessEntry.matchesOrigin(*currentDocument->securityOrigin()) == Ori
ginAccessEntry::DoesNotMatchOrigin) | 4074 // We use 'matchesDomain' here, as it turns out that some folks embed HT
TPS login forms |
| 4075 // into HTTP pages; we should allow this kind of upgrade. |
| 4076 if (accessEntry.matchesDomain(*currentDocument->securityOrigin()) == Ori
ginAccessEntry::DoesNotMatchOrigin) |
4075 return SecurityOrigin::urlWithUniqueSecurityOrigin(); | 4077 return SecurityOrigin::urlWithUniqueSecurityOrigin(); |
4076 | 4078 |
4077 currentDocument = currentDocument->parentDocument(); | 4079 currentDocument = currentDocument->parentDocument(); |
4078 } | 4080 } |
4079 | 4081 |
4080 return topDocument().url(); | 4082 return topDocument().url(); |
4081 } | 4083 } |
4082 | 4084 |
4083 static bool isValidNameNonASCII(const LChar* characters, unsigned length) | 4085 static bool isValidNameNonASCII(const LChar* characters, unsigned length) |
4084 { | 4086 { |
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5832 #ifndef NDEBUG | 5834 #ifndef NDEBUG |
5833 using namespace blink; | 5835 using namespace blink; |
5834 void showLiveDocumentInstances() | 5836 void showLiveDocumentInstances() |
5835 { | 5837 { |
5836 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5838 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5837 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5839 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5838 for (Document* document : set) | 5840 for (Document* document : set) |
5839 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5841 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5840 } | 5842 } |
5841 #endif | 5843 #endif |
OLD | NEW |