diff --git a/content/events/src/Touch.cpp b/content/events/src/Touch.cpp index 71400fac3080..7bc825ee0bbc 100644 --- a/content/events/src/Touch.cpp +++ b/content/events/src/Touch.cpp @@ -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) { diff --git a/content/events/src/Touch.h b/content/events/src/Touch.h index a988179f198e..9d1637764fff 100644 --- a/content/events/src/Touch.h +++ b/content/events/src/Touch.h @@ -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); diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 1934abd2d0cc..729e050dcc9e 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -62,6 +62,7 @@ #include "mozilla/dom/Gamepad.h" #endif #include "nsIDocument.h" +#include "nsIDOMTouchEvent.h" #include "mozilla/dom/EventTarget.h" #include "Units.h" diff --git a/widget/InputData.h b/widget/InputData.h index 4d2d05cd8087..6dd7127c665a 100644 --- a/widget/InputData.h +++ b/widget/InputData.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