summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-12 14:32:03 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-12 14:32:03 +0200
commitb7d9dad58e5a3f87a6c767412941700bc8010044 (patch)
treef5e99b3029cf54409ae5951e9e91cca3a54addc7 /layout/base
parent73cdd6117df7c17b76aad93952cf574c494351aa (diff)
downloadUXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.gz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.lz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.xz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.zip
Remove MOZ_B2G leftovers and some dead B2G-only components.
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/FrameLayerBuilder.cpp10
-rw-r--r--layout/base/nsIPresShell.h9
-rw-r--r--layout/base/nsPresShell.cpp68
-rw-r--r--layout/base/nsPresShell.h9
4 files changed, 1 insertions, 95 deletions
diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp
index 9269c2ab6..183285439 100644
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -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;
}
}
diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h
index 5990402ed..4016cc0a9 100644
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -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;
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index 42b39c860..0b88948c3 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -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
diff --git a/layout/base/nsPresShell.h b/layout/base/nsPresShell.h
index ad4ede08b..7a9056a38 100644
--- a/layout/base/nsPresShell.h
+++ b/layout/base/nsPresShell.h
@@ -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.