| 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, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // If the load was blocked by X-Frame-Options or CSP, force the Document's | 101 // If the load was blocked by X-Frame-Options or CSP, force the Document's |
| 102 // origin to be unique, so that the blocked document appears to be a normal | 102 // origin to be unique, so that the blocked document appears to be a normal |
| 103 // cross-origin document's load per CSP spec: | 103 // cross-origin document's load per CSP spec: |
| 104 // https://www.w3.org/TR/CSP2/#directive-frame-ancestors | 104 // https://www.w3.org/TR/CSP2/#directive-frame-ancestors |
| 105 if (loader->documentLoader() && loader->documentLoader()->wasBlockedAfterXFr
ameOptionsOrCSP()) | 105 if (loader->documentLoader() && loader->documentLoader()->wasBlockedAfterXFr
ameOptionsOrCSP()) |
| 106 flags |= SandboxOrigin; | 106 flags |= SandboxOrigin; |
| 107 | 107 |
| 108 return flags; | 108 return flags; |
| 109 } | 109 } |
| 110 | 110 |
| 111 bool DocumentInit::shouldEnforceStrictMixedContentChecking() const | 111 WebInsecureRequestPolicy DocumentInit::getInsecureRequestPolicy() const |
| 112 { | 112 { |
| 113 DCHECK(frameForSecurityContext()); | 113 DCHECK(frameForSecurityContext()); |
| 114 return frameForSecurityContext()->loader().shouldEnforceStrictMixedContentCh
ecking(); | 114 return frameForSecurityContext()->loader().getInsecureRequestPolicy(); |
| 115 } | |
| 116 | |
| 117 SecurityContext::InsecureRequestsPolicy DocumentInit::getInsecureRequestsPolicy(
) const | |
| 118 { | |
| 119 DCHECK(frameForSecurityContext()); | |
| 120 return frameForSecurityContext()->loader().getInsecureRequestsPolicy(); | |
| 121 } | 115 } |
| 122 | 116 |
| 123 SecurityContext::InsecureNavigationsSet* DocumentInit::insecureNavigationsToUpgr
ade() const | 117 SecurityContext::InsecureNavigationsSet* DocumentInit::insecureNavigationsToUpgr
ade() const |
| 124 { | 118 { |
| 125 DCHECK(frameForSecurityContext()); | 119 DCHECK(frameForSecurityContext()); |
| 126 return frameForSecurityContext()->loader().insecureNavigationsToUpgrade(); | 120 return frameForSecurityContext()->loader().insecureNavigationsToUpgrade(); |
| 127 } | 121 } |
| 128 | 122 |
| 129 bool DocumentInit::isHostedInReservedIPRange() const | 123 bool DocumentInit::isHostedInReservedIPRange() const |
| 130 { | 124 { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 { | 173 { |
| 180 return m_contextDocument; | 174 return m_contextDocument; |
| 181 } | 175 } |
| 182 | 176 |
| 183 DocumentInit DocumentInit::fromContext(Document* contextDocument, const KURL& ur
l) | 177 DocumentInit DocumentInit::fromContext(Document* contextDocument, const KURL& ur
l) |
| 184 { | 178 { |
| 185 return DocumentInit(url, 0, contextDocument, 0); | 179 return DocumentInit(url, 0, contextDocument, 0); |
| 186 } | 180 } |
| 187 | 181 |
| 188 } // namespace blink | 182 } // namespace blink |
| OLD | NEW |