forked from mirrors/gecko-dev
Bug 1638163 - Reduce unnecessary GeckoContentController.h includes. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D75433
This commit is contained in:
parent
499724a33f
commit
13e67cc06b
16 changed files with 106 additions and 82 deletions
|
|
@ -35,11 +35,11 @@
|
|||
#include "mozilla/layers/CompositorTypes.h"
|
||||
#include "mozilla/layers/APZCCallbackHelper.h"
|
||||
#include "mozilla/layers/CompositorOptions.h"
|
||||
#include "mozilla/layers/GeckoContentControllerTypes.h"
|
||||
#include "nsIWebBrowserChrome3.h"
|
||||
#include "mozilla/dom/ipc/IdType.h"
|
||||
#include "AudioChannelService.h"
|
||||
#include "PuppetWidget.h"
|
||||
#include "mozilla/layers/GeckoContentController.h"
|
||||
#include "nsDeque.h"
|
||||
|
||||
class nsBrowserStatusFilter;
|
||||
|
|
@ -579,13 +579,13 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
|
|||
const nsTArray<layers::ScrollableLayerGuid>& aTargets) const;
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY
|
||||
mozilla::ipc::IPCResult RecvHandleTap(
|
||||
const layers::GeckoContentController::TapType& aType,
|
||||
const layers::GeckoContentController_TapType& aType,
|
||||
const LayoutDevicePoint& aPoint, const Modifiers& aModifiers,
|
||||
const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId);
|
||||
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY
|
||||
mozilla::ipc::IPCResult RecvNormalPriorityHandleTap(
|
||||
const layers::GeckoContentController::TapType& aType,
|
||||
const layers::GeckoContentController_TapType& aType,
|
||||
const LayoutDevicePoint& aPoint, const Modifiers& aModifiers,
|
||||
const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId);
|
||||
|
||||
|
|
@ -595,7 +595,7 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
|
|||
bool UpdateFrame(const layers::RepaintRequest& aRequest);
|
||||
bool NotifyAPZStateChange(
|
||||
const ViewID& aViewId,
|
||||
const layers::GeckoContentController::APZStateChange& aChange,
|
||||
const layers::GeckoContentController_APZStateChange& aChange,
|
||||
const int& aArg);
|
||||
void StartScrollbarDrag(const layers::AsyncDragMetrics& aDragMetrics);
|
||||
void ZoomToRect(const uint32_t& aPresShellId,
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ class BrowserParent final : public PBrowserParent,
|
|||
public TabContext,
|
||||
public LiveResizeListener {
|
||||
typedef mozilla::dom::ClonedMessageData ClonedMessageData;
|
||||
using TapType = GeckoContentController_TapType;
|
||||
|
||||
friend class PBrowserParent;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ using struct mozilla::layers::ZoomConstraints from "mozilla/layers/ZoomConstrain
|
|||
using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
|
||||
using mozilla::layers::LayersObserverEpoch from "mozilla/layers/LayersTypes.h";
|
||||
using mozilla::layers::MaybeZoomConstraints from "mozilla/layers/ZoomConstraints.h";
|
||||
using mozilla::layers::GeckoContentController::TapType from "mozilla/layers/GeckoContentController.h";
|
||||
using mozilla::layers::GeckoContentController_TapType from "mozilla/layers/GeckoContentControllerTypes.h";
|
||||
using ScrollableLayerGuid::ViewID from "mozilla/layers/ScrollableLayerGuid.h";
|
||||
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
||||
using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
|
||||
|
|
@ -802,10 +802,10 @@ child:
|
|||
uint64_t aInputBlockId,
|
||||
nsEventStatus aApzResponse);
|
||||
|
||||
prio(input) async HandleTap(TapType aType, LayoutDevicePoint point,
|
||||
prio(input) async HandleTap(GeckoContentController_TapType aType, LayoutDevicePoint point,
|
||||
Modifiers aModifiers, ScrollableLayerGuid aGuid,
|
||||
uint64_t aInputBlockId);
|
||||
async NormalPriorityHandleTap(TapType aType, LayoutDevicePoint point,
|
||||
async NormalPriorityHandleTap(GeckoContentController_TapType aType, LayoutDevicePoint point,
|
||||
Modifiers aModifiers, ScrollableLayerGuid aGuid,
|
||||
uint64_t aInputBlockId);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "mozilla/layers/APZChild.h"
|
||||
#include "mozilla/layers/APZCTreeManagerChild.h"
|
||||
#include "mozilla/layers/CompositorBridgeChild.h"
|
||||
#include "mozilla/layers/GeckoContentController.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsBaseWidget.h"
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef mozilla_layers_GeckoContentController_h
|
||||
#define mozilla_layers_GeckoContentController_h
|
||||
|
||||
#include "GeckoContentControllerTypes.h"
|
||||
#include "InputData.h" // for PinchGestureInput
|
||||
#include "LayersTypes.h" // for ScrollDirection
|
||||
#include "Units.h" // for CSSPoint, CSSRect, etc
|
||||
|
|
@ -28,6 +29,8 @@ namespace layers {
|
|||
|
||||
class GeckoContentController {
|
||||
public:
|
||||
using APZStateChange = GeckoContentController_APZStateChange;
|
||||
using TapType = GeckoContentController_TapType;
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GeckoContentController)
|
||||
|
||||
/**
|
||||
|
|
@ -50,30 +53,6 @@ class GeckoContentController {
|
|||
*/
|
||||
virtual void RequestContentRepaint(const RepaintRequest& aRequest) = 0;
|
||||
|
||||
/**
|
||||
* Different types of tap-related events that can be sent in
|
||||
* the HandleTap function. The names should be relatively self-explanatory.
|
||||
* Note that the eLongTapUp will always be preceded by an eLongTap, but not
|
||||
* all eLongTap notifications will be followed by an eLongTapUp (for instance,
|
||||
* if the user moves their finger after triggering the long-tap but before
|
||||
* lifting it).
|
||||
* The difference between eDoubleTap and eSecondTap is subtle - the eDoubleTap
|
||||
* is for an actual double-tap "gesture" while eSecondTap is for the same user
|
||||
* input but where a double-tap gesture is not allowed. This is used to fire
|
||||
* a click event with detail=2 to web content (similar to what a mouse double-
|
||||
* click would do).
|
||||
*/
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS_AT_CLASS_SCOPE(
|
||||
TapType, (
|
||||
eSingleTap,
|
||||
eDoubleTap,
|
||||
eSecondTap,
|
||||
eLongTap,
|
||||
eLongTapUp
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Requests handling of a tap event. |aPoint| is in LD pixels, relative to the
|
||||
* current scroll offset.
|
||||
|
|
@ -126,34 +105,6 @@ class GeckoContentController {
|
|||
*/
|
||||
virtual void DispatchToRepaintThread(already_AddRefed<Runnable> aTask) = 0;
|
||||
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS_AT_CLASS_SCOPE(
|
||||
APZStateChange, (
|
||||
/**
|
||||
* APZ started modifying the view (including panning, zooming, and fling).
|
||||
*/
|
||||
eTransformBegin,
|
||||
/**
|
||||
* APZ finished modifying the view.
|
||||
*/
|
||||
eTransformEnd,
|
||||
/**
|
||||
* APZ started a touch.
|
||||
* |aArg| is 1 if touch can be a pan, 0 otherwise.
|
||||
*/
|
||||
eStartTouch,
|
||||
/**
|
||||
* APZ started a pan.
|
||||
*/
|
||||
eStartPanning,
|
||||
/**
|
||||
* APZ finished processing a touch.
|
||||
* |aArg| is 1 if touch was a click, 0 otherwise.
|
||||
*/
|
||||
eEndTouch
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* General notices of APZ state changes for consumers.
|
||||
* |aGuid| identifies the APZC originating the state change.
|
||||
|
|
|
|||
68
gfx/layers/apz/public/GeckoContentControllerTypes.h
Normal file
68
gfx/layers/apz/public/GeckoContentControllerTypes.h
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_layers_GeckoContentControllerTypes_h
|
||||
#define mozilla_layers_GeckoContentControllerTypes_h
|
||||
|
||||
#include "mozilla/DefineEnum.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS(GeckoContentController_APZStateChange, (
|
||||
/**
|
||||
* APZ started modifying the view (including panning, zooming, and fling).
|
||||
*/
|
||||
eTransformBegin,
|
||||
/**
|
||||
* APZ finished modifying the view.
|
||||
*/
|
||||
eTransformEnd,
|
||||
/**
|
||||
* APZ started a touch.
|
||||
* |aArg| is 1 if touch can be a pan, 0 otherwise.
|
||||
*/
|
||||
eStartTouch,
|
||||
/**
|
||||
* APZ started a pan.
|
||||
*/
|
||||
eStartPanning,
|
||||
/**
|
||||
* APZ finished processing a touch.
|
||||
* |aArg| is 1 if touch was a click, 0 otherwise.
|
||||
*/
|
||||
eEndTouch
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Different types of tap-related events that can be sent in
|
||||
* the HandleTap function. The names should be relatively self-explanatory.
|
||||
* Note that the eLongTapUp will always be preceded by an eLongTap, but not
|
||||
* all eLongTap notifications will be followed by an eLongTapUp (for instance,
|
||||
* if the user moves their finger after triggering the long-tap but before
|
||||
* lifting it).
|
||||
* The difference between eDoubleTap and eSecondTap is subtle - the eDoubleTap
|
||||
* is for an actual double-tap "gesture" while eSecondTap is for the same user
|
||||
* input but where a double-tap gesture is not allowed. This is used to fire
|
||||
* a click event with detail=2 to web content (similar to what a mouse double-
|
||||
* click would do).
|
||||
*/
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS(GeckoContentController_TapType, (
|
||||
eSingleTap,
|
||||
eDoubleTap,
|
||||
eSecondTap,
|
||||
eLongTap,
|
||||
eLongTapUp
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_layers_GeckoContentControllerTypes_h
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "Units.h"
|
||||
#include "mozilla/EventForwards.h"
|
||||
#include "mozilla/layers/GeckoContentController.h" // for APZStateChange
|
||||
#include "mozilla/layers/GeckoContentControllerTypes.h" // for APZStateChange
|
||||
#include "mozilla/layers/ScrollableLayerGuid.h" // for ScrollableLayerGuid
|
||||
#include "mozilla/layers/TouchCounter.h" // for TouchCounter
|
||||
#include "mozilla/RefPtr.h"
|
||||
|
|
@ -43,7 +43,7 @@ typedef std::function<void(uint64_t /* input block id */,
|
|||
* gestures and sending APZ notifications.
|
||||
*/
|
||||
class APZEventState final {
|
||||
typedef GeckoContentController::APZStateChange APZStateChange;
|
||||
typedef GeckoContentController_APZStateChange APZStateChange;
|
||||
typedef ScrollableLayerGuid::ViewID ViewID;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "mozilla/dom/BrowserParent.h" // for BrowserParent
|
||||
#include "mozilla/layers/APZCCallbackHelper.h" // for APZCCallbackHelper
|
||||
#include "mozilla/layers/APZInputBridgeChild.h" // for APZInputBridgeChild
|
||||
#include "mozilla/layers/GeckoContentController.h" // for GeckoContentController
|
||||
#include "mozilla/layers/RemoteCompositorSession.h" // for RemoteCompositorSession
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ class RemoteCompositorSession;
|
|||
class APZCTreeManagerChild : public IAPZCTreeManager,
|
||||
public PAPZCTreeManagerChild {
|
||||
friend class PAPZCTreeManagerChild;
|
||||
using TapType = GeckoContentController_TapType;
|
||||
|
||||
public:
|
||||
APZCTreeManagerChild();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include "mozilla/layers/PAPZChild.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace layers {
|
||||
|
||||
class GeckoContentController;
|
||||
|
|
@ -21,6 +20,8 @@ class GeckoContentController;
|
|||
*/
|
||||
class APZChild final : public PAPZChild {
|
||||
public:
|
||||
using APZStateChange = GeckoContentController_APZStateChange;
|
||||
|
||||
explicit APZChild(RefPtr<GeckoContentController> aController);
|
||||
virtual ~APZChild();
|
||||
|
||||
|
|
@ -61,7 +62,6 @@ class APZChild final : public PAPZChild {
|
|||
};
|
||||
|
||||
} // namespace layers
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_layers_APZChild_h
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#include "mozilla/layers/CompositorVsyncScheduler.h"
|
||||
#include "mozilla/layers/ContentCompositorBridgeParent.h"
|
||||
#include "mozilla/layers/FrameUniformityData.h"
|
||||
#include "mozilla/layers/GeckoContentController.h"
|
||||
#include "mozilla/layers/ImageBridgeParent.h"
|
||||
#include "mozilla/layers/LayerManagerComposite.h"
|
||||
#include "mozilla/layers/LayerManagerMLGPU.h"
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include "mozilla/layers/CompositorController.h"
|
||||
#include "mozilla/layers/CompositorOptions.h"
|
||||
#include "mozilla/layers/CompositorVsyncSchedulerOwner.h"
|
||||
#include "mozilla/layers/GeckoContentController.h"
|
||||
#include "mozilla/layers/ISurfaceAllocator.h" // for IShmemAllocator
|
||||
#include "mozilla/layers/LayersMessages.h" // for TargetConfig
|
||||
#include "mozilla/layers/MetricsSharingController.h"
|
||||
|
|
@ -88,6 +87,7 @@ class CompositorAnimationStorage;
|
|||
class CompositorBridgeParent;
|
||||
class CompositorManagerParent;
|
||||
class CompositorVsyncScheduler;
|
||||
class GeckoContentController;
|
||||
class HostLayerManager;
|
||||
class IAPZCTreeManager;
|
||||
class LayerTransactionParent;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "mozilla/layers/CompositorOptions.h"
|
||||
#include "mozilla/layers/CompositorTypes.h"
|
||||
#include "mozilla/layers/FocusTarget.h"
|
||||
#include "mozilla/layers/GeckoContentController.h"
|
||||
#include "mozilla/layers/GeckoContentControllerTypes.h"
|
||||
#include "mozilla/layers/KeyboardMap.h"
|
||||
#include "mozilla/layers/LayerAttributes.h"
|
||||
#include "mozilla/layers/LayersTypes.h"
|
||||
|
|
@ -715,21 +715,20 @@ struct ParamTraits<mozilla::layers::KeyboardMap> {
|
|||
}
|
||||
};
|
||||
|
||||
typedef mozilla::layers::GeckoContentController GeckoContentController;
|
||||
typedef GeckoContentController::TapType TapType;
|
||||
|
||||
template <>
|
||||
struct ParamTraits<TapType> : public ContiguousEnumSerializerInclusive<
|
||||
TapType, TapType::eSingleTap,
|
||||
GeckoContentController::sHighestTapType> {};
|
||||
|
||||
typedef GeckoContentController::APZStateChange APZStateChange;
|
||||
|
||||
template <>
|
||||
struct ParamTraits<APZStateChange>
|
||||
struct ParamTraits<mozilla::layers::GeckoContentController_TapType>
|
||||
: public ContiguousEnumSerializerInclusive<
|
||||
APZStateChange, APZStateChange::eTransformBegin,
|
||||
GeckoContentController::sHighestAPZStateChange> {};
|
||||
mozilla::layers::GeckoContentController_TapType,
|
||||
mozilla::layers::GeckoContentController_TapType::eSingleTap,
|
||||
mozilla::layers::kHighestGeckoContentController_TapType> {};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::layers::GeckoContentController_APZStateChange>
|
||||
: public ContiguousEnumSerializerInclusive<
|
||||
mozilla::layers::GeckoContentController_APZStateChange,
|
||||
mozilla::layers::GeckoContentController_APZStateChange::
|
||||
eTransformBegin,
|
||||
mozilla::layers::kHighestGeckoContentController_APZStateChange> {};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::layers::EventRegionsOverride>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ using struct mozilla::layers::RepaintRequest from "mozilla/layers/RepaintRequest
|
|||
using struct mozilla::layers::ScrollableLayerGuid from "mozilla/layers/ScrollableLayerGuid.h";
|
||||
using mozilla::layers::ScrollableLayerGuid::ViewID from "mozilla/layers/ScrollableLayerGuid.h";
|
||||
using mozilla::layers::MaybeZoomConstraints from "mozilla/layers/ZoomConstraints.h";
|
||||
using mozilla::layers::GeckoContentController::APZStateChange from "mozilla/layers/GeckoContentController.h";
|
||||
using mozilla::layers::GeckoContentController_APZStateChange from "mozilla/layers/GeckoContentControllerTypes.h";
|
||||
using mozilla::layers::ScrollDirection from "mozilla/layers/LayersTypes.h";
|
||||
using mozilla::layers::MatrixMessage from "mozilla/layers/MatrixMessage.h";
|
||||
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
|
||||
|
|
@ -60,7 +60,7 @@ child:
|
|||
|
||||
async NotifyMozMouseScrollEvent(ViewID aScrollId, nsString aEvent);
|
||||
|
||||
async NotifyAPZStateChange(ScrollableLayerGuid aGuid, APZStateChange aChange, int aArg);
|
||||
async NotifyAPZStateChange(ScrollableLayerGuid aGuid, GeckoContentController_APZStateChange aChange, int aArg);
|
||||
|
||||
async NotifyFlushComplete();
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ using mozilla::layers::ScrollableLayerGuid from "mozilla/layers/ScrollableLayerG
|
|||
using mozilla::layers::ScrollableLayerGuid::ViewID from "mozilla/layers/ScrollableLayerGuid.h";
|
||||
using mozilla::layers::TouchBehaviorFlags from "mozilla/layers/LayersTypes.h";
|
||||
using mozilla::layers::AsyncDragMetrics from "mozilla/layers/AsyncDragMetrics.h";
|
||||
using mozilla::layers::GeckoContentController::TapType from "mozilla/layers/GeckoContentController.h";
|
||||
using mozilla::layers::GeckoContentController_TapType from "mozilla/layers/GeckoContentControllerTypes.h";
|
||||
using class mozilla::layers::KeyboardMap from "mozilla/layers/KeyboardMap.h";
|
||||
using mozilla::wr::RenderRoot from "mozilla/webrender/WebRenderTypes.h";
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ parent:
|
|||
|
||||
child:
|
||||
|
||||
async HandleTap(TapType aType, LayoutDevicePoint point, Modifiers aModifiers,
|
||||
async HandleTap(GeckoContentController_TapType aType, LayoutDevicePoint point, Modifiers aModifiers,
|
||||
ScrollableLayerGuid aGuid, uint64_t aInputBlockId);
|
||||
|
||||
async NotifyPinchGesture(PinchGestureType aType, ScrollableLayerGuid aGuid,
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ EXPORTS.mozilla.layers += [
|
|||
'apz/public/APZUpdater.h',
|
||||
'apz/public/CompositorController.h',
|
||||
'apz/public/GeckoContentController.h',
|
||||
'apz/public/GeckoContentControllerTypes.h',
|
||||
'apz/public/IAPZCTreeManager.h',
|
||||
'apz/public/MatrixMessage.h',
|
||||
'apz/public/MetricsSharingController.h',
|
||||
|
|
|
|||
Loading…
Reference in a new issue