WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
57391
Introduce SimulatedClickEvent and move all simulated-click dispatch code there.
https://bugs.webkit.org/show_bug.cgi?id=57391
Summary
Introduce SimulatedClickEvent and move all simulated-click dispatch code there.
Dimitri Glazkov (Google)
Reported
2011-03-29 15:02:14 PDT
Introduce SimulatedClickEvent and move all simulated-click dispatch code there.
Attachments
Patch
(28.84 KB, patch)
2011-03-29 15:10 PDT
,
Dimitri Glazkov (Google)
no flags
Details
Formatted Diff
Diff
Rebased to ToT and sorted xcodeproj.
(29.35 KB, patch)
2011-03-29 15:33 PDT
,
Dimitri Glazkov (Google)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Dimitri Glazkov (Google)
Comment 1
2011-03-29 15:10:26 PDT
Created
attachment 87415
[details]
Patch
Dimitri Glazkov (Google)
Comment 2
2011-03-29 15:33:09 PDT
Created
attachment 87418
[details]
Rebased to ToT and sorted xcodeproj.
Darin Adler
Comment 3
2011-03-29 15:43:28 PDT
Comment on
attachment 87415
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=87415&action=review
> Source/WebCore/ChangeLog:8 > + The SimulatedClickEvent, instead of dispatching self, fires one or more SimulatedMouseEvents.
I don’t understand why a simulated click, which is a sequence of events, now needs to be a kind of event. Can’t we simulate clicks by sending a sequence of events? Why do we need to trigger that with yet another event?
Dimitri Glazkov (Google)
Comment 4
2011-03-29 15:51:11 PDT
(In reply to
comment #3
)
> (From update of
attachment 87415
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=87415&action=review
> > > Source/WebCore/ChangeLog:8 > > + The SimulatedClickEvent, instead of dispatching self, fires one or more SimulatedMouseEvents. > > I don’t understand why a simulated click, which is a sequence of events, now needs to be a kind of event. Can’t we simulate clicks by sending a sequence of events? Why do we need to trigger that with yet another event?
The fact that it fires multiple events is a detail that isn't exposed anywhere from the call site of Node::dispatchSimulatedClick, just like dispatchMouseEvent may fire an extra dblclick event. Wrapping this into an Event seems consistent with how any other event would be dispatched: dispatchEvent(FooEvent::create(...)). Also, it wraps the logic neatly into its own class.
Dimitri Glazkov (Google)
Comment 5
2011-03-29 15:55:26 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > (From update of
attachment 87415
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=87415&action=review
> > > > > Source/WebCore/ChangeLog:8 > > > + The SimulatedClickEvent, instead of dispatching self, fires one or more SimulatedMouseEvents. > > > > I don’t understand why a simulated click, which is a sequence of events, now needs to be a kind of event. Can’t we simulate clicks by sending a sequence of events? Why do we need to trigger that with yet another event? > > The fact that it fires multiple events is a detail that isn't exposed anywhere from the call site of Node::dispatchSimulatedClick, just like dispatchMouseEvent may fire an extra dblclick event. > > Wrapping this into an Event seems consistent with how any other event would be dispatched: dispatchEvent(FooEvent::create(...)). > > Also, it wraps the logic neatly into its own class.
I can also just have SimulatedMouseEvent (possibly put it the MouseEvent files), then leave EventDispatcher::dispatchSimulatedClick using them.
Darin Adler
Comment 6
2011-03-29 16:00:55 PDT
(In reply to
comment #4
)
> The fact that it fires multiple events is a detail that isn't exposed anywhere from the call site of Node::dispatchSimulatedClick, just like dispatchMouseEvent may fire an extra dblclick event.
Sure, we can encapsulate that into a function.
> Wrapping this into an Event seems consistent with how any other event would be dispatched: dispatchEvent(FooEvent::create(...)).
This seems to be the sole benefit, and I’m not sure it’s better.
> Also, it wraps the logic neatly into its own class.
You could do that without having the class be derived from Event.
Darin Adler
Comment 7
2011-03-29 16:01:13 PDT
(In reply to
comment #5
)
> I can also just have SimulatedMouseEvent (possibly put it the MouseEvent files), then leave EventDispatcher::dispatchSimulatedClick using them.
I’d prefer that.
Dimitri Glazkov (Google)
Comment 8
2011-03-29 16:05:48 PDT
(In reply to
comment #7
)
> (In reply to
comment #5
) > > I can also just have SimulatedMouseEvent (possibly put it the MouseEvent files), then leave EventDispatcher::dispatchSimulatedClick using them. > > I’d prefer that.
ok, patch coming up.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug