mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1043608 - Remove unnecessary widget listener in APZController. r=jimm
This commit is contained in:
parent
01619aa03f
commit
4a471f2099
@ -8,7 +8,6 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#include "MetroUtils.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsIWidgetListener.h"
|
||||
#include "mozilla/layers/APZCCallbackHelper.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsPresContext.h"
|
||||
@ -85,10 +84,8 @@ class RequestContentRepaintEvent : public nsRunnable
|
||||
typedef mozilla::layers::FrameMetrics FrameMetrics;
|
||||
|
||||
public:
|
||||
RequestContentRepaintEvent(const FrameMetrics& aFrameMetrics,
|
||||
nsIWidgetListener* aListener) :
|
||||
mFrameMetrics(aFrameMetrics),
|
||||
mWidgetListener(aListener)
|
||||
RequestContentRepaintEvent(const FrameMetrics& aFrameMetrics) :
|
||||
mFrameMetrics(aFrameMetrics)
|
||||
{
|
||||
}
|
||||
|
||||
@ -144,15 +141,8 @@ public:
|
||||
}
|
||||
protected:
|
||||
FrameMetrics mFrameMetrics;
|
||||
nsIWidgetListener* mWidgetListener;
|
||||
};
|
||||
|
||||
void
|
||||
APZController::SetWidgetListener(nsIWidgetListener* aWidgetListener)
|
||||
{
|
||||
mWidgetListener = aWidgetListener;
|
||||
}
|
||||
|
||||
void
|
||||
APZController::ContentReceivedTouch(const ScrollableLayerGuid& aGuid, bool aPreventDefault)
|
||||
{
|
||||
@ -198,17 +188,11 @@ APZController::ReceiveInputEvent(WidgetInputEvent* aEvent,
|
||||
void
|
||||
APZController::RequestContentRepaint(const FrameMetrics& aFrameMetrics)
|
||||
{
|
||||
if (!mWidgetListener) {
|
||||
NS_WARNING("Can't update display port, !mWidgetListener");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CONTROLLER
|
||||
WinUtils::Log("APZController::RequestContentRepaint scrollid=%I64d",
|
||||
aFrameMetrics.GetScrollId());
|
||||
#endif
|
||||
nsCOMPtr<nsIRunnable> r1 = new RequestContentRepaintEvent(aFrameMetrics,
|
||||
mWidgetListener);
|
||||
nsCOMPtr<nsIRunnable> r1 = new RequestContentRepaintEvent(aFrameMetrics);
|
||||
if (!NS_IsMainThread()) {
|
||||
NS_DispatchToMainThread(r1);
|
||||
} else {
|
||||
|
@ -12,8 +12,6 @@
|
||||
#include "FrameMetrics.h"
|
||||
#include "Units.h"
|
||||
|
||||
class nsIWidgetListener;
|
||||
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
namespace winrt {
|
||||
@ -26,8 +24,7 @@ class APZController :
|
||||
typedef mozilla::layers::ZoomConstraints ZoomConstraints;
|
||||
|
||||
public:
|
||||
APZController() :
|
||||
mWidgetListener(nullptr)
|
||||
APZController()
|
||||
{
|
||||
}
|
||||
|
||||
@ -53,8 +50,6 @@ public:
|
||||
APZStateChange aChange,
|
||||
int aArg);
|
||||
|
||||
void SetWidgetListener(nsIWidgetListener* aWidgetListener);
|
||||
|
||||
bool HitTestAPZC(mozilla::ScreenIntPoint& aPoint);
|
||||
void TransformCoordinateToGecko(const mozilla::ScreenIntPoint& aPoint,
|
||||
LayoutDeviceIntPoint* aRefPointOut);
|
||||
@ -65,9 +60,6 @@ public:
|
||||
public:
|
||||
// todo: make this a member variable as prep for multiple views
|
||||
static nsRefPtr<mozilla::layers::APZCTreeManager> sAPZC;
|
||||
|
||||
private:
|
||||
nsIWidgetListener* mWidgetListener;
|
||||
};
|
||||
|
||||
} } }
|
||||
|
@ -1030,9 +1030,6 @@ void
|
||||
MetroWidget::SetWidgetListener(nsIWidgetListener* aWidgetListener)
|
||||
{
|
||||
mWidgetListener = aWidgetListener;
|
||||
if (mController) {
|
||||
mController->SetWidgetListener(aWidgetListener);
|
||||
}
|
||||
}
|
||||
|
||||
CompositorParent* MetroWidget::NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight)
|
||||
@ -1043,7 +1040,6 @@ CompositorParent* MetroWidget::NewCompositorParent(int aSurfaceWidth, int aSurfa
|
||||
mRootLayerTreeId = compositor->RootLayerTreeId();
|
||||
|
||||
mController = new APZController();
|
||||
mController->SetWidgetListener(mWidgetListener);
|
||||
|
||||
CompositorParent::SetControllerForLayerTree(mRootLayerTreeId, mController);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user