[Webkit-unassigned] [Bug 33188] ER: Need a way to know when FrameLoader is loading a URL based on user action

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 6 07:23:54 PST 2010


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





--- Comment #12 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2010-01-06 07:23:53 PST ---
After writing a few tests, I think FrameLoader::isProcessingUserGesture()
answers a different question than I'm asking.

We call ScriptController::isProcessingUserGesture() via FrameLoader because we
want to know if the currently running JavaScript code was explicitly started by
user action (and not implicitly as part of an page load, for example).  That's
exactly what we want to know when asking the question:  Should we open a new
window when calling window.open()?  That's because we ask it during the
JavaScript code execution.

However, it's the wrong question to ask when you want to know if the content
currently being loaded (or that was previously loaded) in a frame was due to
explicit user action (which is the new concept that I originally created this
bug for).

So where to go from where?  I'm thinking:

- Write tests for isProcessingUserGesture() when calling window.open().
- Introduce new concept (FrameLoader::wasLoadedByUserGesture() or similar) with
tests.

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