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 2421473004: CSP: Fire 'SecurityPolicyViolation' on the offending element. (Closed)
Patch Set: Test. Created 4 years, 2 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 if (!loadOrRedirectSubframe(url, m_frameName, replaceCurrentItem)) 91 if (!loadOrRedirectSubframe(url, m_frameName, replaceCurrentItem))
92 return; 92 return;
93 if (!contentFrame() || scriptURL.isEmpty() || !contentFrame()->isLocalFrame()) 93 if (!contentFrame() || scriptURL.isEmpty() || !contentFrame()->isLocalFrame())
94 return; 94 return;
95 if (contentFrame()->owner()->getSandboxFlags() & SandboxOrigin) 95 if (contentFrame()->owner()->getSandboxFlags() & SandboxOrigin)
96 return; 96 return;
97 toLocalFrame(contentFrame()) 97 toLocalFrame(contentFrame())
98 ->script() 98 ->script()
99 .executeScriptIfJavaScriptURL(scriptURL); 99 .executeScriptIfJavaScriptURL(scriptURL, this);
100 } 100 }
101 101
102 void HTMLFrameElementBase::frameOwnerPropertiesChanged() { 102 void HTMLFrameElementBase::frameOwnerPropertiesChanged() {
103 // Don't notify about updates if contentFrame() is null, for example when 103 // Don't notify about updates if contentFrame() is null, for example when
104 // the subframe hasn't been created yet. 104 // the subframe hasn't been created yet.
105 if (contentFrame()) 105 if (contentFrame())
106 document().frame()->loader().client()->didChangeFrameOwnerProperties(this); 106 document().frame()->loader().client()->didChangeFrameOwnerProperties(this);
107 } 107 }
108 108
109 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, 109 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 m_marginWidth = marginWidth; 246 m_marginWidth = marginWidth;
247 frameOwnerPropertiesChanged(); 247 frameOwnerPropertiesChanged();
248 } 248 }
249 249
250 void HTMLFrameElementBase::setMarginHeight(int marginHeight) { 250 void HTMLFrameElementBase::setMarginHeight(int marginHeight) {
251 m_marginHeight = marginHeight; 251 m_marginHeight = marginHeight;
252 frameOwnerPropertiesChanged(); 252 frameOwnerPropertiesChanged();
253 } 253 }
254 254
255 } // namespace blink 255 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLMetaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698