Bug 903283: Don't include EventTarget.h in headers r=Ms2ger

This commit is contained in:
David Zbarsky 2013-08-19 06:15:55 -04:00
Родитель 5e531c269c
Коммит 9ce94de31b
16 изменённых файлов: 103 добавлений и 56 удалений

Просмотреть файл

@ -5,17 +5,74 @@
#include "mozilla/dom/Touch.h"
#include "mozilla/dom/EventTarget.h"
#include "mozilla/dom/TouchBinding.h"
#include "mozilla/Preferences.h"
#include "nsContentUtils.h"
#include "nsDOMTouchEvent.h"
#include "nsGUIEvent.h"
#include "nsPresContext.h"
namespace mozilla {
namespace dom {
/* static */ bool
Touch::Touch(mozilla::dom::EventTarget* aTarget,
int32_t aIdentifier,
int32_t aPageX,
int32_t aPageY,
int32_t aScreenX,
int32_t aScreenY,
int32_t aClientX,
int32_t aClientY,
int32_t aRadiusX,
int32_t aRadiusY,
float aRotationAngle,
float aForce)
{
SetIsDOMBinding();
mTarget = aTarget;
mIdentifier = aIdentifier;
mPagePoint = CSSIntPoint(aPageX, aPageY);
mScreenPoint = nsIntPoint(aScreenX, aScreenY);
mClientPoint = CSSIntPoint(aClientX, aClientY);
mRefPoint = nsIntPoint(0, 0);
mPointsInitialized = true;
mRadius.x = aRadiusX;
mRadius.y = aRadiusY;
mRotationAngle = aRotationAngle;
mForce = aForce;
mChanged = false;
mMessage = 0;
nsJSContext::LikelyShortLivingObjectCreated();
}
Touch::Touch(int32_t aIdentifier,
nsIntPoint aPoint,
nsIntPoint aRadius,
float aRotationAngle,
float aForce)
{
SetIsDOMBinding();
mIdentifier = aIdentifier;
mPagePoint = CSSIntPoint(0, 0);
mScreenPoint = nsIntPoint(0, 0);
mClientPoint = CSSIntPoint(0, 0);
mRefPoint = aPoint;
mPointsInitialized = false;
mRadius = aRadius;
mRotationAngle = aRotationAngle;
mForce = aForce;
mChanged = false;
mMessage = 0;
nsJSContext::LikelyShortLivingObjectCreated();
}
Touch::~Touch()
{
}
/* static */ bool
Touch::PrefEnabled()
{
return nsDOMTouchEvent::PrefEnabled();
@ -60,6 +117,12 @@ Touch::InitializePoints(nsPresContext* aPresContext, nsEvent* aEvent)
mPointsInitialized = true;
}
void
Touch::SetTarget(mozilla::dom::EventTarget* aTarget)
{
mTarget = aTarget;
}
bool
Touch::Equals(Touch* aTouch)
{

Просмотреть файл

@ -6,17 +6,18 @@
#ifndef mozilla_dom_Touch_h
#define mozilla_dom_Touch_h
#include "nsString.h"
#include "nsTArray.h"
#include "mozilla/Attributes.h"
#include "nsJSEnvironment.h"
#include "nsWrapperCache.h"
#include "mozilla/dom/EventTarget.h"
#include "Units.h"
class nsPresContext;
class nsEvent;
namespace mozilla {
namespace dom {
class EventTarget;
class Touch MOZ_FINAL : public nsISupports
, public nsWrapperCache
{
@ -34,55 +35,22 @@ public:
int32_t aRadiusX,
int32_t aRadiusY,
float aRotationAngle,
float aForce)
{
SetIsDOMBinding();
mTarget = aTarget;
mIdentifier = aIdentifier;
mPagePoint = CSSIntPoint(aPageX, aPageY);
mScreenPoint = nsIntPoint(aScreenX, aScreenY);
mClientPoint = CSSIntPoint(aClientX, aClientY);
mRefPoint = nsIntPoint(0, 0);
mPointsInitialized = true;
mRadius.x = aRadiusX;
mRadius.y = aRadiusY;
mRotationAngle = aRotationAngle;
mForce = aForce;
mChanged = false;
mMessage = 0;
nsJSContext::LikelyShortLivingObjectCreated();
}
float aForce);
Touch(int32_t aIdentifier,
nsIntPoint aPoint,
nsIntPoint aRadius,
float aRotationAngle,
float aForce)
{
SetIsDOMBinding();
mIdentifier = aIdentifier;
mPagePoint = CSSIntPoint(0, 0);
mScreenPoint = nsIntPoint(0, 0);
mClientPoint = CSSIntPoint(0, 0);
mRefPoint = aPoint;
mPointsInitialized = false;
mRadius = aRadius;
mRotationAngle = aRotationAngle;
mForce = aForce;
float aForce);
~Touch();
mChanged = false;
mMessage = 0;
nsJSContext::LikelyShortLivingObjectCreated();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Touch)
void InitializePoints(nsPresContext* aPresContext, nsEvent* aEvent);
void SetTarget(mozilla::dom::EventTarget *aTarget)
{
mTarget = aTarget;
}
void SetTarget(mozilla::dom::EventTarget* aTarget);
bool Equals(Touch* aTouch);
virtual JSObject* WrapObject(JSContext* aCx,

Просмотреть файл

@ -10,22 +10,27 @@
#include "nsIDOMEvent.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIDOMEventTarget.h"
#include "nsPIDOMWindow.h"
#include "nsPoint.h"
#include "nsGUIEvent.h"
#include "nsCycleCollectionParticipant.h"
#include "nsAutoPtr.h"
#include "mozilla/dom/EventTarget.h"
#include "mozilla/dom/EventBinding.h"
#include "nsIScriptGlobalObject.h"
#include "Units.h"
class nsIContent;
class nsIDOMEventTarget;
class nsPresContext;
struct JSContext;
class JSObject;
namespace mozilla {
namespace dom {
class EventTarget;
}
}
// Dummy class so we can cast through it to get from nsISupports to
// nsDOMEvent subclasses with only two non-ambiguous static casts.
class nsDOMEventBase : public nsIDOMEvent

Просмотреть файл

@ -8,7 +8,6 @@
#include "jsapi.h"
#include "mozilla/dom/EventListenerBinding.h"
#include "mozilla/dom/EventTarget.h"
#include "mozilla/MemoryReporting.h"
#include "nsAutoPtr.h"
#include "nsCOMArray.h"
@ -38,6 +37,8 @@ class nsEventListenerManager;
namespace mozilla {
namespace dom {
class EventTarget;
typedef CallbackObjectHolder<EventListener, nsIDOMEventListener>
EventListenerHolder;

Просмотреть файл

@ -8,7 +8,6 @@
#include "nsIEventListenerService.h"
#include "nsAutoPtr.h"
#include "nsIDOMEventListener.h"
#include "nsIDOMEventTarget.h"
#include "nsString.h"
#include "nsCycleCollectionParticipant.h"
#include "jsapi.h"

Просмотреть файл

@ -22,6 +22,7 @@
#include <stdio.h>
#include "nsQueryFrame.h"
#include "nsRegion.h"
#include "nsStyleContext.h"
#include "nsStyleStruct.h"
#include "nsStyleStructFwd.h"

Просмотреть файл

@ -34,6 +34,9 @@ nsPrintPreviewListener::nsPrintPreviewListener(EventTarget* aTarget)
NS_ADDREF_THIS();
} // ctor
nsPrintPreviewListener::~nsPrintPreviewListener()
{
}
//-------------------------------------------------------
//

Просмотреть файл

@ -9,11 +9,16 @@
// Interfaces needed to be included
#include "nsIDOMEventListener.h"
#include "mozilla/dom/EventTarget.h"
// Helper Classes
#include "nsCOMPtr.h"
#include "mozilla/Attributes.h"
namespace mozilla {
namespace dom {
class EventTarget;
}
}
//
// class nsPrintPreviewListener
//
@ -30,6 +35,7 @@ public:
NS_DECL_NSIDOMEVENTLISTENER
nsPrintPreviewListener(mozilla::dom::EventTarget* aTarget);
~nsPrintPreviewListener();
// Add/remove the relevant listeners, based on what interfaces
// the embedding chrome implements.

Просмотреть файл

@ -20,7 +20,6 @@
#include "nsIObserverService.h"
#include "nsWeakReference.h"
#ifndef MOZ_DISABLE_CRYPTOLEGACY
#include "nsIDOMEventTarget.h"
#endif
#include "nsINSSErrorsService.h"
#include "nsNetUtil.h"

Просмотреть файл

@ -17,7 +17,6 @@
#include "nsIObserver.h"
#include "nsIObserverService.h"
#ifndef MOZ_DISABLE_CRYPTOLEGACY
#include "nsIDOMEventTarget.h"
#endif
#include "nsINSSErrorsService.h"
#include "nsNSSCallbacks.h"
@ -26,6 +25,7 @@
#include "nsClientAuthRemember.h"
#include "prerror.h"
class nsIDOMWindow;
class nsIPrompt;
class SmartCardThreadList;

Просмотреть файл

@ -17,6 +17,7 @@
#define nsWindow_h
#include "nsBaseWidget.h"
#include "nsRegion.h"
#include "nsIIdleServiceInternal.h"
extern nsIntRect gScreenBounds;

Просмотреть файл

@ -8,10 +8,8 @@
#include "mozilla/MathAlgorithms.h"
#include "nsCOMArray.h"
#include "nsPoint.h"
#include "nsRect.h"
#include "nsRegion.h"
#include "nsEvent.h"
#include "nsStringGlue.h"
#include "nsCOMPtr.h"
@ -25,7 +23,6 @@
#include "nsTArray.h"
#include "nsTraceRefcnt.h"
#include "nsITransferable.h"
#include "nsIVariant.h"
#include "nsStyleConsts.h"
#include "nsAutoPtr.h"
#include "mozilla/dom/EventTarget.h"

Просмотреть файл

@ -9,11 +9,11 @@
#include "nsISupports.h"
#include "nsColor.h"
#include "nsRect.h"
#include "nsStringGlue.h"
#include "nsEvent.h"
#include "nsCOMPtr.h"
#include "nsWidgetInitData.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsXULAppAPI.h"
#include "mozilla/layers/LayersTypes.h"

Просмотреть файл

@ -8,6 +8,7 @@
#include "nscore.h"
#include "nsGUIEvent.h"
#include "nsIXULWindow.h"
#include "nsRegion.h"
class nsView;
class nsIPresShell;

Просмотреть файл

@ -3,6 +3,7 @@
* 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/. */
#include "mozilla/DebugOnly.h"
#include "mozilla/Util.h"
#include "KeyboardLayout.h"

Просмотреть файл

@ -23,6 +23,7 @@
#include "nsWindowDbg.h"
#include "cairo.h"
#include "nsITimer.h"
#include "nsRegion.h"
#include "mozilla/TimeStamp.h"
#ifdef CAIRO_HAS_D2D_SURFACE
@ -52,6 +53,7 @@
class nsNativeDragTarget;
class nsIRollupListener;
class nsIFile;
class nsIntRegion;
class imgIContainer;
namespace mozilla {