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 3952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3963 // FIXME: If this document came from the file system, the HTML5 | 3963 // FIXME: If this document came from the file system, the HTML5 |
3964 // specificiation tells us to read the last modification date from the file | 3964 // specificiation tells us to read the last modification date from the file |
3965 // system. | 3965 // system. |
3966 if (!foundDate) | 3966 if (!foundDate) |
3967 date.setMillisecondsSinceEpochForDateTime(convertToLocalTime(currentTime
MS())); | 3967 date.setMillisecondsSinceEpochForDateTime(convertToLocalTime(currentTime
MS())); |
3968 return String::format("%02d/%02d/%04d %02d:%02d:%02d", date.month() + 1, dat
e.monthDay(), date.fullYear(), date.hour(), date.minute(), date.second()); | 3968 return String::format("%02d/%02d/%04d %02d:%02d:%02d", date.month() + 1, dat
e.monthDay(), date.fullYear(), date.hour(), date.minute(), date.second()); |
3969 } | 3969 } |
3970 | 3970 |
3971 const KURL& Document::firstPartyForCookies() const | 3971 const KURL& Document::firstPartyForCookies() const |
3972 { | 3972 { |
| 3973 if (SchemeRegistry::shouldTreatURLSchemeAsFirstPartyWhenTopLevel(topDocument
().url().protocol())) |
| 3974 return topDocument().url(); |
| 3975 |
3973 // We're intentionally using the URL of each document rather than the docume
nt's SecurityOrigin. | 3976 // We're intentionally using the URL of each document rather than the docume
nt's SecurityOrigin. |
3974 // Sandboxing a document into a unique origin shouldn't effect first-/third-
party status for | 3977 // Sandboxing a document into a unique origin shouldn't effect first-/third-
party status for |
3975 // cookies and site data. | 3978 // cookies and site data. |
3976 OriginAccessEntry accessEntry(topDocument().url().protocol(), topDocument().
url().host(), OriginAccessEntry::AllowRegisterableDomains); | 3979 OriginAccessEntry accessEntry(topDocument().url().protocol(), topDocument().
url().host(), OriginAccessEntry::AllowRegisterableDomains); |
3977 const Document* currentDocument = this; | 3980 const Document* currentDocument = this; |
3978 while (currentDocument) { | 3981 while (currentDocument) { |
3979 // Skip over srcdoc documents, as they are always same-origin with their
closest non-srcdoc parent. | 3982 // Skip over srcdoc documents, as they are always same-origin with their
closest non-srcdoc parent. |
3980 while (currentDocument->isSrcdocDocument()) | 3983 while (currentDocument->isSrcdocDocument()) |
3981 currentDocument = currentDocument->parentDocument(); | 3984 currentDocument = currentDocument->parentDocument(); |
3982 ASSERT(currentDocument); | 3985 ASSERT(currentDocument); |
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5721 #ifndef NDEBUG | 5724 #ifndef NDEBUG |
5722 using namespace blink; | 5725 using namespace blink; |
5723 void showLiveDocumentInstances() | 5726 void showLiveDocumentInstances() |
5724 { | 5727 { |
5725 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5728 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5726 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5729 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5727 for (Document* document : set) | 5730 for (Document* document : set) |
5728 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5731 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5729 } | 5732 } |
5730 #endif | 5733 #endif |
OLD | NEW |