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

Unified Diff: third_party/WebKit/WebCore/bindings/js/JSLocationCustom.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/WebCore/bindings/js/JSLocationCustom.cpp
===================================================================
--- third_party/WebKit/WebCore/bindings/js/JSLocationCustom.cpp (revision 9118)
+++ third_party/WebKit/WebCore/bindings/js/JSLocationCustom.cpp (working copy)
@@ -154,7 +154,7 @@
return;
KURL url = activeFrame->loader()->completeURL(value.toString(exec));
- navigateIfAllowed(exec, frame, url, false, false);
+ navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
void JSLocation::setProtocol(ExecState* exec, JSValuePtr value)
@@ -165,7 +165,7 @@
KURL url = frame->loader()->url();
url.setProtocol(value.toString(exec));
- navigateIfAllowed(exec, frame, url, false, false);
+ navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
void JSLocation::setHost(ExecState* exec, JSValuePtr value)
@@ -176,7 +176,7 @@
KURL url = frame->loader()->url();
url.setHostAndPort(value.toString(exec));
- navigateIfAllowed(exec, frame, url, false, false);
+ navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
void JSLocation::setHostname(ExecState* exec, JSValuePtr value)
@@ -187,7 +187,7 @@
KURL url = frame->loader()->url();
url.setHost(value.toString(exec));
- navigateIfAllowed(exec, frame, url, false, false);
+ navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
void JSLocation::setPort(ExecState* exec, JSValuePtr value)
@@ -203,7 +203,7 @@
port = 0;
url.setPort(port);
- navigateIfAllowed(exec, frame, url, false, false);
+ navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
void JSLocation::setPathname(ExecState* exec, JSValuePtr value)
@@ -214,7 +214,7 @@
KURL url = frame->loader()->url();
url.setPath(value.toString(exec));
- navigateIfAllowed(exec, frame, url, false, false);
+ navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
void JSLocation::setSearch(ExecState* exec, JSValuePtr value)
@@ -225,7 +225,7 @@
KURL url = frame->loader()->url();
url.setQuery(value.toString(exec));
- navigateIfAllowed(exec, frame, url, false, false);
+ navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
void JSLocation::setHash(ExecState* exec, JSValuePtr value)
@@ -242,7 +242,7 @@
return;
url.setRef(str);
- navigateIfAllowed(exec, frame, url, false, false);
+ navigateIfAllowed(exec, frame, url, !frame->script()->anyPageIsProcessingUserGesture(), false);
}
JSValuePtr JSLocation::replace(ExecState* exec, const ArgList& args)
@@ -291,7 +291,7 @@
return jsUndefined();
// We want a new history item if this JS was called via a user gesture
- navigateIfAllowed(exec, frame, activeFrame->loader()->completeURL(args.at(exec, 0).toString(exec)), false, false);
+ navigateIfAllowed(exec, frame, activeFrame->loader()->completeURL(args.at(exec, 0).toString(exec)), !frame->script()->anyPageIsProcessingUserGesture(), false);
return jsUndefined();
}

Powered by Google App Engine
This is Rietveld 408576698