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 3144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3155 void Document::processReferrerPolicy(const String& policy) | 3155 void Document::processReferrerPolicy(const String& policy) |
3156 { | 3156 { |
3157 ASSERT(!policy.isNull()); | 3157 ASSERT(!policy.isNull()); |
3158 | 3158 |
3159 if (equalIgnoringCase(policy, "no-referrer") || equalIgnoringCase(policy, "n
ever")) { | 3159 if (equalIgnoringCase(policy, "no-referrer") || equalIgnoringCase(policy, "n
ever")) { |
3160 setReferrerPolicy(ReferrerPolicyNever); | 3160 setReferrerPolicy(ReferrerPolicyNever); |
3161 } else if (equalIgnoringCase(policy, "unsafe-url") || equalIgnoringCase(poli
cy, "always")) { | 3161 } else if (equalIgnoringCase(policy, "unsafe-url") || equalIgnoringCase(poli
cy, "always")) { |
3162 setReferrerPolicy(ReferrerPolicyAlways); | 3162 setReferrerPolicy(ReferrerPolicyAlways); |
3163 } else if (equalIgnoringCase(policy, "origin")) { | 3163 } else if (equalIgnoringCase(policy, "origin")) { |
3164 setReferrerPolicy(ReferrerPolicyOrigin); | 3164 setReferrerPolicy(ReferrerPolicyOrigin); |
| 3165 } else if (equalIgnoringCase(policy, "origin-when-crossorigin")) { |
| 3166 setReferrerPolicy(ReferrerPolicyOriginWhenCrossOrigin); |
3165 } else if (equalIgnoringCase(policy, "no-referrer-when-downgrade") || equalI
gnoringCase(policy, "default")) { | 3167 } else if (equalIgnoringCase(policy, "no-referrer-when-downgrade") || equalI
gnoringCase(policy, "default")) { |
3166 setReferrerPolicy(ReferrerPolicyNoReferrerWhenDowngrade); | 3168 setReferrerPolicy(ReferrerPolicyNoReferrerWhenDowngrade); |
3167 } else { | 3169 } else { |
3168 addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, ErrorMe
ssageLevel, "Failed to set referrer policy: The value '" + policy + "' is not on
e of 'no-referrer', 'origin', 'no-referrer-when-downgrade', or 'unsafe-url'. Def
aulting to 'no-referrer'.")); | 3170 addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, ErrorMe
ssageLevel, "Failed to set referrer policy: The value '" + policy + "' is not on
e of 'no-referrer', 'origin', 'no-referrer-when-downgrade', or 'unsafe-url'. Def
aulting to 'no-referrer'.")); |
3169 setReferrerPolicy(ReferrerPolicyNever); | 3171 setReferrerPolicy(ReferrerPolicyNever); |
3170 } | 3172 } |
3171 } | 3173 } |
3172 | 3174 |
3173 void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) | 3175 void Document::setReferrerPolicy(ReferrerPolicy referrerPolicy) |
3174 { | 3176 { |
(...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5826 #ifndef NDEBUG | 5828 #ifndef NDEBUG |
5827 using namespace blink; | 5829 using namespace blink; |
5828 void showLiveDocumentInstances() | 5830 void showLiveDocumentInstances() |
5829 { | 5831 { |
5830 WeakDocumentSet& set = liveDocumentSet(); | 5832 WeakDocumentSet& set = liveDocumentSet(); |
5831 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5833 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5832 for (Document* document : set) | 5834 for (Document* document : set) |
5833 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5835 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5834 } | 5836 } |
5835 #endif | 5837 #endif |
OLD | NEW |