mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 14:46:02 +00:00
Bug 898105 - Remove nsIDOMTouch r=reuben
This commit is contained in:
parent
ad52880c7a
commit
267331a573
@ -25,27 +25,12 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(Touch, mTarget)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Touch)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMTouch)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(Touch)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(Touch)
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetIdentifier(int32_t* aIdentifier)
|
||||
{
|
||||
*aIdentifier = Identifier();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetTarget(nsIDOMEventTarget** aTarget)
|
||||
{
|
||||
NS_ADDREF(*aTarget = Target());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
EventTarget*
|
||||
Touch::Target() const
|
||||
{
|
||||
@ -58,76 +43,6 @@ Touch::Target() const
|
||||
return mTarget;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetScreenX(int32_t* aScreenX)
|
||||
{
|
||||
*aScreenX = ScreenX();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetScreenY(int32_t* aScreenY)
|
||||
{
|
||||
*aScreenY = ScreenY();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetClientX(int32_t* aClientX)
|
||||
{
|
||||
*aClientX = ClientX();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetClientY(int32_t* aClientY)
|
||||
{
|
||||
*aClientY = ClientY();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetPageX(int32_t* aPageX)
|
||||
{
|
||||
*aPageX = PageX();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetPageY(int32_t* aPageY)
|
||||
{
|
||||
*aPageY = PageY();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetRadiusX(int32_t* aRadiusX)
|
||||
{
|
||||
*aRadiusX = RadiusX();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetRadiusY(int32_t* aRadiusY)
|
||||
{
|
||||
*aRadiusY = RadiusY();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetRotationAngle(float* aRotationAngle)
|
||||
{
|
||||
*aRotationAngle = RotationAngle();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Touch::GetForce(float* aForce)
|
||||
{
|
||||
*aForce = Force();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
Touch::InitializePoints(nsPresContext* aPresContext, nsEvent* aEvent)
|
||||
{
|
||||
|
@ -6,7 +6,6 @@
|
||||
#ifndef mozilla_dom_Touch_h
|
||||
#define mozilla_dom_Touch_h
|
||||
|
||||
#include "nsIDOMTouchEvent.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
@ -18,7 +17,7 @@
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class Touch MOZ_FINAL : public nsIDOMTouch
|
||||
class Touch MOZ_FINAL : public nsISupports
|
||||
, public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
@ -77,7 +76,6 @@ public:
|
||||
}
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Touch)
|
||||
NS_DECL_NSIDOMTOUCH
|
||||
|
||||
void InitializePoints(nsPresContext* aPresContext, nsEvent* aEvent);
|
||||
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include "mozilla/dom/Gamepad.h"
|
||||
#endif
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMTouchEvent.h"
|
||||
|
||||
#include "mozilla/dom/EventTarget.h"
|
||||
#include "Units.h"
|
||||
|
@ -70,11 +70,11 @@ protected:
|
||||
/**
|
||||
* Data container for a single touch input. Similar to dom::Touch, but used in
|
||||
* off-main-thread situations. This is more for just storing touch data, whereas
|
||||
* dom::Touch derives from nsIDOMTouch so it is more useful for dispatching
|
||||
* through the DOM (which can only happen on the main thread). dom::Touch also
|
||||
* bears the problem of storing pointers to nsIWidget instances which can only
|
||||
* be used on the main thread, so if instead we used dom::Touch and ever set
|
||||
* these pointers off-main-thread, Bad Things Can Happen(tm).
|
||||
* dom::Touch is more useful for dispatching through the DOM (which can only
|
||||
* happen on the main thread). dom::Touch also bears the problem of storing
|
||||
* pointers to nsIWidget instances which can only be used on the main thread,
|
||||
* so if instead we used dom::Touch and ever set these pointers
|
||||
* off-main-thread, Bad Things Can Happen(tm).
|
||||
*
|
||||
* Note that this doesn't inherit from InputData because this itself is not an
|
||||
* event. It is only a container/struct that should have any number of instances
|
||||
|
Loading…
x
Reference in New Issue
Block a user