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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp

Issue 2436003002: CSP: Add 'script-sample' to violation reports. (Closed)
Patch Set: Rebase Created 3 years, 9 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
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) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 KURL url = document().completeURL(m_URL); 90 KURL url = document().completeURL(m_URL);
91 if (url.protocolIsJavaScript()) { 91 if (url.protocolIsJavaScript()) {
92 // We'll set/execute |scriptURL| iff CSP allows us to execute inline 92 // We'll set/execute |scriptURL| iff CSP allows us to execute inline
93 // JavaScript. If CSP blocks inline JavaScript, then exit early if 93 // JavaScript. If CSP blocks inline JavaScript, then exit early if
94 // we're trying to execute script in an existing document. If we're 94 // we're trying to execute script in an existing document. If we're
95 // executing JavaScript to create a new document (e.g. 95 // executing JavaScript to create a new document (e.g.
96 // '<iframe src="javascript:...">' then continue loading 'about:blank' 96 // '<iframe src="javascript:...">' then continue loading 'about:blank'
97 // so that the frame is populated with something reasonable. 97 // so that the frame is populated with something reasonable.
98 if (ContentSecurityPolicy::shouldBypassMainWorld(&document()) || 98 if (ContentSecurityPolicy::shouldBypassMainWorld(&document()) ||
99 document().contentSecurityPolicy()->allowJavaScriptURLs( 99 document().contentSecurityPolicy()->allowJavaScriptURLs(
100 this, document().url(), OrdinalNumber::first())) { 100 this, url.getString(), document().url(), OrdinalNumber::first())) {
101 scriptURL = url; 101 scriptURL = url;
102 } else { 102 } else {
103 if (contentFrame()) 103 if (contentFrame())
104 return; 104 return;
105 } 105 }
106 106
107 url = blankURL(); 107 url = blankURL();
108 } 108 }
109 109
110 if (!loadOrRedirectSubframe(url, m_frameName, replaceCurrentItem)) 110 if (!loadOrRedirectSubframe(url, m_frameName, replaceCurrentItem))
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 if (contentDocument()) { 285 if (contentDocument()) {
286 contentDocument()->willChangeFrameOwnerProperties( 286 contentDocument()->willChangeFrameOwnerProperties(
287 m_marginWidth, marginHeight, m_scrollingMode); 287 m_marginWidth, marginHeight, m_scrollingMode);
288 } 288 }
289 m_marginHeight = marginHeight; 289 m_marginHeight = marginHeight;
290 frameOwnerPropertiesChanged(); 290 frameOwnerPropertiesChanged();
291 } 291 }
292 292
293 } // namespace blink 293 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698