| 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();
|
| }
|
|
|
|
|