Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Issue 839073004: Ignore left-button eventSender.mouseDown() uses while dragging. (Closed)

Created:
5 years, 11 months ago by sof
Modified:
5 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, mkwst+moarreviews-shell_chromium.org, jam, jochen+watch_chromium.org, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ignore left-button eventSender.mouseDown() uses while dragging. To avoid confusing the drag&drop implementation overly, if an eventSender-initiated drag operation is already in progress, ignore uses of eventSender.mouseDown() for left button presses. R= BUG=445308

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M content/shell/renderer/test_runner/event_sender.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
sof
Please take a look. Allowing mouseDown() while a file drag has been initiated via eventSender, ...
5 years, 11 months ago (2015-01-09 16:50:30 UTC) #2
Rick Byers
On 2015/01/09 16:50:30, sof wrote: > Please take a look. > > Allowing mouseDown() while ...
5 years, 11 months ago (2015-01-09 17:01:08 UTC) #3
sof
On 2015/01/09 17:01:08, Rick Byers wrote: > On 2015/01/09 16:50:30, sof wrote: > > Please ...
5 years, 11 months ago (2015-01-09 17:23:43 UTC) #4
Rick Byers
On 2015/01/09 17:23:43, sof wrote: > On 2015/01/09 17:01:08, Rick Byers wrote: > > On ...
5 years, 11 months ago (2015-01-09 19:13:48 UTC) #5
sof
5 years, 11 months ago (2015-01-09 19:57:10 UTC) #6
On 2015/01/09 19:13:48, Rick Byers wrote:
> On 2015/01/09 17:23:43, sof wrote:
> > On 2015/01/09 17:01:08, Rick Byers wrote:
> > > On 2015/01/09 16:50:30, sof wrote:
> > > > Please take a look.
> > > > 
> > > > Allowing mouseDown() while a file drag has been initiated via
eventSender,
> > > just
> > > > makes Blink very confused when the drag comes to an eventual end.
> > > > 
> > > > A layout test that exercises non-crashing behavior will be added by
> > > > https://codereview.chromium.org/839253002/
> > > 
> > > Are you sure this crash can't be provoked in scenarios outside of event
> > sender? 
> > > Eg. maybe if I start dragging a file using touch drag and drop, and then
do
> a
> > > mouse button down.  Or what if I'm dragging a file with one mouse device
> then
> > a
> > > second mouse device sends a left button down event?
> > > 
> > > If it's at all reasonable the fix the underlying issue with confusion in
> blink
> > > then I'd prefer that to an event_sender-specific fix.  It's nice to have
> > > clusterfuzz be able to generate arbitrary overlapped input through
> eventSender
> > > to simulate potential real-world scenarios.  But if we reasonably believe
> that
> > > such a scenario can never happen in practice (eg. maybe by a comment in
> event
> > > sender pointing at the code in chromium/blink that implements such a
> > restriction
> > > on real input events), then it's reasonable to add code like this to
prevent
> > it
> > > in event_sender.
> > 
> > For this particular case, Blink treats the later mouse down as attempting to
> > initiate a new drag (the link being dragged over isn't dragged far enough
for
> > that to really get started.) EventSender is oblivious to that drag restart
> (and
> > implicit cancellation of the initial file drag), so when it delivers the
mouse
> > up that initial file drag is attempted "ended". Which Blink isn't prepared
> for.
> > 
> > We could address that by making Blink cope with such an unexpected/incorrect
> > drag end here, but it seems to me that the embedder should be coordinated
> about
> > what drag operation (and from what device) is under way.
> 
> In general we try not to make blink rely entirely on the embedder to send
> rational event streams.  There's just too many variables (including, eg. bugs
> with drivers on Windows).  We also have a bunch of special case scenarios
where
> multiple types of input can compete (eg. during perf testing we send synthetic
> input, but a user might touch the device at the same time).  So I'd like blink
> to try to be robust to unusual event streams (although perhaps we should have
a
> 'strict event mode' we can put it into to trigger ASSERTs on unexpected event
> streams).
>  
> > Does Blink really aim
> > to support multiple ongoing drag&drops, possibly from multiple devices? A
> page's
> > DragController doesn't appear to be tailored for that.
> 
> No, I don't think it does - but to me that's the bug, we don't handle that
case
> gracefully.  clusterfuzz/event_sender has done us a favor here by showing how
> such an un-coordinated event stream can cause a crash.  We should try to fix
the
> crash, but I don't think we need to do anything smarter than just
reject/ignore
> the unexpected input (i.e. I don't really care how such a weird case behaves,
as
> long as the behavior doesn't cause problems like crashes, apparently stuck
> input, etc.).
> 
> We also use event_sender to test blink fixes for crashes caused by unexpected
> input event streams, so really it should ideally be capable of sending any
> stream that the embedder can send (conceptually it's just a different
embedder).
> 
> WDYT?

I think you've convinced me that it'd be preferable to handle this on the Blink
side; will close this and continue at
https://codereview.chromium.org/839253002/. Hopefully you can be convinced to
come along as well? :-)

Powered by Google App Engine
This is Rietveld 408576698