mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-01 12:57:31 +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
|
|
@ -2346,15 +2346,7 @@ ContainerState::GetLayerCreationHint(AnimatedGeometryRoot* aAnimatedGeometryRoot
|
|||
break;
|
||||
}
|
||||
nsIScrollableFrame* scrollable = do_QueryFrame(fParent);
|
||||
if (scrollable
|
||||
#ifdef MOZ_B2G
|
||||
&& scrollable->WantAsyncScroll()
|
||||
#endif
|
||||
) {
|
||||
// WantAsyncScroll() returns false when the frame has overflow:hidden,
|
||||
// so we won't create tiled layers for overflow:hidden frames even if
|
||||
// they have a display port. The main purpose of the WantAsyncScroll check
|
||||
// is to allow the B2G camera app to use hardware composer for compositing.
|
||||
if (scrollable) {
|
||||
return LayerManager::SCROLLABLE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,10 +51,6 @@
|
|||
#include "nsFrameState.h"
|
||||
#include "Units.h"
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
#include "nsIHardwareKeyHandler.h"
|
||||
#endif
|
||||
|
||||
class nsDocShell;
|
||||
class nsIDocument;
|
||||
class nsIFrame;
|
||||
|
|
@ -1766,11 +1762,6 @@ protected:
|
|||
// moving/sizing loop is running, see bug 491700 for details.
|
||||
nsCOMPtr<nsITimer> mReflowContinueTimer;
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
// Forward hardware key events to the input-method-app
|
||||
nsCOMPtr<nsIHardwareKeyHandler> mHardwareKeyHandler;
|
||||
#endif // MOZ_B2G
|
||||
|
||||
#ifdef DEBUG
|
||||
nsIFrame* mDrawEventTargetFrame;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -815,15 +815,6 @@ protected:
|
|||
bool aEmbeddedCancelled,
|
||||
size_t aChainIndex = 0);
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
// This method is used to forward the keyboard event to the input-method-app
|
||||
// before the event is dispatched to its event target.
|
||||
// Return true if it's successfully forwarded. Otherwise, return false.
|
||||
bool ForwardKeyToInputMethodApp(nsINode* aTarget,
|
||||
mozilla::WidgetKeyboardEvent& aEvent,
|
||||
nsEventStatus* aStatus);
|
||||
#endif // MOZ_B2G
|
||||
|
||||
// This method tries forwarding key events to the input-method-editor(IME).
|
||||
// If the event isn't be forwarded, then it will be dispathed to its target.
|
||||
// Return true when event is successfully forwarded to the input-method-editor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue