[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
Mon Jul 26 01:15:09 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=42827





--- Comment #9 from Johnny Ding <jnd at chromium.org>  2010-07-26 01:15:09 PST ---
(In reply to comment #8)
> I think that we shouldn't make conclusion based on the last entered frame. There may be several entered frames on the stack and it may happen that one of them processing user gesture is not the topmost one. 

Yes, there may be several entered frames(V8 uses a list to save all entered frames), and it is possible that the frame which is processing user gesture is not the topmost one. But the entered frame we get from JS engine is the last entered frame, the event which can be treated as user gesture seems to only happen in that last entered frame. I may be wrong since I am not the engine expert, please correct me if I am wrong.
In my attached test case, the click event fired on the iframe, no matter which window finally opened the new popup, the last entered frame we get in chromium is always the frame of iframe element.

> I suggest isProcessingUserGesture should be a property of the owning Page. In that case we could check it from any frame and if any of the frames is processing user gesture the test would succeed for any frame in the page.

I agree with you that the isProcessingUserGesture should only return the user-gesture status of the owning Page, not status of another page, that is why I proposed to add another function in ScriptController.

(In reply to comment #8)
> What I don't understand is why m_javaScriptCanOpenWindowsAutomatically is always true in Chromium if we want to allow only user initiated popups.

That is because Chromium want to get all popup requests and judge them in browser process. In Chromium, we implement the popup blocked in the browser process and judge the popup requests according to their user-gesture status. If one popup request is not user initiated and user does not set exception rule for it, chromium will deny the request, otherwise the request will be granted (Please refer to TabContents::AddNewContents and TabContents::AddPopup, We will change the behavior of popup blocker a little bit according to bug http://crbug.com/38458)

-- 
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