[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
abarth at webkit.org
abarth at webkit.org
Wed Dec 22 11:53:17 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 1ee82bfc75a9381f3543f655c6f6100439eaac34
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 10 18:57:01 2010 +0000
2010-08-10 Johnny Ding <jnd at chromium.org>
Reviewed by Adam Barth.
Change the ScriptController::processingUserGesture to static method
and use dynamic(JSC binding)/entered(V8 binding) frame to check the user gesture.
https://bugs.webkit.org/show_bug.cgi?id=42827.
Test: fast/events/popup-blocked-from-iframe-script.html
* WebCore.order:
* bindings/js/JSDOMBinding.cpp:
(WebCore::processingUserGesture):
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setLocation):
(WebCore::createWindow):
(WebCore::domWindowAllowPopUp):
(WebCore::JSDOMWindow::open):
(WebCore::JSDOMWindow::showModalDialog):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::setLocation):
* bindings/js/JSLocationCustom.cpp:
(WebCore::navigateIfAllowed):
(WebCore::JSLocation::reload):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::processingUserGesture):
* bindings/js/ScriptController.h:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::processingUserGesture):
(WebCore::ScriptController::anyPageIsProcessingUserGesture):
* bindings/v8/ScriptController.h:
* bindings/v8/specialization/V8BindingState.cpp:
(WebCore::::processingUserGesture):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::isProcessingUserGesture):
2010-08-10 Johnny Ding <jnd at chromium.org>
Reviewed by Adam Barth.
Change the ScriptController::processingUserGesture to static method
and use dynamic(JSC binding)/entered(V8 binding) frame to check the user gesture.
https://bugs.webkit.org/show_bug.cgi?id=42827
* fast/events/popup-blocked-from-iframe-script-expected.txt: Added.
* fast/events/popup-blocked-from-iframe-script.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 87e891b..2d2c961 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-10 Johnny Ding <jnd at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Change the ScriptController::processingUserGesture to static method
+ and use dynamic(JSC binding)/entered(V8 binding) frame to check the user gesture.
+ https://bugs.webkit.org/show_bug.cgi?id=42827
+
+ * fast/events/popup-blocked-from-iframe-script-expected.txt: Added.
+ * fast/events/popup-blocked-from-iframe-script.html: Added.
+
2010-08-10 Ryosuke Niwa <rniwa at webkit.org>
Unreviewed.
diff --git a/LayoutTests/fast/events/popup-blocked-from-iframe-script-expected.txt b/LayoutTests/fast/events/popup-blocked-from-iframe-script-expected.txt
new file mode 100644
index 0000000..44f8dc3
--- /dev/null
+++ b/LayoutTests/fast/events/popup-blocked-from-iframe-script-expected.txt
@@ -0,0 +1,3 @@
+
+When calling script to open a window without user gesture from the enclosing iframe, webkit should test out that the opening is not initiated by user. This is a test case for bug https://bugs.webkit.org/show_bug.cgi?id=42827.
+PASSED
diff --git a/LayoutTests/fast/events/popup-blocked-from-iframe-script.html b/LayoutTests/fast/events/popup-blocked-from-iframe-script.html
new file mode 100644
index 0000000..2117eeb
--- /dev/null
+++ b/LayoutTests/fast/events/popup-blocked-from-iframe-script.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.setCanOpenWindows();
+ layoutTestController.setPopupBlockingEnabled(true);
+ layoutTestController.setCloseRemainingWindowsWhenComplete(true);
+ layoutTestController.waitUntilDone();
+ // Record current window count.
+ window.windowCount = window.layoutTestController.windowCount();
+}
+function test() {
+ if (window.layoutTestController && window.layoutTestController.windowCount() == window.windowCount)
+ document.getElementById("console").innerText = "PASSED";
+ // Close the test.
+ layoutTestController.notifyDone();
+}
+</script>
+</head>
+<body onload="test();">
+<iframe src="data:text/html,I did open the window<script>window.open('about:blank','_blank', 'height=600,width=720');</script>"></iframe><br>
+When calling script to open a window without user gesture from the enclosing iframe, webkit should test out that the opening is not initiated by user. This is a test case for bug https://bugs.webkit.org/show_bug.cgi?id=42827.
+<div id="console">FAILED</div>
+</body>
+</html>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6777882..2305208 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,44 @@
+2010-08-10 Johnny Ding <jnd at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Change the ScriptController::processingUserGesture to static method
+ and use dynamic(JSC binding)/entered(V8 binding) frame to check the user gesture.
+ https://bugs.webkit.org/show_bug.cgi?id=42827.
+
+ Test: fast/events/popup-blocked-from-iframe-script.html
+
+ * WebCore.order:
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::processingUserGesture):
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::setLocation):
+ (WebCore::createWindow):
+ (WebCore::domWindowAllowPopUp):
+ (WebCore::JSDOMWindow::open):
+ (WebCore::JSDOMWindow::showModalDialog):
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::JSDocument::setLocation):
+ * bindings/js/JSLocationCustom.cpp:
+ (WebCore::navigateIfAllowed):
+ (WebCore::JSLocation::reload):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGesture):
+ * bindings/js/ScriptController.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
+ (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::processingUserGesture):
+ (WebCore::ScriptController::anyPageIsProcessingUserGesture):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/specialization/V8BindingState.cpp:
+ (WebCore::::processingUserGesture):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::isProcessingUserGesture):
+
2010-08-10 Gavin Barraclough <barraclough at apple.com>
Chromium build fix
diff --git a/WebCore/WebCore.order b/WebCore/WebCore.order
index c815bbe..4124777 100644
--- a/WebCore/WebCore.order
+++ b/WebCore/WebCore.order
@@ -7340,8 +7340,8 @@ __ZN7WebCore27JSHTMLMediaElementPrototype18getOwnPropertySlotEPN3JSC9ExecStateER
__ZNK7WebCore18JSHTMLAudioElement9classInfoEv
__ZN7WebCore21jsHTMLMediaElementSrcEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
__ZN7WebCore39jsHTMLMediaElementPrototypeFunctionLoadEPN3JSC9ExecStateEPNS0_8JSObjectENS0_7JSValueERKNS0_7ArgListE
-__ZN7WebCore21processingUserGestureEPN3JSC9ExecStateE
-__ZNK7WebCore16ScriptController21processingUserGestureEPNS_15DOMWrapperWorldE
+__ZN7WebCore21processingUserGestureEv
+__ZN7WebCore16ScriptController21processingUserGestureEv
__ZN7WebCore16HTMLMediaElement4loadEbRi
__ZN7WebCore11MediaPlayerD0Ev
__ZN7WebCore18MediaPlayerPrivateD0Ev
diff --git a/WebCore/bindings/js/JSDOMBinding.cpp b/WebCore/bindings/js/JSDOMBinding.cpp
index 8220f51..7e64713 100644
--- a/WebCore/bindings/js/JSDOMBinding.cpp
+++ b/WebCore/bindings/js/JSDOMBinding.cpp
@@ -679,10 +679,9 @@ Frame* toDynamicFrame(ExecState* exec)
return asJSDOMWindow(exec->dynamicGlobalObject())->impl()->frame();
}
-bool processingUserGesture(ExecState* exec)
+bool processingUserGesture()
{
- Frame* frame = toDynamicFrame(exec);
- return frame && frame->script()->processingUserGesture(currentWorld(exec));
+ return ScriptController::processingUserGesture();
}
KURL completeURL(ExecState* exec, const String& relativeURL)
diff --git a/WebCore/bindings/js/JSDOMBinding.h b/WebCore/bindings/js/JSDOMBinding.h
index 7086a89..2e78eb2 100644
--- a/WebCore/bindings/js/JSDOMBinding.h
+++ b/WebCore/bindings/js/JSDOMBinding.h
@@ -313,7 +313,7 @@ namespace WebCore {
Frame* toLexicalFrame(JSC::ExecState*);
Frame* toDynamicFrame(JSC::ExecState*);
- bool processingUserGesture(JSC::ExecState*);
+ bool processingUserGesture();
KURL completeURL(JSC::ExecState*, const String& relativeURL);
inline JSC::JSValue jsString(JSC::ExecState* exec, const String& s)
diff --git a/WebCore/bindings/js/JSDOMWindowCustom.cpp b/WebCore/bindings/js/JSDOMWindowCustom.cpp
index d38a233..c60d57a 100644
--- a/WebCore/bindings/js/JSDOMWindowCustom.cpp
+++ b/WebCore/bindings/js/JSDOMWindowCustom.cpp
@@ -512,7 +512,7 @@ void JSDOMWindow::setLocation(ExecState* exec, JSValue value)
if (!protocolIsJavaScript(url) || allowsAccessFrom(exec)) {
// We want a new history item if this JS was called via a user gesture
- frame->redirectScheduler()->scheduleLocationChange(url, lexicalFrame->loader()->outgoingReferrer(), !lexicalFrame->script()->anyPageIsProcessingUserGesture(), false, processingUserGesture(exec));
+ frame->redirectScheduler()->scheduleLocationChange(url, lexicalFrame->loader()->outgoingReferrer(), !lexicalFrame->script()->anyPageIsProcessingUserGesture(), false, processingUserGesture());
}
}
@@ -742,7 +742,7 @@ static Frame* createWindow(ExecState* exec, Frame* lexicalFrame, Frame* dynamicF
if (!protocolIsJavaScript(url) || newWindow->allowsAccessFrom(exec)) {
KURL completedURL = url.isEmpty() ? KURL(ParsedURLString, "") : completeURL(exec, url);
- bool userGesture = processingUserGesture(exec);
+ bool userGesture = processingUserGesture();
if (created)
newFrame->loader()->changeLocation(completedURL, referrer, false, false, userGesture);
@@ -753,10 +753,10 @@ static Frame* createWindow(ExecState* exec, Frame* lexicalFrame, Frame* dynamicF
return newFrame;
}
-static bool domWindowAllowPopUp(Frame* activeFrame, ExecState* exec)
+static bool domWindowAllowPopUp(Frame* activeFrame)
{
ASSERT(activeFrame);
- if (activeFrame->script()->processingUserGesture(currentWorld(exec)))
+ if (ScriptController::processingUserGesture())
return true;
return DOMWindow::allowPopUp(activeFrame);
}
@@ -781,7 +781,7 @@ JSValue JSDOMWindow::open(ExecState* exec)
// Because FrameTree::find() returns true for empty strings, we must check for empty framenames.
// Otherwise, illegitimate window.open() calls with no name will pass right through the popup blocker.
- if (!domWindowAllowPopUp(dynamicFrame, exec) && (frameName.isEmpty() || !frame->tree()->find(frameName)))
+ if (!domWindowAllowPopUp(dynamicFrame) && (frameName.isEmpty() || !frame->tree()->find(frameName)))
return jsUndefined();
// Get the target frame for the special cases of _top and _parent. In those
@@ -805,7 +805,7 @@ JSValue JSDOMWindow::open(ExecState* exec)
const JSDOMWindow* targetedWindow = toJSDOMWindow(frame, currentWorld(exec));
if (!completedURL.isEmpty() && (!protocolIsJavaScript(completedURL) || (targetedWindow && targetedWindow->allowsAccessFrom(exec)))) {
- bool userGesture = processingUserGesture(exec);
+ bool userGesture = processingUserGesture();
// For whatever reason, Firefox uses the dynamicGlobalObject to
// determine the outgoingReferrer. We replicate that behavior
@@ -851,7 +851,7 @@ JSValue JSDOMWindow::showModalDialog(ExecState* exec)
if (!dynamicFrame)
return jsUndefined();
- if (!DOMWindow::canShowModalDialogNow(frame) || !domWindowAllowPopUp(dynamicFrame, exec))
+ if (!DOMWindow::canShowModalDialogNow(frame) || !domWindowAllowPopUp(dynamicFrame))
return jsUndefined();
HashMap<String, String> features;
diff --git a/WebCore/bindings/js/JSDocumentCustom.cpp b/WebCore/bindings/js/JSDocumentCustom.cpp
index 7407e86..ec66cbd 100644
--- a/WebCore/bindings/js/JSDocumentCustom.cpp
+++ b/WebCore/bindings/js/JSDocumentCustom.cpp
@@ -88,7 +88,7 @@ void JSDocument::setLocation(ExecState* exec, JSValue value)
if (activeFrame)
str = activeFrame->document()->completeURL(str).string();
- bool userGesture = activeFrame->script()->processingUserGesture(currentWorld(exec));
+ bool userGesture = ScriptController::processingUserGesture();
frame->redirectScheduler()->scheduleLocationChange(str, activeFrame->loader()->outgoingReferrer(), !activeFrame->script()->anyPageIsProcessingUserGesture(), false, userGesture);
}
diff --git a/WebCore/bindings/js/JSLocationCustom.cpp b/WebCore/bindings/js/JSLocationCustom.cpp
index 76005fa..943d8fa 100644
--- a/WebCore/bindings/js/JSLocationCustom.cpp
+++ b/WebCore/bindings/js/JSLocationCustom.cpp
@@ -191,7 +191,7 @@ static void navigateIfAllowed(ExecState* exec, Frame* frame, const KURL& url, bo
return;
if (!protocolIsJavaScript(url) || allowsAccessFromFrame(exec, frame))
- frame->redirectScheduler()->scheduleLocationChange(url.string(), lexicalFrame->loader()->outgoingReferrer(), lockHistory, lockBackForwardList, processingUserGesture(exec));
+ frame->redirectScheduler()->scheduleLocationChange(url.string(), lexicalFrame->loader()->outgoingReferrer(), lockHistory, lockBackForwardList, processingUserGesture());
}
void JSLocation::setHref(ExecState* exec, JSValue value)
@@ -325,7 +325,7 @@ JSValue JSLocation::reload(ExecState* exec)
return jsUndefined();
if (!protocolIsJavaScript(frame->loader()->url()))
- frame->redirectScheduler()->scheduleRefresh(processingUserGesture(exec));
+ frame->redirectScheduler()->scheduleRefresh(processingUserGesture());
return jsUndefined();
}
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index 98022d9..d318cbb 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -244,14 +244,26 @@ int ScriptController::eventHandlerLineNumber() const
return 0;
}
-bool ScriptController::processingUserGesture(DOMWrapperWorld* world) const
+bool ScriptController::processingUserGesture()
{
- if (m_allowPopupsFromPlugin || isJavaScriptAnchorNavigation())
+ ExecState* exec = JSMainThreadExecState::currentState();
+ Frame* frame = exec ? toDynamicFrame(exec) : 0;
+ // No script is running, so it is user-initiated unless the gesture stack
+ // explicitly says it is not.
+ if (!frame)
+ return UserGestureIndicator::getUserGestureState() != DefinitelyNotProcessingUserGesture;
+
+ // FIXME: We check the plugin popup flag and javascript anchor navigation
+ // from the dynamic frame becuase they should only be initiated on the
+ // dynamic frame in which execution began if they do happen.
+ ScriptController* scriptController = frame->script();
+ ASSERT(scriptController);
+ if (scriptController->allowPopupsFromPlugin() || scriptController->isJavaScriptAnchorNavigation())
return true;
// If a DOM event is being processed, check that it was initiated by the user
// and that it is in the whitelist of event types allowed to generate pop-ups.
- if (JSDOMWindowShell* shell = existingWindowShell(world))
+ if (JSDOMWindowShell* shell = scriptController->existingWindowShell(currentWorld(exec)))
if (Event* event = shell->window()->currentEvent())
return event->fromUserGesture();
diff --git a/WebCore/bindings/js/ScriptController.h b/WebCore/bindings/js/ScriptController.h
index 8dae637..2ec71b9 100644
--- a/WebCore/bindings/js/ScriptController.h
+++ b/WebCore/bindings/js/ScriptController.h
@@ -110,7 +110,7 @@ public:
int eventHandlerLineNumber() const;
void setProcessingTimerCallback(bool b) { m_processingTimerCallback = b; }
- bool processingUserGesture(DOMWrapperWorld*) const;
+ static bool processingUserGesture();
bool anyPageIsProcessingUserGesture() const;
static bool canAccessFromCurrentOrigin(Frame*);
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 18ac046..cb7c333 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1993,7 +1993,7 @@ sub GenerateImplementation
if ($function->signature->extendedAttributes->{"NeedsUserGestureCheck"}) {
$functionString .= ", " if $paramIndex;
- $functionString .= "processingUserGesture(exec)";
+ $functionString .= "processingUserGesture()";
$paramIndex++;
}
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 01a860c..9716810 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -1105,7 +1105,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGe
if (exec->hadException())
return JSValue::encode(jsUndefined());
- imp->withDynamicFrameAndUserGesture(dynamicFrame, intArg, processingUserGesture(exec));
+ imp->withDynamicFrameAndUserGesture(dynamicFrame, intArg, processingUserGesture());
return JSValue::encode(jsUndefined());
}
@@ -1133,7 +1133,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGe
if (exec->hadException())
return JSValue::encode(jsUndefined());
- imp->withDynamicFrameAndUserGestureASAD(dynamicFrame, intArg, optionalArg, processingUserGesture(exec));
+ imp->withDynamicFrameAndUserGestureASAD(dynamicFrame, intArg, optionalArg, processingUserGesture());
return JSValue::encode(jsUndefined());
}
diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp
index d35de14..febfdda 100644
--- a/WebCore/bindings/v8/ScriptController.cpp
+++ b/WebCore/bindings/v8/ScriptController.cpp
@@ -160,15 +160,18 @@ void ScriptController::updatePlatformScriptObjects()
notImplemented();
}
-bool ScriptController::processingUserGesture(DOMWrapperWorld*) const
+bool ScriptController::processingUserGesture()
{
+ Frame* activeFrame = V8Proxy::retrieveFrameForEnteredContext();
// No script is running, so it is user-initiated unless the gesture stack
// explicitly says it is not.
- if (!m_proxy->executingScript())
+ if (!activeFrame)
return UserGestureIndicator::getUserGestureState() != DefinitelyNotProcessingUserGesture;
+ V8Proxy* activeProxy = activeFrame->script()->proxy();
+
v8::HandleScope handleScope;
- v8::Handle<v8::Context> v8Context = m_proxy->mainWorldContext();
+ v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(activeFrame);
// FIXME: find all cases context can be empty:
// 1) JS is disabled;
// 2) page is NULL;
@@ -188,7 +191,11 @@ bool ScriptController::processingUserGesture(DOMWrapperWorld*) const
// Event::fromUserGesture will return false when UserGestureIndicator::processingUserGesture() returns false.
return event->fromUserGesture();
}
- if (m_sourceURL && m_sourceURL->isNull() && !m_proxy->timerCallback()) {
+ // FIXME: We check the javascript anchor navigation from the last entered
+ // frame becuase it should only be initiated on the last entered frame in
+ // which execution began if it does happen.
+ const String* sourceURL = activeFrame->script()->sourceURL();
+ if (sourceURL && sourceURL->isNull() && !activeProxy->timerCallback()) {
// This is the <a href="javascript:window.open('...')> case -> we let it through.
return true;
}
@@ -201,7 +208,7 @@ bool ScriptController::processingUserGesture(DOMWrapperWorld*) const
bool ScriptController::anyPageIsProcessingUserGesture() const
{
// FIXME: is this right?
- return processingUserGesture();
+ return ScriptController::processingUserGesture();
}
void ScriptController::evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>& sources)
diff --git a/WebCore/bindings/v8/ScriptController.h b/WebCore/bindings/v8/ScriptController.h
index cd20cda..525476d 100644
--- a/WebCore/bindings/v8/ScriptController.h
+++ b/WebCore/bindings/v8/ScriptController.h
@@ -154,7 +154,7 @@ public:
void setProcessingTimerCallback(bool processingTimerCallback) { m_processingTimerCallback = processingTimerCallback; }
// FIXME: Currently we don't use the parameter world at all.
// See http://trac.webkit.org/changeset/54182
- bool processingUserGesture(DOMWrapperWorld* world = 0) const;
+ static bool processingUserGesture();
bool anyPageIsProcessingUserGesture() const;
void setPaused(bool paused) { m_paused = paused; }
diff --git a/WebCore/bindings/v8/specialization/V8BindingState.cpp b/WebCore/bindings/v8/specialization/V8BindingState.cpp
index d95d578..ccdd7c8 100644
--- a/WebCore/bindings/v8/specialization/V8BindingState.cpp
+++ b/WebCore/bindings/v8/specialization/V8BindingState.cpp
@@ -81,8 +81,7 @@ void State<V8Binding>::immediatelyReportUnsafeAccessTo(Frame* target)
bool State<V8Binding>::processingUserGesture()
{
- Frame* frame = V8Proxy::retrieveFrameForEnteredContext();
- return frame && frame->script()->processingUserGesture();
+ return ScriptController::processingUserGesture();
}
} // namespace WebCore
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 2206db3..0c26394 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -1129,7 +1129,7 @@ bool FrameLoader::isProcessingUserGesture()
Frame* frame = m_frame->tree()->top();
if (!frame->script()->canExecuteScripts(NotAboutToExecuteScript))
return true; // If JavaScript is disabled, a user gesture must have initiated the navigation.
- return frame->script()->processingUserGesture(mainThreadNormalWorld()); // FIXME: Use pageIsProcessingUserGesture.
+ return ScriptController::processingUserGesture(); // FIXME: Use pageIsProcessingUserGesture.
}
void FrameLoader::resetMultipleFormSubmissionProtection()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list