Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 143113003: CSP 1.1: Ignore report-only inside <meta>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nit. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2860 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 else if (equalIgnoringCase(equiv, "content-security-policy") 2871 else if (equalIgnoringCase(equiv, "content-security-policy")
2872 || equalIgnoringCase(equiv, "content-security-policy-report-only") 2872 || equalIgnoringCase(equiv, "content-security-policy-report-only")
2873 || equalIgnoringCase(equiv, "x-webkit-csp") 2873 || equalIgnoringCase(equiv, "x-webkit-csp")
2874 || equalIgnoringCase(equiv, "x-webkit-csp-report-only")) 2874 || equalIgnoringCase(equiv, "x-webkit-csp-report-only"))
2875 processHttpEquivContentSecurityPolicy(equiv, content); 2875 processHttpEquivContentSecurityPolicy(equiv, content);
2876 } 2876 }
2877 2877
2878 void Document::processHttpEquivContentSecurityPolicy(const AtomicString& equiv, const AtomicString& content) 2878 void Document::processHttpEquivContentSecurityPolicy(const AtomicString& equiv, const AtomicString& content)
2879 { 2879 {
2880 if (equalIgnoringCase(equiv, "content-security-policy")) 2880 if (equalIgnoringCase(equiv, "content-security-policy"))
2881 contentSecurityPolicy()->didReceiveHeader(content, ContentSecurityPolicy ::Enforce); 2881 contentSecurityPolicy()->didReceiveHeader(content, ContentSecurityPolicy ::Enforce, ContentSecurityPolicy::HeaderSourceMeta);
2882 else if (equalIgnoringCase(equiv, "content-security-policy-report-only")) 2882 else if (equalIgnoringCase(equiv, "content-security-policy-report-only"))
2883 contentSecurityPolicy()->didReceiveHeader(content, ContentSecurityPolicy ::Report); 2883 contentSecurityPolicy()->didReceiveHeader(content, ContentSecurityPolicy ::Report, ContentSecurityPolicy::HeaderSourceMeta);
2884 // FIXME: Remove deprecation messages after the next release branch. 2884 // FIXME: Remove deprecation messages after the next release branch.
2885 else if (equalIgnoringCase(equiv, "x-webkit-csp")) 2885 else if (equalIgnoringCase(equiv, "x-webkit-csp"))
2886 UseCounter::countDeprecation(this, UseCounter::PrefixedContentSecurityPo licy); 2886 UseCounter::countDeprecation(this, UseCounter::PrefixedContentSecurityPo licy);
2887 else if (equalIgnoringCase(equiv, "x-webkit-csp-report-only")) 2887 else if (equalIgnoringCase(equiv, "x-webkit-csp-report-only"))
2888 UseCounter::countDeprecation(this, UseCounter::PrefixedContentSecurityPo licyReportOnly); 2888 UseCounter::countDeprecation(this, UseCounter::PrefixedContentSecurityPo licyReportOnly);
2889 else 2889 else
2890 ASSERT_NOT_REACHED(); 2890 ASSERT_NOT_REACHED();
2891 } 2891 }
2892 2892
2893 void Document::processHttpEquivDefaultStyle(const AtomicString& content) 2893 void Document::processHttpEquivDefaultStyle(const AtomicString& content)
(...skipping 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after
5312 if (!element) { 5312 if (!element) {
5313 m_autofocusElement = 0; 5313 m_autofocusElement = 0;
5314 return; 5314 return;
5315 } 5315 }
5316 if (!m_autofocusElement) 5316 if (!m_autofocusElement)
5317 m_taskRunner->postTask(AutofocusTask::create()); 5317 m_taskRunner->postTask(AutofocusTask::create());
5318 m_autofocusElement = element; 5318 m_autofocusElement = element;
5319 } 5319 }
5320 5320
5321 } // namespace WebCore 5321 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698