Bug 111923 - Don't create multiple user gesture indicators when forwarding events to sub frames
Summary: Don't create multiple user gesture indicators when forwarding events to sub f...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: jochen
URL:
Keywords:
Depends on: 111959
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-09 11:14 PST by jochen
Modified: 2013-03-11 22:47 PDT (History)
2 users (show)

See Also:


Attachments
Patch (7.84 KB, patch)
2013-03-09 11:16 PST, jochen
no flags Details | Formatted Diff | Diff
Patch (10.31 KB, patch)
2013-03-11 15:29 PDT, jochen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jochen 2013-03-09 11:14:33 PST
Don't create multiple user gesture indicators when forwarding events to sub frames
Comment 1 jochen 2013-03-09 11:16:55 PST
Created attachment 192347 [details]
Patch
Comment 2 Adam Barth 2013-03-09 11:21:45 PST
Comment on attachment 192347 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=192347&action=review

> Source/WebCore/page/EventHandler.cpp:3169
> +    OwnPtr<UserGestureIndicator> gestureIndicator;
> +
> +    if (!UserGestureIndicator::processingUserGesture())
> +        gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessingUserGesture));

Why doesn't UserGestureIndicator do this work for us?  If we're already processing a user gesture, perhaps the UserGestureIndicator shouldn't bump the count in the token...  Maybe that should be an option in the constructor?
Comment 3 jochen 2013-03-09 11:35:41 PST
(In reply to comment #2)
> (From update of attachment 192347 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=192347&action=review
> 
> > Source/WebCore/page/EventHandler.cpp:3169
> > +    OwnPtr<UserGestureIndicator> gestureIndicator;
> > +
> > +    if (!UserGestureIndicator::processingUserGesture())
> > +        gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessingUserGesture));
> 
> Why doesn't UserGestureIndicator do this work for us?  If we're already processing a user gesture, perhaps the UserGestureIndicator shouldn't bump the count in the token...  Maybe that should be an option in the constructor?

That's a good question.

I guess that doing this by default won't work, e.g. when we run a nested message loop with a indicator on the stack during a showModalDialog() call.

I need to think of a good name for an additional enum
Comment 4 jochen 2013-03-11 15:29:24 PDT
Created attachment 192575 [details]
Patch
Comment 5 jochen 2013-03-11 15:30:32 PDT
As soon as bug 111959 is resolved, this patch will apply
Comment 6 Adam Barth 2013-03-11 15:42:41 PDT
Comment on attachment 192575 [details]
Patch

Thanks, this is much better.
Comment 7 WebKit Review Bot 2013-03-11 22:47:33 PDT
Comment on attachment 192575 [details]
Patch

Clearing flags on attachment: 192575

Committed r145481: <http://trac.webkit.org/changeset/145481>
Comment 8 WebKit Review Bot 2013-03-11 22:47:36 PDT
All reviewed patches have been landed.  Closing bug.