On Mon, May 21, 2012 at 12:32 PM, Andy Estes <[email protected]> wrote:
> > On May 21, 2012, at 12:25 PM, Andrew Wilson <[email protected]> wrote: > > No, because the setTimeout() callback would be executed outside the > context of a user gesture. > > > This isn't always true. User gesture state is forwarded to the timeout's > callback if the timeout was scheduled in the context of a user gesture and > the interval is one second or less. > Yes, I just saw this. So it's not as simple as just keeping a flag around, because someone may have already created a timer that propagated the user gesture context to the timer callback. BTW, currently it looks like it's left up to the individual port to determine whether a window is allowed to call focus/blur() outside the context of a user gesture (there's no restriction built in to DOMWindow::focus()). If we're going to be changing this logic, should we also explicitly put a check for processingUserGesture() in focus()/blur()? Or do any ports *want* to allow this behavior to be controlled by the port? As it stands, if a port doesn't explicitly check for processingUserGesture() in its focusDocumentView() handler, then any window can focus itself at any time. > > -Andy >
_______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

