This reverts commit 312ba34b1e.
Revert "Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll"
This reverts commit cdcd922a07.
Revert "Bug 2039903 - Use proper types for PBrowser::SynthesizeNativeMouseEvent. r=masayuki"
This reverts commit 45369938ed.
Revert "Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll"
This reverts commit 479f174ddb.
This reverts commit 0062ee7423.
Revert "Bug 1983375 - part 1: Define `MOZ_LOG_ONLY_DEBUG` and variants in `Logging.h` and sort it out `GetBoolName` for making it more generic r=emilio,padenot"
This reverts commit b61fa4819b.
During the initial preference-gating of the message-laundering hack, the
check around transitioning to the NATIVE_MESSAGE_RECEIVED wait-state was
removed from the hackless code path (along with the wait-state itself).
Reimplement the check in question, albeit without the additional wait-
state.
No functional changes when not using synthesized messages.
Differential Revision: https://phabricator.services.mozilla.com/D237091
Remove all of MOZ_WM_MOUSE{V,H}WHEEL and MOZ_WM_{V,H}SCROLL. Document
their removal and reserve their former values.
Concomitantly, rename and redocument several private member functions of
MouseScrollHandler, and remove a now-almost-certainly-superfluous check
for unintended recursion.
No functional changes, unless I'm wrong about the recursion check.
Differential Revision: https://phabricator.services.mozilla.com/D236596
Remove `WinUtils::GetNativeMessage()`, which is now effectively always
the identity function.
Also, remove `MouseScrollHandler::NeedsMessage()` as dead code.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236595
In the previous patches, we removed the only use of PostMessage which
could ever post a MOZ_WM_* message to our message queue. That means we
can get started on removing those messages entirely.
To begin with, remove them from the dispatching switch-statement in
MouseScrollHandler::ProcessMessage(). Since this means that MOZ_WM_*
will never be fed into either HandleMouseWheelMessage() or
HandleScrollMessageAsMouseWheelMessage(), rewrite those to not mutate
the function parameter into an internal message.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236594
Remove dead code from MouseScrollHandler::SynthesizingEvent:
- NativeMessageReceived()
- NotifyNativeMessageHandlingFinished()
- Status::NATIVE_MESSAGE_RECEIVED
- Status::INTERNAL_MESSAGE_POSTED
Additionally, rename NotifyInternalMessageHandlingFinished to just
NotifyMessageHandlingFinished, since there is no "internal" message
handling anymore.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236593
Remove the MouseScrollHandler::ProcessNative{MouseWheel,Scroll}Message()
functions as dead code.
Similarly, remove the now-unused mIsWaitingInternalMessage flag, its
getter, and all associated conditionals.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236592
Remove MouseScrollHandler::SkipScrollWheelMessageHack() and the
associated pref, as part of removing the eponymous hack entirely.
In the case where this pref is off (which it is by default), no
functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236591
During the initial preference-gating of the message-laundering hack, the
check around transitioning to the NATIVE_MESSAGE_RECEIVED wait-state was
removed from the hackless code path (along with the wait-state itself).
Reimplement the check in question, albeit without the additional wait-
state.
No functional changes when not using synthesized messages.
Differential Revision: https://phabricator.services.mozilla.com/D237091
Remove all of MOZ_WM_MOUSE{V,H}WHEEL and MOZ_WM_{V,H}SCROLL. Document
their removal and reserve their former values.
Concomitantly, rename and redocument several private member functions of
MouseScrollHandler, and remove a now-almost-certainly-superfluous check
for unintended recursion.
No functional changes, unless I'm wrong about the recursion check.
Differential Revision: https://phabricator.services.mozilla.com/D236596
Remove `WinUtils::GetNativeMessage()`, which is now effectively always
the identity function.
Also, remove `MouseScrollHandler::NeedsMessage()` as dead code.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236595
In the previous patches, we removed the only use of PostMessage which
could ever post a MOZ_WM_* message to our message queue. That means we
can get started on removing those messages entirely.
To begin with, remove them from the dispatching switch-statement in
MouseScrollHandler::ProcessMessage(). Since this means that MOZ_WM_*
will never be fed into either HandleMouseWheelMessage() or
HandleScrollMessageAsMouseWheelMessage(), rewrite those to not mutate
the function parameter into an internal message.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236594
Remove dead code from MouseScrollHandler::SynthesizingEvent:
- NativeMessageReceived()
- NotifyNativeMessageHandlingFinished()
- Status::NATIVE_MESSAGE_RECEIVED
- Status::INTERNAL_MESSAGE_POSTED
Additionally, rename NotifyInternalMessageHandlingFinished to just
NotifyMessageHandlingFinished, since there is no "internal" message
handling anymore.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236593
Remove the MouseScrollHandler::ProcessNative{MouseWheel,Scroll}Message()
functions as dead code.
Similarly, remove the now-unused mIsWaitingInternalMessage flag, its
getter, and all associated conditionals.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236592
Remove MouseScrollHandler::SkipScrollWheelMessageHack() and the
associated pref, as part of removing the eponymous hack entirely.
In the case where this pref is off (which it is by default), no
functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236591
During the initial preference-gating of the message-laundering hack, the
check around transitioning to the NATIVE_MESSAGE_RECEIVED wait-state was
removed from the hackless code path (along with the wait-state itself).
Reimplement the check in question, albeit without the additional state.
No functional changes when not using synthesized messages.
Differential Revision: https://phabricator.services.mozilla.com/D237091
Remove all of MOZ_WM_MOUSE{V,H}WHEEL and MOZ_WM_{V,H}SCROLL. Document
their removal and reserve their former values.
Concomitantly, rename and redocument several private member functions of
MouseScrollHandler, and remove a now-almost-certainly-superfluous check
for unintended recursion.
No functional changes, unless I'm wrong about the recursion check.
Differential Revision: https://phabricator.services.mozilla.com/D236596
Remove `WinUtils::GetNativeMessage()`, which is now effectively always
the identity function.
Also, remove `MouseScrollHandler::NeedsMessage()` as dead code.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236595
In the previous patches, we removed the only use of PostMessage which
could ever post a MOZ_WM_* message to our message queue. That means we
can get started on removing those messages entirely.
To begin with, remove them from the dispatching switch-statement in
MouseScrollHandler::ProcessMessage(). Since this means that MOZ_WM_*
will never be fed into either HandleMouseWheelMessage() or
HandleScrollMessageAsMouseWheelMessage(), rewrite those to not mutate
the function parameter into an internal message.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236594
Remove dead code from MouseScrollHandler::SynthesizingEvent:
- NativeMessageReceived()
- NotifyNativeMessageHandlingFinished()
- Status::NATIVE_MESSAGE_RECEIVED
- Status::INTERNAL_MESSAGE_POSTED
Additionally, rename NotifyInternalMessageHandlingFinished to just
NotifyMessageHandlingFinished, since there is no "internal" message
handling anymore.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236593
Remove the MouseScrollHandler::ProcessNative{MouseWheel,Scroll}Message()
functions as dead code.
Similarly, remove the now-unused mIsWaitingInternalMessage flag, its
getter, and all associated conditionals.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236592
Remove MouseScrollHandler::SkipScrollWheelMessageHack() and the
associated pref, as part of removing the eponymous hack entirely.
In the case where this pref is off (which it is by default), no
functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D236591
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 introduce an alternate
processing path avoiding it, and make its use dependent on a pref
(defaulted to use the new path).
Differential Revision: https://phabricator.services.mozilla.com/D226268
Extract the component of `ProcessNativeMouseWheelMessage` which identifies
the adjusted target window, for use in the alternative event flow in the
next commit.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D226732
We no longer have any plugins that accept mouse inputs. Remove the
plugin-handling case from ProcessNativeMouseWheelMessage, in preparation
for a refactor.
Differential Revision: https://phabricator.services.mozilla.com/D226860
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 `mSynthesizingEvent` for validity BEFORE calling
nonstatic member functions. (Previously this code would call through
`nullptr` as part of normal operation!)
- Use `UniquePtr` in preference to explicit `new` and `delete`.
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.
- Remove a now-unnecessary kungFuDeathGrip. (The event-object
immediately afterwards also holds a strong reference.)
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D226267
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
Differential Revision: https://phabricator.services.mozilla.com/D226266
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).
Differential Revision: https://phabricator.services.mozilla.com/D226268
Extract the component of `ProcessNativeMouseWheelMessage` which identifies
the adjusted target window, for use in the alternative event flow in the
next commit.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D226732
We no longer have any plugins that accept mouse inputs. Remove the
plugin-handling case from ProcessNativeMouseWheelMessage, in preparation
for a refactor.
Differential Revision: https://phabricator.services.mozilla.com/D226860
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 `mSynthesizingEvent` for validity BEFORE calling
nonstatic member functions. (Previously this code would call through
`nullptr` as part of normal operation!)
- Use `UniquePtr` in preference to explicit `new` and `delete`.
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.
- Remove a now-unnecessary kungFuDeathGrip. (The event-object
immediately afterwards also holds a strong reference.)
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D226267
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
Differential Revision: https://phabricator.services.mozilla.com/D226266