Disable old scrollwheel-message-laundering hack via pref
Categories
(Core :: Widget: Win32, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | fixed |
People
(Reporter: rkraesig, Assigned: rkraesig)
References
Details
Attachments
(5 external files, 1 obsolete file)
Bug 658194 introduced a hack wherein scroll messages would be extracted from the thread's message queue early, posted back to the queue under a different message-ID, and then immediately reextracted for processing by the target nsWindow.
This was intended to avoid deadlock induced by some NPAPI plugins running in the plugin-container process. However, we don't support those at all anymore — plugin-container is now only used for media-decoding plugins, which shouldn't need to process scroll messages. Additionally, there are some indications that this is impacting Firefox performance in long-running browser sessions. (See analysis in bug 1819286.)
As this is in a deep and thoroughly-aged part of our message-handling code, just unconditionally removing it is probably a bad idea. However, we can add a controlling pref, and then test the pref in certain populations (like "Nightly" or "users for whom this is believed to be an issue").
| Assignee | ||
Comment 1•2 years ago
|
||
The semantics of the old technically-third-party MSH_MOUSEWHEEL message
were different from that of the modern WM_MOUSEWHEEL. [1] Unfortunately,
when we updated the scroll-wheel code back in Firefox 1.8/2.0, we copied
the MSH_MOUSEWHEEL semantics over into the WM_MOUSEWHEEL code. (See bug
347875.)
This has probably never caused issues, but we might as well fix it.
[1] https://devblogs.microsoft.com/oldnewthing/20080806-00/?p=21353
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
Clean up MouseScrollHandler::SynthesizedEvent:
- Since this is a private local class, move it into the .cpp file, to
minimize the number of compilation units that need to parse it. - Explicitly check
mSynthesizingEventfor validity BEFORE calling
nonstatic member functions. (Previously this code would call through
nullptras part of normal operation!) - Use
UniquePtrin preference to explicitnewanddelete.
Additionally, at the end of the file, undo the #define-poisoning of
GetMessagePos to allow WinMouseScrollHandler.cpp to be used in unified
builds. Adjust moz.build accordingly.
No functional changes.
fixup for unified
| Assignee | ||
Comment 3•2 years ago
|
||
Bug 658194 introduced a hack wherein scroll messages would be extracted
from the thread's message queue early, posted back to the queue under a
different message-ID, and then immediately reextracted for processing by
the target nsWindow.
This was intended to avoid deadlocks induced by some NPAPI plugins
running in the plugin-container process. However, we don't support
NPAPI plugins at all anymore, so this should no longer be necessary.
The key word in that sentence is, of course, "should". Instead of
outright removing the hack, for now we just make its use dependent on a
pref (defaulted to off).
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 4•2 years ago
|
||
Extract the component of ProcessNativeMouseWheelMessage which identifies
the adjusted target window, for use in the alternative event flow in the
next commit.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 5•2 years ago
|
||
We no longer have any plugins that accept mouse inputs. Remove the
plugin-handling case from ProcessNativeMouseWheelMessage, in preparation
for a refactor.
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 6•2 years ago
|
||
Check that the new code paths don't accidentally recurse.
(This commit should be squashed into the preceding commit before
landing.)
Updated•2 years ago
|
Comment 8•2 years ago
|
||
Backed out for causing mochitests failures in test_mouse_scroll.xhtml.
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | widget/tests/test_mouse_scroll.xhtml | WM_VSCROLL, SB_LINEDOWN, lParam is NULL, emulation disabled:(DOMMouseScroll), event shouldn't be fired - didn't expect +0, but got it
| Assignee | ||
Comment 9•2 years ago
•
|
||
Locally reproduced and
(EDIT: This partial post was accidentally submitted; there is no "and" yet.)
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/42d6b08aed11
https://hg.mozilla.org/mozilla-central/rev/20e5ecefe7bc
https://hg.mozilla.org/mozilla-central/rev/e8dc7437a627
https://hg.mozilla.org/mozilla-central/rev/bd03cf6754bb
https://hg.mozilla.org/mozilla-central/rev/c2a74411687b
Description
•