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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp

Issue 2644633006: Add KURL::protocolIsJavascript member function (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp b/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
index 783f9c4301f10f37660fe7c80f60c71f3432b3e1..e4220b0b5b1494729f2daa86f1eb9b9e50c45ba1 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
@@ -57,7 +57,7 @@ bool HTMLFrameElementBase::isURLAllowed() const {
const KURL& completeURL = document().completeURL(m_URL);
- if (contentFrame() && protocolIsJavaScript(completeURL)) {
+ if (contentFrame() && completeURL.protocolIsJavaScript()) {
// Check if the caller can execute script in the context of the content
// frame. NB: This check can be invoked without any JS on the stack for some
// parser operations. In such case, we use the origin of the frame element's
@@ -93,7 +93,7 @@ void HTMLFrameElementBase::openURL(bool replaceCurrentItem) {
// Support for <frame src="javascript:string">
KURL scriptURL;
KURL url = document().completeURL(m_URL);
- if (protocolIsJavaScript(m_URL)) {
+ if (url.protocolIsJavaScript()) {
// We'll set/execute |scriptURL| iff CSP allows us to execute inline
// JavaScript. If CSP blocks inline JavaScript, then exit early if
// we're trying to execute script in an existing document. If we're
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698