New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: populate phase of WebMouseWheelEvents in webContents.sendInputEvent #17757
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
webContents.sendInputEvent
to send aWebMouseWheelEvent
no longer fails a Chromium pre-condition, which was causing a failedDCHECK
in debug builds.
Are there any changes noticeable by users?
b20ef0d
to
99df065
Compare
99df065
to
ab01c43
Compare
@alexeykuzmin updated the release note to be more relevant to users. |
Release Notes Persisted
|
/trop run backport-to 4-2-x |
The backport process for this PR has been manually initiated, |
/trop run backport-to 5-0-x |
The backport process for this PR has been manually initiated, |
I have automatically backported this PR to "4-2-x", please check out #18494 |
/trop run backport-to 6-0-x |
The backport process for this PR has been manually initiated, |
I have automatically backported this PR to "5-0-x", please check out #18495 |
I was unable to backport this PR to "6-0-x" cleanly; |
When wheel scroll latching and async wheel events are enabled, phase information gets added to
WebMouseWheelEvents
when they are generated from native events. Chromium expects this information to be available and asserts that expectation with aDCHECK
. Phase information must be synthesized and set to aWebMouseWheelEvent
that is generated withwebContents.sendInputEvent
or aDCHECK
will fail in Chromium.The very same problem was found and fixed in Chromium for the simulation of mouse wheel events from the devtools. See ticket and fix commit. This is basically a port of that fix to
webContents.sendInputEvent
.This makes it possible to run the test in this PR.
Checklist
npm test
passesRelease Notes
Notes: Using
webContents.sendInputEvent
to send aWebMouseWheelEvent
now has the expected effect.