| 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 4146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4157 // FIXME: If this document came from the file system, the HTML5 | 4157 // FIXME: If this document came from the file system, the HTML5 |
| 4158 // specificiation tells us to read the last modification date from the file | 4158 // specificiation tells us to read the last modification date from the file |
| 4159 // system. | 4159 // system. |
| 4160 if (!foundDate) | 4160 if (!foundDate) |
| 4161 date.setMillisecondsSinceEpochForDateTime(convertToLocalTime(currentTime
MS())); | 4161 date.setMillisecondsSinceEpochForDateTime(convertToLocalTime(currentTime
MS())); |
| 4162 return String::format("%02d/%02d/%04d %02d:%02d:%02d", date.month() + 1, dat
e.monthDay(), date.fullYear(), date.hour(), date.minute(), date.second()); | 4162 return String::format("%02d/%02d/%04d %02d:%02d:%02d", date.month() + 1, dat
e.monthDay(), date.fullYear(), date.hour(), date.minute(), date.second()); |
| 4163 } | 4163 } |
| 4164 | 4164 |
| 4165 const KURL Document::firstPartyForCookies() const | 4165 const KURL Document::firstPartyForCookies() const |
| 4166 { | 4166 { |
| 4167 // If this is an imported document, grab its master document's first-party: |
| 4168 if (importsController() && importsController()->master() && importsControlle
r()->master() != this) |
| 4169 return importsController()->master()->firstPartyForCookies(); |
| 4170 |
| 4167 // TODO(mkwst): This doesn't correctly handle sandboxed documents; we want t
o look at their URL, | 4171 // TODO(mkwst): This doesn't correctly handle sandboxed documents; we want t
o look at their URL, |
| 4168 // but we can't because we don't know what it is. | 4172 // but we can't because we don't know what it is. |
| 4169 Frame* top = frame()->tree().top(); | 4173 Frame* top = frame()->tree().top(); |
| 4170 KURL topDocumentURL = top->isLocalFrame() | 4174 KURL topDocumentURL = top->isLocalFrame() |
| 4171 ? toLocalFrame(top)->document()->url() | 4175 ? toLocalFrame(top)->document()->url() |
| 4172 : KURL(KURL(), top->securityContext()->getSecurityOrigin()->toString()); | 4176 : KURL(KURL(), top->securityContext()->getSecurityOrigin()->toString()); |
| 4173 if (SchemeRegistry::shouldTreatURLSchemeAsFirstPartyWhenTopLevel(topDocument
URL.protocol())) | 4177 if (SchemeRegistry::shouldTreatURLSchemeAsFirstPartyWhenTopLevel(topDocument
URL.protocol())) |
| 4174 return topDocumentURL; | 4178 return topDocumentURL; |
| 4175 | 4179 |
| 4176 // We're intentionally using the URL of each document rather than the docume
nt's SecurityOrigin. | 4180 // We're intentionally using the URL of each document rather than the docume
nt's SecurityOrigin. |
| (...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6023 } | 6027 } |
| 6024 | 6028 |
| 6025 void showLiveDocumentInstances() | 6029 void showLiveDocumentInstances() |
| 6026 { | 6030 { |
| 6027 WeakDocumentSet& set = liveDocumentSet(); | 6031 WeakDocumentSet& set = liveDocumentSet(); |
| 6028 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6032 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6029 for (Document* document : set) | 6033 for (Document* document : set) |
| 6030 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6034 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
| 6031 } | 6035 } |
| 6032 #endif | 6036 #endif |
| OLD | NEW |