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 4168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4179 initSecurityContext(DocumentInit(m_url, m_frame, m_import)); | 4179 initSecurityContext(DocumentInit(m_url, m_frame, m_import)); |
4180 } | 4180 } |
4181 | 4181 |
4182 void Document::initSecurityContext(const DocumentInit& initializer) | 4182 void Document::initSecurityContext(const DocumentInit& initializer) |
4183 { | 4183 { |
4184 if (haveInitializedSecurityOrigin()) { | 4184 if (haveInitializedSecurityOrigin()) { |
4185 ASSERT(securityOrigin()); | 4185 ASSERT(securityOrigin()); |
4186 return; | 4186 return; |
4187 } | 4187 } |
4188 | 4188 |
4189 if (!initializer.frame()) { | 4189 if (!initializer.hasSecurityContextSource()) { |
4190 // No source for a security context. | 4190 // No source for a security context. |
4191 // This can occur via document.implementation.createDocument(). | 4191 // This can occur via document.implementation.createDocument(). |
4192 m_cookieURL = KURL(ParsedURLString, emptyString()); | 4192 m_cookieURL = KURL(ParsedURLString, emptyString()); |
4193 setSecurityOrigin(SecurityOrigin::createUnique()); | 4193 setSecurityOrigin(SecurityOrigin::createUnique()); |
4194 setContentSecurityPolicy(ContentSecurityPolicy::create(this)); | 4194 setContentSecurityPolicy(ContentSecurityPolicy::create(this)); |
4195 return; | 4195 return; |
4196 } | 4196 } |
4197 | 4197 |
4198 // In the common case, create the security context from the currently | 4198 // In the common case, create the security context from the currently |
4199 // loading URL with a fresh content security policy. | 4199 // loading URL with a fresh content security policy. |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5067 { | 5067 { |
5068 return DocumentLifecycleNotifier::create(this); | 5068 return DocumentLifecycleNotifier::create(this); |
5069 } | 5069 } |
5070 | 5070 |
5071 DocumentLifecycleNotifier* Document::lifecycleNotifier() | 5071 DocumentLifecycleNotifier* Document::lifecycleNotifier() |
5072 { | 5072 { |
5073 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); | 5073 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); |
5074 } | 5074 } |
5075 | 5075 |
5076 } // namespace WebCore | 5076 } // namespace WebCore |
OLD | NEW |