|
|
Created:
4 years, 9 months ago by Navid Zolghadr Modified:
4 years, 8 months ago CC:
chromium-reviews, blink-reviews, dtapuska+blinkwatch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionSuppress mouseup/down when button is NoButton
Chrome sends the mousedown/up in some cases
when the 4th/5th button is pressed/released
without actually sending that button value as
we don't have yet the plumbing needed for that.
BUG=574959
Committed: https://crrev.com/620c6710dc14652ce936417c04a355c529cd89c1
Cr-Commit-Position: refs/heads/master@{#383812}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Removing redundant braces #
Total comments: 1
Patch Set 3 : Moving the checks to the origin #Patch Set 4 : Change to HandledSuppressed #Messages
Total messages: 26 (6 generated)
Description was changed from ========== Supress mouseup/down when button not 0 Chrome sends the mousedown/up in some cases when the 4th/5th button is pressed/released without actually sending that button value as we don't have yet the plumbing needed for that. BUG=574959 ========== to ========== Suppress mouseup/down when button is NoButton Chrome sends the mousedown/up in some cases when the 4th/5th button is pressed/released without actually sending that button value as we don't have yet the plumbing needed for that. BUG=574959 ==========
nzolghadr@chromium.org changed reviewers: + dtapuska@chromium.org, mustaq@chromium.org, rbyers@google.com
ptal
nzolghadr@chromium.org changed reviewers: + rbyers@chromium.org - rbyers@google.com
https://codereview.chromium.org/1824733006/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1824733006/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/input/EventHandler.cpp:1693: if (mouseEventType != EventTypeNames::mousemove && mouseEvent.button() == NoButton) { braces aren't needed here
https://codereview.chromium.org/1824733006/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1824733006/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/input/EventHandler.cpp:1382: clickEventResult = WebInputEventResult::HandledSystem; I think we should make those buttons completely ineffective, not even changing focus etc above. I suggest adding the "bailout code" earlier, near the entry point to EventHandler, and keep the "deeper" code intact. I mean at both handleMousePressEvent(PlatformMouseEvent&) and handleMouseReleaseEvent(PlatformMouseEvent&).
ptal. Dave, also does HandledSystem make sense in this case or should I return NotHandled?
On 2016/03/24 14:46:04, Navid Zolghadr wrote: > ptal. > > Dave, also does HandledSystem make sense in this case or should I return > NotHandled? Personally I think HandledSuppressed is the correct one; because you aren't dispatching it to the JS are you?
On 2016/03/24 15:01:07, dtapuska wrote: > On 2016/03/24 14:46:04, Navid Zolghadr wrote: > > ptal. > > > > Dave, also does HandledSystem make sense in this case or should I return > > NotHandled? > > Personally I think HandledSuppressed is the correct one; because you aren't > dispatching it to the JS are you? Awesome. I'm not. I return in the early steps to prevent generating and firing the event to JS altogether.
On 2016/03/24 15:11:39, Navid Zolghadr wrote: > On 2016/03/24 15:01:07, dtapuska wrote: > > On 2016/03/24 14:46:04, Navid Zolghadr wrote: > > > ptal. > > > > > > Dave, also does HandledSystem make sense in this case or should I return > > > NotHandled? > > > > Personally I think HandledSuppressed is the correct one; because you aren't > > dispatching it to the JS are you? > > Awesome. > I'm not. I return in the early steps to prevent generating and firing the event > to JS altogether. Dave, doesn't NotHandled seem the best choice here? Do you see any effect upstream?
On 2016/03/24 15:43:44, mustaq wrote: > On 2016/03/24 15:11:39, Navid Zolghadr wrote: > > On 2016/03/24 15:01:07, dtapuska wrote: > > > On 2016/03/24 14:46:04, Navid Zolghadr wrote: > > > > ptal. > > > > > > > > Dave, also does HandledSystem make sense in this case or should I return > > > > NotHandled? > > > > > > Personally I think HandledSuppressed is the correct one; because you aren't > > > dispatching it to the JS are you? > > > > Awesome. > > I'm not. I return in the early steps to prevent generating and firing the > event > > to JS altogether. > > Dave, doesn't NotHandled seem the best choice here? Do you see any effect > upstream? I think Suppressed is the safest choice here since we are never giving them off to javascript and it doesn't have the opportunity to cancel them. If we encounter an issue in chrome wanting to know if JS handled these buttons or not then we will need to fix setting the buttons correctly and calling the JS first.
ptal. I changed it to HandledSuppressed.
On 2016/03/24 15:59:48, Navid Zolghadr wrote: > ptal. > > I changed it to HandledSuppressed. lgtm
lgtm
Sorry for the delay - I'd written something last week but apparently I didn't actually submit it. This seems like good defense to me (although the right long-term thing here is to fix the underlying bug with extra mouse buttons). But what about a test? I think EventSender should let you construct such an event stream (since it's purpose is to unit test blink input handling by mocking out the chromium side). But if that turns out to be non-trivial, then it's probably not worth the effort and I'm OK landing without a test. But if it's trivial as I suspect, then it's probably worth doing since it could be an easy regression.
Sorry for the delay - I'd written something last week but apparently I didn't actually submit it. This seems like good defense to me (although the right long-term thing here is to fix the underlying bug with extra mouse buttons). But what about a test? I think EventSender should let you construct such an event stream (since it's purpose is to unit test blink input handling by mocking out the chromium side). But if that turns out to be non-trivial, then it's probably not worth the effort and I'm OK landing without a test. But if it's trivial as I suspect, then it's probably worth doing since it could be an easy regression.
On 2016/03/29 16:09:45, Rick Byers wrote: > Sorry for the delay - I'd written something last week but apparently I didn't > actually submit it. > > This seems like good defense to me (although the right long-term thing here is > to fix the underlying bug with extra mouse buttons). > > But what about a test? I think EventSender should let you construct such an > event stream (since it's purpose is to unit test blink input handling by mocking > out the chromium side). But if that turns out to be non-trivial, then it's > probably not worth the effort and I'm OK landing without a test. But if it's > trivial as I suspect, then it's probably worth doing since it could be an easy > regression. Right now event sender apis do not let me send mousedown/up with button=-1. Do you want me to add a new api or modify the existing api to let the javascript send mousedowns/ups with no button pressed?
On 2016/03/29 16:21:18, Navid Zolghadr wrote: > On 2016/03/29 16:09:45, Rick Byers wrote: > > Sorry for the delay - I'd written something last week but apparently I didn't > > actually submit it. > > > > This seems like good defense to me (although the right long-term thing here is > > to fix the underlying bug with extra mouse buttons). > > > > But what about a test? I think EventSender should let you construct such an > > event stream (since it's purpose is to unit test blink input handling by > mocking > > out the chromium side). But if that turns out to be non-trivial, then it's > > probably not worth the effort and I'm OK landing without a test. But if it's > > trivial as I suspect, then it's probably worth doing since it could be an easy > > regression. > > Right now event sender apis do not let me send mousedown/up with button=-1. Do > you want me to add a new api or modify the existing api to let the javascript > send mousedowns/ups with no button pressed? I also considered about testing through event_sender but I backed off because it would require at least a semi-complete plumbing with WebMouseEvent with 4th/5th buttons. I would suggest filing a bug for the complete plumbing (if not already done).
On 2016/03/29 16:25:20, mustaq wrote: > On 2016/03/29 16:21:18, Navid Zolghadr wrote: > > On 2016/03/29 16:09:45, Rick Byers wrote: > > > Sorry for the delay - I'd written something last week but apparently I > didn't > > > actually submit it. > > > > > > This seems like good defense to me (although the right long-term thing here > is > > > to fix the underlying bug with extra mouse buttons). > > > > > > But what about a test? I think EventSender should let you construct such an > > > event stream (since it's purpose is to unit test blink input handling by > > mocking > > > out the chromium side). But if that turns out to be non-trivial, then it's > > > probably not worth the effort and I'm OK landing without a test. But if > it's > > > trivial as I suspect, then it's probably worth doing since it could be an > easy > > > regression. > > > > Right now event sender apis do not let me send mousedown/up with button=-1. Do > > you want me to add a new api or modify the existing api to let the javascript > > send mousedowns/ups with no button pressed? > > I also considered about testing through event_sender but I backed off because it > would require at least a semi-complete plumbing with WebMouseEvent with 4th/5th > buttons. > > I would suggest filing a bug for the complete plumbing (if not already done). There is this bug which talks about this full plumbing. crbug.com/567771
On 2016/03/29 16:26:59, Navid Zolghadr wrote: > On 2016/03/29 16:25:20, mustaq wrote: > > On 2016/03/29 16:21:18, Navid Zolghadr wrote: > > > On 2016/03/29 16:09:45, Rick Byers wrote: > > > > Sorry for the delay - I'd written something last week but apparently I > > didn't > > > > actually submit it. > > > > > > > > This seems like good defense to me (although the right long-term thing > here > > is > > > > to fix the underlying bug with extra mouse buttons). > > > > > > > > But what about a test? I think EventSender should let you construct such > an > > > > event stream (since it's purpose is to unit test blink input handling by > > > mocking > > > > out the chromium side). But if that turns out to be non-trivial, then > it's > > > > probably not worth the effort and I'm OK landing without a test. But if > > it's > > > > trivial as I suspect, then it's probably worth doing since it could be an > > easy > > > > regression. > > > > > > Right now event sender apis do not let me send mousedown/up with button=-1. > Do > > > you want me to add a new api or modify the existing api to let the > javascript > > > send mousedowns/ups with no button pressed? > > > > I also considered about testing through event_sender but I backed off because > it > > would require at least a semi-complete plumbing with WebMouseEvent with > 4th/5th > > buttons. I don't think that's true - we'd just need the ability to send mousedown with button=-1 as Navid said. But still, EventSender hasn't been very consistent about permitting "invalid" event sequences (if we KNOW chromium can't generate the sequence, it's often not worth the hassle - especially since clusterfuzz will trigger every crazy invalid combination it can get away with :-) So I'm ok leaving the testing of 4th/5th button scenarios to crbug.com/567771 (by which time hopefully we'll be able to write more of a complete end-to-end interop test instead of doing unit testing via eventsender). LGTM > > > > I would suggest filing a bug for the complete plumbing (if not already done). > > There is this bug which talks about this full plumbing. > > crbug.com/567771
The CQ bit was checked by nzolghadr@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1824733006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1824733006/60001
Message was sent while issue was closed.
Description was changed from ========== Suppress mouseup/down when button is NoButton Chrome sends the mousedown/up in some cases when the 4th/5th button is pressed/released without actually sending that button value as we don't have yet the plumbing needed for that. BUG=574959 ========== to ========== Suppress mouseup/down when button is NoButton Chrome sends the mousedown/up in some cases when the 4th/5th button is pressed/released without actually sending that button value as we don't have yet the plumbing needed for that. BUG=574959 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Suppress mouseup/down when button is NoButton Chrome sends the mousedown/up in some cases when the 4th/5th button is pressed/released without actually sending that button value as we don't have yet the plumbing needed for that. BUG=574959 ========== to ========== Suppress mouseup/down when button is NoButton Chrome sends the mousedown/up in some cases when the 4th/5th button is pressed/released without actually sending that button value as we don't have yet the plumbing needed for that. BUG=574959 Committed: https://crrev.com/620c6710dc14652ce936417c04a355c529cd89c1 Cr-Commit-Position: refs/heads/master@{#383812} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/620c6710dc14652ce936417c04a355c529cd89c1 Cr-Commit-Position: refs/heads/master@{#383812} |