mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Remove MOZ_B2G leftovers and some dead B2G-only components.
This commit is contained in:
parent
75d98fd33e
commit
719ac1bc38
91 changed files with 28 additions and 5017 deletions
|
|
@ -201,10 +201,6 @@
|
|||
#include "nsIDocShellTreeOwner.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
#include "nsIHardwareKeyHandler.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_TASK_TRACER
|
||||
#include "GeckoTaskTracer.h"
|
||||
using namespace mozilla::tasktracer;
|
||||
|
|
@ -7236,38 +7232,6 @@ PresShell::HandleKeyboardEvent(nsINode* aTarget,
|
|||
DispatchAfterKeyboardEventInternal(chain, aEvent, aEvent.DefaultPrevented());
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
bool
|
||||
PresShell::ForwardKeyToInputMethodApp(nsINode* aTarget,
|
||||
WidgetKeyboardEvent& aEvent,
|
||||
nsEventStatus* aStatus)
|
||||
{
|
||||
if (!XRE_IsParentProcess() || aEvent.mIsSynthesizedByTIP ||
|
||||
aEvent.IsKeyEventOnPlugin()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mHardwareKeyHandler) {
|
||||
nsresult rv;
|
||||
mHardwareKeyHandler =
|
||||
do_GetService("@mozilla.org/HardwareKeyHandler;1", &rv);
|
||||
if (!NS_SUCCEEDED(rv) || !mHardwareKeyHandler) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (mHardwareKeyHandler->ForwardKeyToInputMethodApp(aTarget,
|
||||
aEvent.AsKeyboardEvent(),
|
||||
aStatus)) {
|
||||
// No need to dispatch the forwarded keyboard event to it's child process
|
||||
aEvent.mFlags.mNoCrossProcessBoundaryForwarding = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif // MOZ_B2G
|
||||
|
||||
bool
|
||||
PresShell::ForwardKeyToInputMethodAppOrDispatch(bool aIsTargetRemote,
|
||||
nsINode* aTarget,
|
||||
|
|
@ -7275,41 +7239,9 @@ PresShell::ForwardKeyToInputMethodAppOrDispatch(bool aIsTargetRemote,
|
|||
nsEventStatus* aStatus,
|
||||
EventDispatchingCallback* aEventCB)
|
||||
{
|
||||
#ifndef MOZ_B2G
|
||||
// No need to forward to input-method-app if the platform isn't run on B2G.
|
||||
EventDispatcher::Dispatch(aTarget, mPresContext,
|
||||
&aEvent, nullptr, aStatus, aEventCB);
|
||||
return false;
|
||||
#else
|
||||
// In-process case: the event target is in the current process
|
||||
if (!aIsTargetRemote) {
|
||||
if(ForwardKeyToInputMethodApp(aTarget, aEvent, aStatus)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the keyboard event isn't forwarded to the input-method-app,
|
||||
// then it should be dispatched to its event target directly.
|
||||
EventDispatcher::Dispatch(aTarget, mPresContext,
|
||||
&aEvent, nullptr, aStatus, aEventCB);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// OOP case: the event target is in its child process.
|
||||
// Dispatch the keyboard event to the iframe that embeds the remote
|
||||
// event target first.
|
||||
EventDispatcher::Dispatch(aTarget, mPresContext,
|
||||
&aEvent, nullptr, aStatus, aEventCB);
|
||||
|
||||
// If the event is defaultPrevented, then there is no need to forward it
|
||||
// to the input-method-app.
|
||||
if (aEvent.mFlags.mDefaultPrevented) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Try forwarding to the input-method-app.
|
||||
return ForwardKeyToInputMethodApp(aTarget, aEvent, aStatus);
|
||||
#endif // MOZ_B2G
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue