Back out revision ea0f2d537a40 (bug 903283) because Windows was bootlegging nsRegion.h via EventTarget.h in widget code and so we ended up with a CLOSED TREE.
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 09 Aug 2013 22:31:05 -0400
changeset 155068 29c341748a6b6358110446ea3c0466dfa799fb6c
parent 155067 ede52678ba7deb0c248a8636ab416781b2aa9305
child 155069 2f65b3e077b962d8562dc5ad7e92a49aa24da45a
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs903283
milestone26.0a1
backs outea0f2d537a407efbaf6e2617ca89e878109f5690
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Back out revision ea0f2d537a40 (bug 903283) because Windows was bootlegging nsRegion.h via EventTarget.h in widget code and so we ended up with a CLOSED TREE.
content/events/src/Touch.cpp
content/events/src/Touch.h
content/events/src/nsDOMEvent.h
content/events/src/nsEventListenerManager.h
content/events/src/nsEventListenerService.h
layout/printing/nsPrintPreviewListener.cpp
layout/printing/nsPrintPreviewListener.h
security/manager/ssl/src/PSMContentDownloader.h
security/manager/ssl/src/nsNSSComponent.h
widget/nsGUIEvent.h
widget/nsIWidget.h
widget/nsIWidgetListener.h
--- a/content/events/src/Touch.cpp
+++ b/content/events/src/Touch.cpp
@@ -1,82 +1,26 @@
 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
 /* 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/. */
 
 #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 {
 
-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
+/* static */ bool
 Touch::PrefEnabled()
 {
   return nsDOMTouchEvent::PrefEnabled();
 }
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(Touch, mTarget)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Touch)
@@ -111,22 +55,16 @@ Touch::InitializePoints(nsPresContext* a
   mPagePoint = nsDOMEvent::GetPageCoords(
     aPresContext, aEvent, LayoutDeviceIntPoint::FromUntyped(mRefPoint),
     mClientPoint);
   mScreenPoint = nsDOMEvent::GetScreenCoords(aPresContext, aEvent,
     LayoutDeviceIntPoint::FromUntyped(mRefPoint));
   mPointsInitialized = true;
 }
 
-void
-Touch::SetTarget(mozilla::dom::EventTarget* aTarget)
-{
-  mTarget = aTarget;
-}
-
 bool
 Touch::Equals(Touch* aTouch)
 {
   return mRefPoint == aTouch->mRefPoint &&
          mForce == aTouch->Force() &&
          mRotationAngle == aTouch->RotationAngle() &&
          mRadius.x == aTouch->RadiusX() &&
          mRadius.y == aTouch->RadiusY();
--- a/content/events/src/Touch.h
+++ b/content/events/src/Touch.h
@@ -1,28 +1,27 @@
 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
 /* 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_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
 {
 public:
   static bool PrefEnabled();
 
   Touch(mozilla::dom::EventTarget* aTarget,
         int32_t aIdentifier,
@@ -30,32 +29,65 @@ public:
         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);
+        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(int32_t aIdentifier,
         nsIntPoint aPoint,
         nsIntPoint aRadius,
         float aRotationAngle,
-        float aForce);
+        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;
 
-  ~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);
-
+  void SetTarget(mozilla::dom::EventTarget *aTarget)
+  {
+    mTarget = aTarget;
+  }
   bool Equals(Touch* aTouch);
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
   EventTarget* GetParentObject() { return mTarget; }
 
   // WebIDL
   int32_t Identifier() const { return mIdentifier; }
--- a/content/events/src/nsDOMEvent.h
+++ b/content/events/src/nsDOMEvent.h
@@ -5,37 +5,32 @@
 
 #ifndef nsDOMEvent_h__
 #define nsDOMEvent_h__
 
 #include "mozilla/Attributes.h"
 #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
 {
 };
 
 class nsDOMEvent : public nsDOMEventBase,
                    public nsWrapperCache
--- a/content/events/src/nsEventListenerManager.h
+++ b/content/events/src/nsEventListenerManager.h
@@ -3,16 +3,17 @@
  * 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 nsEventListenerManager_h__
 #define nsEventListenerManager_h__
 
 #include "jsapi.h"
 #include "mozilla/dom/EventListenerBinding.h"
+#include "mozilla/dom/EventTarget.h"
 #include "mozilla/MemoryReporting.h"
 #include "nsAutoPtr.h"
 #include "nsCOMArray.h"
 #include "nsCOMPtr.h"
 #include "nsCxPusher.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsGkAtoms.h"
 #include "nsGUIEvent.h"
@@ -32,18 +33,16 @@ class nsCxPusher;
 class nsIEventListenerInfo;
 
 struct nsListenerStruct;
 class nsEventListenerManager;
 
 namespace mozilla {
 namespace dom {
 
-class EventTarget;
-
 typedef CallbackObjectHolder<EventListener, nsIDOMEventListener>
   EventListenerHolder;
 
 struct EventListenerFlags
 {
   friend struct ::nsListenerStruct;
   friend class  ::nsEventListenerManager;
 private:
--- a/content/events/src/nsEventListenerService.h
+++ b/content/events/src/nsEventListenerService.h
@@ -3,16 +3,17 @@
  * 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 nsEventListenerService_h__
 #define nsEventListenerService_h__
 #include "nsIEventListenerService.h"
 #include "nsAutoPtr.h"
 #include "nsIDOMEventListener.h"
+#include "nsIDOMEventTarget.h"
 #include "nsString.h"
 #include "nsCycleCollectionParticipant.h"
 #include "jsapi.h"
 #include "mozilla/Attributes.h"
 
 
 class nsEventListenerInfo : public nsIEventListenerInfo
 {
--- a/layout/printing/nsPrintPreviewListener.cpp
+++ b/layout/printing/nsPrintPreviewListener.cpp
@@ -29,19 +29,16 @@ NS_IMPL_ISUPPORTS1(nsPrintPreviewListene
 // nsPrintPreviewListener ctor
 //
 nsPrintPreviewListener::nsPrintPreviewListener(EventTarget* aTarget)
   : mEventTarget(aTarget)
 {
   NS_ADDREF_THIS();
 } // ctor
 
-nsPrintPreviewListener::~nsPrintPreviewListener()
-{
-}
 
 //-------------------------------------------------------
 //
 // AddListeners
 //
 // Subscribe to the events that will allow us to track various events. 
 //
 nsresult
--- a/layout/printing/nsPrintPreviewListener.h
+++ b/layout/printing/nsPrintPreviewListener.h
@@ -4,43 +4,37 @@
  * 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 nsPrintPreviewListener_h__
 #define nsPrintPreviewListener_h__
 
 // 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
 //
 // The class that listens to the chrome events and tells the embedding
 // chrome to show context menus, as appropriate. Handles registering itself
 // with the DOM with AddChromeListeners() and removing itself with
 // RemoveChromeListeners().
 //
 class nsPrintPreviewListener MOZ_FINAL : public nsIDOMEventListener
 
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMEVENTLISTENER
 
   nsPrintPreviewListener(mozilla::dom::EventTarget* aTarget);
-  ~nsPrintPreviewListener();
 
   // Add/remove the relevant listeners, based on what interfaces
   // the embedding chrome implements.
   nsresult AddListeners();
   nsresult RemoveListeners();
 
 private:
 
--- a/security/manager/ssl/src/PSMContentDownloader.h
+++ b/security/manager/ssl/src/PSMContentDownloader.h
@@ -15,16 +15,17 @@
 #include "nsIStreamListener.h"
 #include "nsIEntropyCollector.h"
 #include "nsIStringBundle.h"
 #include "nsIPrefBranch.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsWeakReference.h"
 #ifndef MOZ_DISABLE_CRYPTOLEGACY
+#include "nsIDOMEventTarget.h"
 #endif
 #include "nsINSSErrorsService.h"
 #include "nsNetUtil.h"
 #include "nsNSSCallbacks.h"
 #include "ScopedNSSTypes.h"
 #include "nsNSSHelper.h"
 #include "nsClientAuthRemember.h"
 #include "prerror.h"
--- a/security/manager/ssl/src/nsNSSComponent.h
+++ b/security/manager/ssl/src/nsNSSComponent.h
@@ -12,25 +12,25 @@
 #include "nsCOMPtr.h"
 #include "nsISignatureVerifier.h"
 #include "nsIEntropyCollector.h"
 #include "nsIStringBundle.h"
 #include "nsIPrefBranch.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #ifndef MOZ_DISABLE_CRYPTOLEGACY
+#include "nsIDOMEventTarget.h"
 #endif
 #include "nsINSSErrorsService.h"
 #include "nsNSSCallbacks.h"
 #include "ScopedNSSTypes.h"
 #include "nsNSSHelper.h"
 #include "nsClientAuthRemember.h"
 #include "prerror.h"
 
-class nsIDOMWindow;
 class nsIPrompt;
 class SmartCardThreadList;
 
 namespace mozilla { namespace psm {
 
 class CertVerifier;
 
 } } // namespace mozilla::psm
--- a/widget/nsGUIEvent.h
+++ b/widget/nsGUIEvent.h
@@ -3,31 +3,34 @@
  * 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 nsGUIEvent_h__
 #define nsGUIEvent_h__
 
 #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"
 #include "nsIAtom.h"
 #include "nsIDOMKeyEvent.h"
 #include "nsIDOMMouseEvent.h"
 #include "nsIDOMWheelEvent.h"
 #include "nsIDOMDataTransfer.h"
 #include "nsWeakPtr.h"
 #include "nsIWidget.h"
 #include "nsTArray.h"
 #include "nsTraceRefcnt.h"
 #include "nsITransferable.h"
+#include "nsIVariant.h"
 #include "nsStyleConsts.h"
 #include "nsAutoPtr.h"
 #include "mozilla/dom/EventTarget.h"
 #include "mozilla/dom/Touch.h"
 #include "Units.h"
 
 namespace mozilla {
 namespace dom {
--- a/widget/nsIWidget.h
+++ b/widget/nsIWidget.h
@@ -6,23 +6,24 @@
 #ifndef nsIWidget_h__
 #define nsIWidget_h__
 
 #include "nsISupports.h"
 #include "nsColor.h"
 #include "nsCoord.h"
 #include "nsRect.h"
 #include "nsPoint.h"
+#include "nsStringGlue.h"
 
+#include "prthread.h"
 #include "nsEvent.h"
 #include "nsCOMPtr.h"
 #include "nsITheme.h"
 #include "nsNativeWidget.h"
 #include "nsWidgetInitData.h"
-#include "nsString.h"
 #include "nsTArray.h"
 #include "nsXULAppAPI.h"
 #include "mozilla/layers/LayersTypes.h"
 #include "mozilla/RefPtr.h"
 
 // forward declarations
 class   nsFontMetrics;
 class   nsRenderingContext;
--- a/widget/nsIWidgetListener.h
+++ b/widget/nsIWidgetListener.h
@@ -3,17 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsIWidgetListener_h__
 #define nsIWidgetListener_h__
 
 #include "nscore.h"
 #include "nsGUIEvent.h"
 #include "nsIXULWindow.h"
-#include "nsRegion.h"
 
 class nsView;
 class nsIPresShell;
 
 class nsIWidgetListener
 {
 public: