[Webkit-unassigned] [Bug 42827] Use the js-execute-active(entered) Frame to check the user gesture of page instead of checking the top frame
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 3 07:15:37 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=42827
--- Comment #24 from Johnny Ding <jnd at chromium.org> 2010-08-03 07:15:37 PST ---
(In reply to comment #23)
> (From update of attachment 63048 [details])
> WebCore/bindings/js/ScriptController.cpp:249
> + ExecState* exec = JSMainThreadExecState::currentState();
> Why don't we pass in the exec state? (All the call sites I see so far seem in have an exec state.)
We passed the DOMWrapperWorld to ScriptController::processingUserGesture in both V8 binding and JSC binding. So we can call the ScriptController::processingUserGesture in other WebCore code regardless of which binding WebKit used.
If we change to pass the exec state to ScriptController::processingUserGesture, since there is no exec state in V8 binding, we can not call ScriptController::processingUserGesture in WebCore (for example, the call in FrameLoader) except we create a wrapper object for exec state in V8.
As Darin suggested, we can drop the DOMWrapperWorld parameter (V8 never use it) in both two bindings.
> WebCore/bindings/v8/ScriptController.cpp:208
> + bool ScriptController::anyPageIsProcessingUserGesture() const
> Seems like we should just remove this method since it's the same as processingUserGesture().
In V8 binding, yes, anyPageIsProcessingUserGesture is the same as processingUserGesture,
But looking the FIXME comment, looks like the original author is not confident for this implementation, and also anyPageIsProcessingUserGesture has its own implementation in JSC binding. So I am not sure we should remove this function in V8 binding in the patch of this bug.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list