From 930436ef24d7762ad4ad74b8687b17873763a9fd Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Tue, 1 Apr 2014 15:13:50 +0900 Subject: [PATCH] Bug 984269 Rename nsDOMEventTargetHelper to mozilla::DOMEventTargetHelper r=smaug --HG-- rename : dom/events/nsDOMEventTargetHelper.cpp => dom/events/DOMEventTargetHelper.cpp rename : dom/events/nsDOMEventTargetHelper.h => dom/events/DOMEventTargetHelper.h --- content/base/src/EventSource.cpp | 19 +-- content/base/src/EventSource.h | 8 +- content/base/src/FileIOObject.cpp | 10 +- content/base/src/FileIOObject.h | 7 +- content/base/src/WebSocket.cpp | 18 +-- content/base/src/WebSocket.h | 8 +- content/base/src/nsDOMDataChannel.cpp | 16 +-- content/base/src/nsDOMDataChannel.h | 8 +- content/base/src/nsDOMFileReader.cpp | 4 +- content/base/src/nsDOMFileReader.h | 2 +- .../base/src/nsInProcessTabChildGlobal.cpp | 10 +- content/base/src/nsInProcessTabChildGlobal.h | 21 +-- content/base/src/nsXMLHttpRequest.cpp | 18 +-- content/base/src/nsXMLHttpRequest.h | 16 +-- content/media/MediaRecorder.cpp | 12 +- content/media/MediaRecorder.h | 6 +- content/media/MediaStreamTrack.cpp | 8 +- content/media/MediaStreamTrack.h | 7 +- content/media/TextTrack.cpp | 8 +- content/media/TextTrack.h | 6 +- content/media/TextTrackCue.cpp | 8 +- content/media/TextTrackCue.h | 6 +- content/media/TextTrackList.cpp | 8 +- content/media/TextTrackList.h | 6 +- content/media/mediasource/MediaSource.cpp | 10 +- content/media/mediasource/MediaSource.h | 6 +- content/media/mediasource/SourceBuffer.cpp | 11 +- content/media/mediasource/SourceBuffer.h | 6 +- .../media/mediasource/SourceBufferList.cpp | 10 +- content/media/mediasource/SourceBufferList.h | 7 +- content/media/webaudio/AudioContext.cpp | 13 +- content/media/webaudio/AudioContext.h | 10 +- content/media/webaudio/AudioNode.cpp | 15 +- content/media/webaudio/AudioNode.h | 6 +- content/media/webaudio/ScriptProcessorNode.h | 2 +- .../recognition/SpeechRecognition.cpp | 8 +- .../webspeech/recognition/SpeechRecognition.h | 6 +- .../SpeechRecognitionAlternative.cpp | 2 +- .../recognition/SpeechRecognitionResult.cpp | 2 +- .../SpeechRecognitionResultList.cpp | 2 +- .../recognition/SpeechStreamListener.cpp | 2 +- .../synth/SpeechSynthesisUtterance.cpp | 10 +- .../synth/SpeechSynthesisUtterance.h | 8 +- dom/base/DOMRequest.cpp | 18 +-- dom/base/DOMRequest.h | 8 +- dom/base/MessagePort.cpp | 14 +- dom/base/MessagePort.h | 6 +- dom/base/nsDOMClassInfo.cpp | 8 +- dom/base/nsGlobalWindow.cpp | 16 +-- dom/base/nsGlobalWindow.h | 8 +- dom/base/nsScreen.cpp | 8 +- dom/base/nsScreen.h | 6 +- dom/battery/BatteryManager.cpp | 8 +- dom/battery/BatteryManager.h | 9 +- dom/bindings/Bindings.conf | 2 +- dom/bluetooth/BluetoothAdapter.cpp | 14 +- dom/bluetooth/BluetoothAdapter.h | 6 +- dom/bluetooth/BluetoothDevice.cpp | 14 +- dom/bluetooth/BluetoothDevice.h | 6 +- dom/bluetooth/BluetoothManager.cpp | 8 +- dom/bluetooth/BluetoothManager.h | 6 +- dom/cellbroadcast/src/CellBroadcast.cpp | 2 +- dom/cellbroadcast/src/CellBroadcast.h | 6 +- dom/devicestorage/DeviceStorage.h | 4 +- dom/devicestorage/nsDeviceStorage.cpp | 48 +++---- ...getHelper.cpp => DOMEventTargetHelper.cpp} | 135 +++++++++--------- ...tTargetHelper.h => DOMEventTargetHelper.h} | 64 ++++----- dom/events/Event.cpp | 4 +- dom/events/moz.build | 4 +- dom/file/FileCommon.h | 2 +- dom/file/FileHandle.cpp | 8 +- dom/file/FileHandle.h | 13 +- dom/file/LockedFile.cpp | 8 +- dom/file/LockedFile.h | 6 +- dom/fmradio/FMRadio.cpp | 6 +- dom/fmradio/FMRadio.h | 14 +- dom/icc/src/Icc.h | 6 +- dom/icc/src/IccManager.cpp | 12 +- dom/icc/src/IccManager.h | 8 +- dom/indexedDB/IDBDatabase.h | 2 +- dom/indexedDB/IDBRequest.cpp | 4 +- dom/indexedDB/IDBWrapperCache.cpp | 16 +-- dom/indexedDB/IDBWrapperCache.h | 15 +- dom/ipc/TabChild.cpp | 8 +- dom/ipc/TabChild.h | 20 +-- dom/mobileconnection/src/MobileConnection.cpp | 10 +- dom/mobileconnection/src/MobileConnection.h | 8 +- .../src/MobileMessageManager.cpp | 6 +- dom/mobilemessage/src/MobileMessageManager.h | 6 +- dom/network/src/Connection.cpp | 6 +- dom/network/src/Connection.h | 12 +- dom/speakermanager/SpeakerManager.cpp | 12 +- dom/speakermanager/SpeakerManager.h | 4 +- dom/src/notification/DesktopNotification.cpp | 2 +- dom/src/notification/DesktopNotification.h | 4 +- dom/src/notification/Notification.cpp | 2 +- dom/src/notification/Notification.h | 4 +- dom/src/offline/nsDOMOfflineResourceList.cpp | 10 +- dom/src/offline/nsDOMOfflineResourceList.h | 6 +- dom/system/gonk/AudioChannelManager.cpp | 6 +- dom/system/gonk/AudioChannelManager.h | 4 +- dom/telephony/Telephony.cpp | 12 +- dom/telephony/Telephony.h | 6 +- dom/telephony/TelephonyCall.cpp | 10 +- dom/telephony/TelephonyCall.h | 6 +- dom/telephony/TelephonyCallGroup.cpp | 12 +- dom/telephony/TelephonyCallGroup.h | 4 +- dom/telephony/TelephonyCommon.h | 2 +- dom/voicemail/Voicemail.cpp | 2 +- dom/voicemail/Voicemail.h | 6 +- dom/workers/MessagePort.cpp | 12 +- dom/workers/MessagePort.h | 4 +- dom/workers/SharedWorker.cpp | 14 +- dom/workers/SharedWorker.h | 6 +- dom/workers/WorkerPrivate.cpp | 14 +- dom/workers/WorkerPrivate.h | 6 +- dom/workers/WorkerScope.cpp | 13 +- dom/workers/WorkerScope.h | 6 +- 118 files changed, 601 insertions(+), 592 deletions(-) rename dom/events/{nsDOMEventTargetHelper.cpp => DOMEventTargetHelper.cpp} (65%) rename dom/events/{nsDOMEventTargetHelper.h => DOMEventTargetHelper.h} (86%) diff --git a/content/base/src/EventSource.cpp b/content/base/src/EventSource.cpp index fd69f861cc9e..4ac1e48115d9 100644 --- a/content/base/src/EventSource.cpp +++ b/content/base/src/EventSource.cpp @@ -7,6 +7,7 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/EventSourceBinding.h" #include "mozilla/dom/MessageEvent.h" @@ -33,7 +34,6 @@ #include "xpcpublic.h" #include "nsCrossSiteListenerProxy.h" #include "nsWrapperCacheInlines.h" -#include "nsDOMEventTargetHelper.h" #include "mozilla/Attributes.h" #include "nsError.h" @@ -56,7 +56,7 @@ namespace dom { #define MAX_RECONNECTION_TIME_VALUE PR_IntervalToMilliseconds(DELAY_INTERVAL_LIMIT) EventSource::EventSource(nsPIDOMWindow* aOwnerWindow) : - nsDOMEventTargetHelper(aOwnerWindow), + DOMEventTargetHelper(aOwnerWindow), mStatus(PARSE_STATE_OFF), mFrozen(false), mErrorLoadOnRedirect(false), @@ -105,11 +105,11 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(EventSource) NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(EventSource, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(EventSource, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSrc) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNotificationCallbacks) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mLoadGroup) @@ -119,7 +119,8 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(EventSource, NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mUnicodeDecoder) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END -NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(EventSource, nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(EventSource, + DOMEventTargetHelper) tmp->Close(); NS_IMPL_CYCLE_COLLECTION_UNLINK_END @@ -130,15 +131,15 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(EventSource) NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink) NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(EventSource, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(EventSource, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(EventSource, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(EventSource, DOMEventTargetHelper) void EventSource::DisconnectFromOwner() { - nsDOMEventTargetHelper::DisconnectFromOwner(); + DOMEventTargetHelper::DisconnectFromOwner(); Close(); } diff --git a/content/base/src/EventSource.h b/content/base/src/EventSource.h index 2997bbe15d77..190cdecebd22 100644 --- a/content/base/src/EventSource.h +++ b/content/base/src/EventSource.h @@ -14,7 +14,7 @@ #define mozilla_dom_EventSource_h #include "mozilla/Attributes.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsIObserver.h" #include "nsIStreamListener.h" #include "nsIChannelEventSink.h" @@ -36,7 +36,7 @@ namespace dom { class AsyncVerifyRedirectCallbackFwr; struct EventSourceInit; -class EventSource : public nsDOMEventTargetHelper +class EventSource : public DOMEventTargetHelper , public nsIObserver , public nsIStreamListener , public nsIChannelEventSink @@ -49,8 +49,8 @@ public: EventSource(nsPIDOMWindow* aOwnerWindow); virtual ~EventSource(); NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(EventSource, - nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED( + EventSource, DOMEventTargetHelper) NS_DECL_NSIOBSERVER NS_DECL_NSISTREAMLISTENER diff --git a/content/base/src/FileIOObject.cpp b/content/base/src/FileIOObject.cpp index 4ca682a5ac65..d8d40055e470 100644 --- a/content/base/src/FileIOObject.cpp +++ b/content/base/src/FileIOObject.cpp @@ -20,26 +20,26 @@ namespace dom { const uint64_t kUnknownSize = uint64_t(-1); -NS_IMPL_ADDREF_INHERITED(FileIOObject, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(FileIOObject, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(FileIOObject, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(FileIOObject, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FileIOObject) NS_INTERFACE_MAP_ENTRY(nsITimerCallback) NS_INTERFACE_MAP_ENTRY(nsIStreamListener) NS_INTERFACE_MAP_ENTRY(nsIRequestObserver) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_CLASS(FileIOObject) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(FileIOObject, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mProgressNotifier) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mError) // Can't traverse mChannel because it's a multithreaded object. NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(FileIOObject, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK(mProgressNotifier) NS_IMPL_CYCLE_COLLECTION_UNLINK(mError) NS_IMPL_CYCLE_COLLECTION_UNLINK(mChannel) diff --git a/content/base/src/FileIOObject.h b/content/base/src/FileIOObject.h index 5f3d5e23405d..22d9ea6ad480 100644 --- a/content/base/src/FileIOObject.h +++ b/content/base/src/FileIOObject.h @@ -6,7 +6,7 @@ #ifndef FileIOObject_h__ #define FileIOObject_h__ -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsIChannel.h" #include "nsIFile.h" #include "nsIDOMFile.h" @@ -28,7 +28,7 @@ extern const uint64_t kUnknownSize; // A common base class for FileReader and FileSaver -class FileIOObject : public nsDOMEventTargetHelper, +class FileIOObject : public DOMEventTargetHelper, public nsIStreamListener, public nsITimerCallback { @@ -65,8 +65,7 @@ public: NS_DECL_NSIREQUESTOBSERVER - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileIOObject, - nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileIOObject, DOMEventTargetHelper) protected: // Implemented by the derived class to do whatever it needs to do for abort diff --git a/content/base/src/WebSocket.cpp b/content/base/src/WebSocket.cpp index db52277ff1ff..93e8e2d4af2a 100644 --- a/content/base/src/WebSocket.cpp +++ b/content/base/src/WebSocket.cpp @@ -10,6 +10,7 @@ #include "jsapi.h" #include "jsfriendapi.h" #include "js/OldDebugAPI.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsIScriptGlobalObject.h" #include "nsIDOMWindow.h" #include "nsIDocument.h" @@ -39,7 +40,6 @@ #include "nsContentPolicyUtils.h" #include "nsDOMFile.h" #include "nsWrapperCacheInlines.h" -#include "nsDOMEventTargetHelper.h" #include "nsIObserverService.h" #include "nsIWebSocketChannel.h" #include "GeneratedEvents.h" @@ -441,7 +441,7 @@ WebSocket::GetInterface(const nsIID& aIID, void** aResult) //////////////////////////////////////////////////////////////////////////////// WebSocket::WebSocket(nsPIDOMWindow* aOwnerWindow) -: nsDOMEventTargetHelper(aOwnerWindow), +: DOMEventTargetHelper(aOwnerWindow), mKeepingAlive(false), mCheckMustKeepAlive(true), mOnCloseScheduled(false), @@ -595,18 +595,18 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(WebSocket) NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WebSocket, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WebSocket, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPrincipal) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mURI) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mChannel) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WebSocket, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->Disconnect(); NS_IMPL_CYCLE_COLLECTION_UNLINK(mPrincipal) NS_IMPL_CYCLE_COLLECTION_UNLINK(mURI) @@ -619,15 +619,15 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(WebSocket) NS_INTERFACE_MAP_ENTRY(nsIObserver) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_INTERFACE_MAP_ENTRY(nsIRequest) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(WebSocket, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(WebSocket, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(WebSocket, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(WebSocket, DOMEventTargetHelper) void WebSocket::DisconnectFromOwner() { - nsDOMEventTargetHelper::DisconnectFromOwner(); + DOMEventTargetHelper::DisconnectFromOwner(); CloseConnection(nsIWebSocketChannel::CLOSE_GOING_AWAY); DontKeepAliveAnyMore(); } diff --git a/content/base/src/WebSocket.h b/content/base/src/WebSocket.h index 41db9a36aa66..dfb098c0f45b 100644 --- a/content/base/src/WebSocket.h +++ b/content/base/src/WebSocket.h @@ -10,11 +10,11 @@ #include "mozilla/Attributes.h" #include "mozilla/dom/TypedArray.h" #include "mozilla/dom/WebSocketBinding.h" // for BinaryType +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/ErrorResult.h" #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsIInterfaceRequestor.h" #include "nsIObserver.h" #include "nsIRequest.h" @@ -32,7 +32,7 @@ namespace mozilla { namespace dom { -class WebSocket : public nsDOMEventTargetHelper, +class WebSocket : public DOMEventTargetHelper, public nsIInterfaceRequestor, public nsIWebSocketListener, public nsIObserver, @@ -52,8 +52,8 @@ public: public: NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(WebSocket, - nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED( + WebSocket, DOMEventTargetHelper) NS_DECL_NSIINTERFACEREQUESTOR NS_DECL_NSIWEBSOCKETLISTENER NS_DECL_NSIOBSERVER diff --git a/content/base/src/nsDOMDataChannel.cpp b/content/base/src/nsDOMDataChannel.cpp index 9f45e168c12d..4a814c7f2e75 100644 --- a/content/base/src/nsDOMDataChannel.cpp +++ b/content/base/src/nsDOMDataChannel.cpp @@ -25,7 +25,7 @@ extern PRLogModuleInfo* GetDataChannelLog(); #include "nsIDOMFile.h" #include "nsIDOMDataChannel.h" #include "nsIDOMMessageEvent.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsError.h" #include "nsAutoPtr.h" @@ -66,24 +66,24 @@ nsDOMDataChannel::WrapObject(JSContext* aCx, JS::Handle aScope) NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMDataChannel) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsDOMDataChannel, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsDOMDataChannel, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK_END -NS_IMPL_ADDREF_INHERITED(nsDOMDataChannel, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(nsDOMDataChannel, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(nsDOMDataChannel, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(nsDOMDataChannel, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDOMDataChannel) NS_INTERFACE_MAP_ENTRY(nsIDOMDataChannel) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) nsDOMDataChannel::nsDOMDataChannel(already_AddRefed& aDataChannel, nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow && aWindow->IsOuterWindow() ? - aWindow->GetCurrentInnerWindow() : aWindow) + : DOMEventTargetHelper(aWindow && aWindow->IsOuterWindow() ? + aWindow->GetCurrentInnerWindow() : aWindow) , mDataChannel(aDataChannel) , mBinaryType(DC_BINARY_TYPE_BLOB) { diff --git a/content/base/src/nsDOMDataChannel.h b/content/base/src/nsDOMDataChannel.h index f1e3f21dbe63..e21901a23866 100644 --- a/content/base/src/nsDOMDataChannel.h +++ b/content/base/src/nsDOMDataChannel.h @@ -8,10 +8,10 @@ #define nsDOMDataChannel_h #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/DataChannelBinding.h" #include "mozilla/dom/TypedArray.h" #include "mozilla/net/DataChannelListener.h" -#include "nsDOMEventTargetHelper.h" #include "nsIDOMDataChannel.h" #include "nsIInputStream.h" @@ -20,7 +20,7 @@ namespace mozilla { class DataChannel; }; -class nsDOMDataChannel : public nsDOMEventTargetHelper, +class nsDOMDataChannel : public mozilla::DOMEventTargetHelper, public nsIDOMDataChannel, public mozilla::DataChannelListener { @@ -34,10 +34,10 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIDOMDATACHANNEL - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper) NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMDataChannel, - nsDOMEventTargetHelper) + mozilla::DOMEventTargetHelper) virtual JSObject* WrapObject(JSContext* aCx, JS::Handle aScope) MOZ_OVERRIDE; diff --git a/content/base/src/nsDOMFileReader.cpp b/content/base/src/nsDOMFileReader.cpp index 774ae36cc6ef..b1d0ce1df752 100644 --- a/content/base/src/nsDOMFileReader.cpp +++ b/content/base/src/nsDOMFileReader.cpp @@ -35,13 +35,13 @@ #include "nsIScriptObjectPrincipal.h" #include "nsHostObjectProtocolHandler.h" #include "mozilla/Base64.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/Preferences.h" #include "mozilla/dom/EncodingUtils.h" #include "mozilla/dom/FileReaderBinding.h" #include "xpcpublic.h" #include "nsIScriptSecurityManager.h" #include "nsDOMJSUtils.h" -#include "nsDOMEventTargetHelper.h" #include "jsfriendapi.h" @@ -69,7 +69,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(nsDOMFileReader, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mResultArrayBuffer) NS_IMPL_CYCLE_COLLECTION_TRACE_END diff --git a/content/base/src/nsDOMFileReader.h b/content/base/src/nsDOMFileReader.h index 2c8c6444c2ab..51543c6ab534 100644 --- a/content/base/src/nsDOMFileReader.h +++ b/content/base/src/nsDOMFileReader.h @@ -43,7 +43,7 @@ public: NS_DECL_NSIDOMFILEREADER - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper) // nsIInterfaceRequestor NS_DECL_NSIINTERFACEREQUESTOR diff --git a/content/base/src/nsInProcessTabChildGlobal.cpp b/content/base/src/nsInProcessTabChildGlobal.cpp index 7027f522e5d5..e3d3678fee26 100644 --- a/content/base/src/nsInProcessTabChildGlobal.cpp +++ b/content/base/src/nsInProcessTabChildGlobal.cpp @@ -144,7 +144,7 @@ nsInProcessTabChildGlobal::Init() } NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsInProcessTabChildGlobal, - nsDOMEventTargetHelper, + DOMEventTargetHelper, mMessageManager, mGlobal) @@ -158,10 +158,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsInProcessTabChildGlobal) NS_INTERFACE_MAP_ENTRY(nsIGlobalObject) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(ContentFrameMessageManager) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(nsInProcessTabChildGlobal, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(nsInProcessTabChildGlobal, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(nsInProcessTabChildGlobal, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(nsInProcessTabChildGlobal, DOMEventTargetHelper) NS_IMETHODIMP nsInProcessTabChildGlobal::GetContent(nsIDOMWindow** aContent) @@ -217,7 +217,7 @@ nsInProcessTabChildGlobal::DelayedDisconnect() mOwner = nullptr; // Fire the "unload" event - nsDOMEventTargetHelper::DispatchTrustedEvent(NS_LITERAL_STRING("unload")); + DOMEventTargetHelper::DispatchTrustedEvent(NS_LITERAL_STRING("unload")); // Continue with the Disconnect cleanup nsCOMPtr win = do_GetInterface(mDocShell); diff --git a/content/base/src/nsInProcessTabChildGlobal.h b/content/base/src/nsInProcessTabChildGlobal.h index 96121b905e30..51eefc67812f 100644 --- a/content/base/src/nsInProcessTabChildGlobal.h +++ b/content/base/src/nsInProcessTabChildGlobal.h @@ -8,10 +8,10 @@ #define nsInProcessTabChildGlobal_h #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsCOMPtr.h" #include "nsFrameMessageManager.h" #include "nsIScriptContext.h" -#include "nsDOMEventTargetHelper.h" #include "nsIScriptObjectPrincipal.h" #include "nsIScriptContext.h" #include "nsIClassInfo.h" @@ -27,7 +27,7 @@ namespace mozilla { class EventChainPreVisitor; } // namespace mozilla -class nsInProcessTabChildGlobal : public nsDOMEventTargetHelper, +class nsInProcessTabChildGlobal : public mozilla::DOMEventTargetHelper, public nsFrameScriptExecutor, public nsIInProcessContentFrameMessageManager, public nsIGlobalObject, @@ -41,7 +41,7 @@ public: virtual ~nsInProcessTabChildGlobal(); NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsInProcessTabChildGlobal, - nsDOMEventTargetHelper) + mozilla::DOMEventTargetHelper) NS_FORWARD_SAFE_NSIMESSAGELISTENERMANAGER(mMessageManager) NS_FORWARD_SAFE_NSIMESSAGESENDER(mMessageManager) NS_IMETHOD SendSyncMessage(const nsAString& aMessageName, @@ -107,20 +107,21 @@ public: bool aUseCapture) { // By default add listeners only for trusted events! - return nsDOMEventTargetHelper::AddEventListener(aType, aListener, - aUseCapture, false, 2); + return mozilla::DOMEventTargetHelper::AddEventListener(aType, aListener, + aUseCapture, false, + 2); } NS_IMETHOD AddEventListener(const nsAString& aType, nsIDOMEventListener* aListener, bool aUseCapture, bool aWantsUntrusted, uint8_t optional_argc) MOZ_OVERRIDE { - return nsDOMEventTargetHelper::AddEventListener(aType, aListener, - aUseCapture, - aWantsUntrusted, - optional_argc); + return mozilla::DOMEventTargetHelper::AddEventListener(aType, aListener, + aUseCapture, + aWantsUntrusted, + optional_argc); } - using nsDOMEventTargetHelper::AddEventListener; + using mozilla::DOMEventTargetHelper::AddEventListener; virtual JSContext* GetJSContextForEventHandlers() MOZ_OVERRIDE { return nsContentUtils::GetSafeJSContext(); } virtual nsIPrincipal* GetPrincipal() MOZ_OVERRIDE { return mPrincipal; } diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index b6bcc5f3375f..dbe9b26a1427 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -234,24 +234,24 @@ XMLHttpRequestAuthPrompt::PromptPassword(const char16_t* aDialogTitle, NS_IMPL_CYCLE_COLLECTION_CLASS(nsXHREventTarget) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsXHREventTarget, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsXHREventTarget, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsXHREventTarget) NS_INTERFACE_MAP_ENTRY(nsIXMLHttpRequestEventTarget) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(nsXHREventTarget, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(nsXHREventTarget, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(nsXHREventTarget, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(nsXHREventTarget, DOMEventTargetHelper) void nsXHREventTarget::DisconnectFromOwner() { - nsDOMEventTargetHelper::DisconnectFromOwner(); + DOMEventTargetHelper::DisconnectFromOwner(); } ///////////////////////////////////////////// @@ -450,7 +450,7 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsXMLHttpRequest) return tmp-> - IsBlackAndDoesNotNeedTracing(static_cast(tmp)); + IsBlackAndDoesNotNeedTracing(static_cast(tmp)); NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsXMLHttpRequest) @@ -1410,7 +1410,7 @@ nsXMLHttpRequest::CreateReadystatechangeEvent(nsIDOMEvent** aDOMEvent) } void -nsXMLHttpRequest::DispatchProgressEvent(nsDOMEventTargetHelper* aTarget, +nsXMLHttpRequest::DispatchProgressEvent(DOMEventTargetHelper* aTarget, const nsAString& aType, bool aLengthComputable, uint64_t aLoaded, uint64_t aTotal) @@ -2020,7 +2020,7 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt) // principal. const nsAString& emptyStr = EmptyString(); nsCOMPtr responseDoc; - nsIGlobalObject* global = nsDOMEventTargetHelper::GetParentObject(); + nsIGlobalObject* global = DOMEventTargetHelper::GetParentObject(); rv = NS_NewDOMDocument(getter_AddRefs(responseDoc), emptyStr, emptyStr, nullptr, docURI, baseURI, mPrincipal, true, global, diff --git a/content/base/src/nsXMLHttpRequest.h b/content/base/src/nsXMLHttpRequest.h index e59213e84fd1..19dbeb9f636d 100644 --- a/content/base/src/nsXMLHttpRequest.h +++ b/content/base/src/nsXMLHttpRequest.h @@ -25,12 +25,12 @@ #include "nsJSUtils.h" #include "nsTArray.h" #include "nsITimer.h" -#include "nsDOMEventTargetHelper.h" #include "nsIPrincipal.h" #include "nsIScriptObjectPrincipal.h" #include "nsISizeOfEventTarget.h" #include "mozilla/Assertions.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/MemoryReporting.h" #include "mozilla/dom/TypedArray.h" #include "mozilla/dom/XMLHttpRequestBinding.h" @@ -96,12 +96,12 @@ protected: } // namespace mozilla -class nsXHREventTarget : public nsDOMEventTargetHelper, +class nsXHREventTarget : public mozilla::DOMEventTargetHelper, public nsIXMLHttpRequestEventTarget { protected: - nsXHREventTarget(nsDOMEventTargetHelper* aOwner) - : nsDOMEventTargetHelper(aOwner) + nsXHREventTarget(mozilla::DOMEventTargetHelper* aOwner) + : mozilla::DOMEventTargetHelper(aOwner) { } @@ -118,9 +118,9 @@ public: virtual ~nsXHREventTarget() {} NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsXHREventTarget, - nsDOMEventTargetHelper) + mozilla::DOMEventTargetHelper) NS_DECL_NSIXMLHTTPREQUESTEVENTTARGET - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper) IMPL_EVENT_HANDLER(loadstart) IMPL_EVENT_HANDLER(progress) @@ -137,7 +137,7 @@ class nsXMLHttpRequestUpload MOZ_FINAL : public nsXHREventTarget, public nsIXMLHttpRequestUpload { public: - nsXMLHttpRequestUpload(nsDOMEventTargetHelper* aOwner) + nsXMLHttpRequestUpload(mozilla::DOMEventTargetHelper* aOwner) : nsXHREventTarget(aOwner) { } @@ -505,7 +505,7 @@ public: // This creates a trusted readystatechange event, which is not cancelable and // doesn't bubble. nsresult CreateReadystatechangeEvent(nsIDOMEvent** aDOMEvent); - void DispatchProgressEvent(nsDOMEventTargetHelper* aTarget, + void DispatchProgressEvent(mozilla::DOMEventTargetHelper* aTarget, const nsAString& aType, bool aLengthComputable, uint64_t aLoaded, uint64_t aTotal); diff --git a/content/media/MediaRecorder.cpp b/content/media/MediaRecorder.cpp index a0dbde8ec9eb..3e50ce1e571d 100644 --- a/content/media/MediaRecorder.cpp +++ b/content/media/MediaRecorder.cpp @@ -7,7 +7,7 @@ #include "MediaRecorder.h" #include "GeneratedEvents.h" #include "MediaEncoder.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsError.h" #include "nsIDocument.h" #include "nsIDOMRecordErrorEvent.h" @@ -33,14 +33,14 @@ namespace mozilla { namespace dom { -NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaRecorder, nsDOMEventTargetHelper, +NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaRecorder, DOMEventTargetHelper, mStream) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaRecorder) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(MediaRecorder, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(MediaRecorder, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(MediaRecorder, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(MediaRecorder, DOMEventTargetHelper) /** * Session is an object to represent a single recording event. @@ -478,7 +478,7 @@ MediaRecorder::~MediaRecorder() } MediaRecorder::MediaRecorder(DOMMediaStream& aStream, nsPIDOMWindow* aOwnerWindow) - : nsDOMEventTargetHelper(aOwnerWindow), + : DOMEventTargetHelper(aOwnerWindow), mState(RecordingState::Inactive), mMutex("Session.Data.Mutex") { diff --git a/content/media/MediaRecorder.h b/content/media/MediaRecorder.h index 8b97abdf063b..d0939bcb77e5 100644 --- a/content/media/MediaRecorder.h +++ b/content/media/MediaRecorder.h @@ -8,7 +8,7 @@ #define MediaRecorder_h #include "mozilla/dom/MediaRecorderBinding.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" // Max size for allowing queue encoded data in memory #define MAX_ALLOW_MEMORY_BUFFER 1024000 @@ -35,7 +35,7 @@ namespace dom { * Also extract the encoded data and create blobs on every timeslice passed from start function or RequestData function called by UA. */ -class MediaRecorder : public nsDOMEventTargetHelper +class MediaRecorder : public DOMEventTargetHelper { class Session; friend class CreateAndDispatchBlobEventRunnable; @@ -52,7 +52,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaRecorder, - nsDOMEventTargetHelper) + DOMEventTargetHelper) // WebIDL // Start recording. If timeSlice has been provided, mediaRecorder will diff --git a/content/media/MediaStreamTrack.cpp b/content/media/MediaStreamTrack.cpp index 6c432f90f4bc..c9b26ceed818 100644 --- a/content/media/MediaStreamTrack.cpp +++ b/content/media/MediaStreamTrack.cpp @@ -31,13 +31,13 @@ MediaStreamTrack::~MediaStreamTrack() { } -NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaStreamTrack, nsDOMEventTargetHelper, +NS_IMPL_CYCLE_COLLECTION_INHERITED_1(MediaStreamTrack, DOMEventTargetHelper, mStream) -NS_IMPL_ADDREF_INHERITED(MediaStreamTrack, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(MediaStreamTrack, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(MediaStreamTrack, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(MediaStreamTrack, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaStreamTrack) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) void MediaStreamTrack::GetId(nsAString& aID) diff --git a/content/media/MediaStreamTrack.h b/content/media/MediaStreamTrack.h index 84230d5e5906..ca559d05ca26 100644 --- a/content/media/MediaStreamTrack.h +++ b/content/media/MediaStreamTrack.h @@ -6,7 +6,7 @@ #ifndef MEDIASTREAMTRACK_H_ #define MEDIASTREAMTRACK_H_ -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsID.h" #include "StreamBuffer.h" @@ -22,7 +22,7 @@ class VideoStreamTrack; /** * Class representing a track in a DOMMediaStream. */ -class MediaStreamTrack : public nsDOMEventTargetHelper { +class MediaStreamTrack : public DOMEventTargetHelper { public: /** * aTrackID is the MediaStreamGraph track ID for the track in the @@ -32,7 +32,8 @@ public: virtual ~MediaStreamTrack(); NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamTrack, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamTrack, + DOMEventTargetHelper) DOMMediaStream* GetParentObject() const { return mStream; } virtual JSObject* WrapObject(JSContext* aCx, diff --git a/content/media/TextTrack.cpp b/content/media/TextTrack.cpp index 42d12a945cd9..780d0d1bca40 100644 --- a/content/media/TextTrack.cpp +++ b/content/media/TextTrack.cpp @@ -17,17 +17,17 @@ namespace mozilla { namespace dom { NS_IMPL_CYCLE_COLLECTION_INHERITED_5(TextTrack, - nsDOMEventTargetHelper, + DOMEventTargetHelper, mParent, mCueList, mActiveCueList, mTextTrackList, mTrackElement) -NS_IMPL_ADDREF_INHERITED(TextTrack, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(TextTrack, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(TextTrack, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(TextTrack, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrack) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) TextTrack::TextTrack(nsISupports* aParent, TextTrackKind aKind, diff --git a/content/media/TextTrack.h b/content/media/TextTrack.h index efbb4501a4b7..9f0add69b96c 100644 --- a/content/media/TextTrack.h +++ b/content/media/TextTrack.h @@ -7,10 +7,10 @@ #ifndef mozilla_dom_TextTrack_h #define mozilla_dom_TextTrack_h +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/TextTrackBinding.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsString.h" namespace mozilla { @@ -36,11 +36,11 @@ enum TextTrackReadyState { FailedToLoad = 3U }; -class TextTrack MOZ_FINAL : public nsDOMEventTargetHelper +class TextTrack MOZ_FINAL : public DOMEventTargetHelper { public: NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrack, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrack, DOMEventTargetHelper) TextTrack(nsISupports* aParent, TextTrackKind aKind, diff --git a/content/media/TextTrackCue.cpp b/content/media/TextTrackCue.cpp index 93bde559541b..56e847987c2d 100644 --- a/content/media/TextTrackCue.cpp +++ b/content/media/TextTrackCue.cpp @@ -13,17 +13,17 @@ namespace mozilla { namespace dom { NS_IMPL_CYCLE_COLLECTION_INHERITED_5(TextTrackCue, - nsDOMEventTargetHelper, + DOMEventTargetHelper, mDocument, mTrack, mTrackElement, mDisplayState, mRegion) -NS_IMPL_ADDREF_INHERITED(TextTrackCue, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(TextTrackCue, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(TextTrackCue, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(TextTrackCue, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrackCue) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) StaticRefPtr TextTrackCue::sParserWrapper; diff --git a/content/media/TextTrackCue.h b/content/media/TextTrackCue.h index 674b69893c58..c076453db3c1 100644 --- a/content/media/TextTrackCue.h +++ b/content/media/TextTrackCue.h @@ -7,10 +7,10 @@ #ifndef mozilla_dom_TextTrackCue_h #define mozilla_dom_TextTrackCue_h +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/DocumentFragment.h" #include "mozilla/dom/VTTCueBinding.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsIWebVTTParserWrapper.h" #include "mozilla/StaticPtr.h" #include "nsIDocument.h" @@ -24,11 +24,11 @@ class HTMLTrackElement; class TextTrack; class TextTrackRegion; -class TextTrackCue MOZ_FINAL : public nsDOMEventTargetHelper +class TextTrackCue MOZ_FINAL : public DOMEventTargetHelper { public: NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackCue, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackCue, DOMEventTargetHelper) // TextTrackCue WebIDL // See bug 868509 about splitting out the WebVTT-specific interfaces. diff --git a/content/media/TextTrackList.cpp b/content/media/TextTrackList.cpp index 601a5ae624e3..982937009f4d 100644 --- a/content/media/TextTrackList.cpp +++ b/content/media/TextTrackList.cpp @@ -14,15 +14,15 @@ namespace mozilla { namespace dom { NS_IMPL_CYCLE_COLLECTION_INHERITED_3(TextTrackList, - nsDOMEventTargetHelper, + DOMEventTargetHelper, mGlobal, mTextTracks, mTextTrackManager) -NS_IMPL_ADDREF_INHERITED(TextTrackList, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(TextTrackList, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(TextTrackList, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(TextTrackList, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TextTrackList) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) TextTrackList::TextTrackList(nsISupports* aGlobal) : mGlobal(aGlobal) { diff --git a/content/media/TextTrackList.h b/content/media/TextTrackList.h index 2b0466740509..5f2e660ff194 100644 --- a/content/media/TextTrackList.h +++ b/content/media/TextTrackList.h @@ -7,9 +7,9 @@ #ifndef mozilla_dom_TextTrackList_h #define mozilla_dom_TextTrackList_h +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/TextTrack.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" namespace mozilla { namespace dom { @@ -20,11 +20,11 @@ class CompareTextTracks; class TrackEvent; class TrackEventRunner; -class TextTrackList MOZ_FINAL : public nsDOMEventTargetHelper +class TextTrackList MOZ_FINAL : public DOMEventTargetHelper { public: NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackList, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackList, DOMEventTargetHelper) TextTrackList(nsISupports* aGlobal); TextTrackList(nsISupports* aGlobal, TextTrackManager* aTextTrackManager); diff --git a/content/media/mediasource/MediaSource.cpp b/content/media/mediasource/MediaSource.cpp index 624ee6f2c0bd..170c5965e85f 100644 --- a/content/media/mediasource/MediaSource.cpp +++ b/content/media/mediasource/MediaSource.cpp @@ -271,7 +271,7 @@ MediaSource::Detach() } MediaSource::MediaSource(nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mDuration(UnspecifiedNaN()) , mDecoder(nullptr) , mReadyState(MediaSourceReadyState::Closed) @@ -370,15 +370,15 @@ MediaSource::NotifyEvicted(double aStart, double aEnd) mSourceBuffers->Evict(aStart, aEnd); } -NS_IMPL_CYCLE_COLLECTION_INHERITED_2(MediaSource, nsDOMEventTargetHelper, +NS_IMPL_CYCLE_COLLECTION_INHERITED_2(MediaSource, DOMEventTargetHelper, mSourceBuffers, mActiveSourceBuffers) -NS_IMPL_ADDREF_INHERITED(MediaSource, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(MediaSource, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(MediaSource, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(MediaSource, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MediaSource) NS_INTERFACE_MAP_ENTRY(mozilla::dom::MediaSource) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) } // namespace dom diff --git a/content/media/mediasource/MediaSource.h b/content/media/mediasource/MediaSource.h index 8e1e5132aee7..1c4f7162ea67 100644 --- a/content/media/mediasource/MediaSource.h +++ b/content/media/mediasource/MediaSource.h @@ -11,12 +11,12 @@ #include "js/RootingAPI.h" #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/MediaSourceBinding.h" #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsCycleCollectionNoteChild.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsID.h" #include "nsISupports.h" #include "nscore.h" @@ -41,7 +41,7 @@ template class Optional; { 0x3839d699, 0x22c5, 0x439f, \ { 0x94, 0xca, 0x0e, 0x0b, 0x26, 0xf9, 0xca, 0xbf } } -class MediaSource MOZ_FINAL : public nsDOMEventTargetHelper +class MediaSource MOZ_FINAL : public DOMEventTargetHelper { public: /** WebIDL Methods. */ @@ -64,7 +64,7 @@ public: /** End WebIDL Methods. */ NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaSource, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaSource, DOMEventTargetHelper) NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_MEDIASOURCE_IMPLEMENTATION_IID) nsPIDOMWindow* GetParentObject() const; diff --git a/content/media/mediasource/SourceBuffer.cpp b/content/media/mediasource/SourceBuffer.cpp index 6e74013ffe59..c528cfed40b8 100644 --- a/content/media/mediasource/SourceBuffer.cpp +++ b/content/media/mediasource/SourceBuffer.cpp @@ -253,7 +253,7 @@ SourceBuffer::Ended() } SourceBuffer::SourceBuffer(MediaSource* aMediaSource, const nsACString& aType) - : nsDOMEventTargetHelper(aMediaSource->GetParentObject()) + : DOMEventTargetHelper(aMediaSource->GetParentObject()) , mMediaSource(aMediaSource) , mAppendWindowStart(0) , mAppendWindowEnd(PositiveInfinity()) @@ -399,13 +399,14 @@ SourceBuffer::Evict(double aStart, double aEnd) } } -NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SourceBuffer, nsDOMEventTargetHelper, mMediaSource) +NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SourceBuffer, DOMEventTargetHelper, + mMediaSource) -NS_IMPL_ADDREF_INHERITED(SourceBuffer, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(SourceBuffer, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(SourceBuffer, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(SourceBuffer, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SourceBuffer) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) } // namespace dom diff --git a/content/media/mediasource/SourceBuffer.h b/content/media/mediasource/SourceBuffer.h index ebbd8cfc03c5..a2ca59e74f5d 100644 --- a/content/media/mediasource/SourceBuffer.h +++ b/content/media/mediasource/SourceBuffer.h @@ -14,12 +14,12 @@ #include "mozilla/Attributes.h" #include "mozilla/dom/SourceBufferBinding.h" #include "mozilla/dom/TypedArray.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/mozalloc.h" #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsCycleCollectionNoteChild.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsISupports.h" #include "nsStringGlue.h" #include "nscore.h" @@ -38,7 +38,7 @@ namespace dom { class TimeRanges; -class SourceBuffer MOZ_FINAL : public nsDOMEventTargetHelper +class SourceBuffer MOZ_FINAL : public DOMEventTargetHelper { public: /** WebIDL Methods. */ @@ -86,7 +86,7 @@ public: /** End WebIDL Methods. */ NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SourceBuffer, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SourceBuffer, DOMEventTargetHelper) explicit SourceBuffer(MediaSource* aMediaSource, const nsACString& aType); ~SourceBuffer(); diff --git a/content/media/mediasource/SourceBufferList.cpp b/content/media/mediasource/SourceBufferList.cpp index 778fc98677bc..601fc419eed1 100644 --- a/content/media/mediasource/SourceBufferList.cpp +++ b/content/media/mediasource/SourceBufferList.cpp @@ -135,7 +135,7 @@ SourceBufferList::QueueAsyncSimpleEvent(const char* aName) } SourceBufferList::SourceBufferList(MediaSource* aMediaSource) - : nsDOMEventTargetHelper(aMediaSource->GetParentObject()) + : DOMEventTargetHelper(aMediaSource->GetParentObject()) , mMediaSource(aMediaSource) { MOZ_ASSERT(aMediaSource); @@ -153,14 +153,14 @@ SourceBufferList::WrapObject(JSContext* aCx, JS::Handle aScope) return SourceBufferListBinding::Wrap(aCx, aScope, this); } -NS_IMPL_CYCLE_COLLECTION_INHERITED_2(SourceBufferList, nsDOMEventTargetHelper, +NS_IMPL_CYCLE_COLLECTION_INHERITED_2(SourceBufferList, DOMEventTargetHelper, mMediaSource, mSourceBuffers) -NS_IMPL_ADDREF_INHERITED(SourceBufferList, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(SourceBufferList, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(SourceBufferList, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(SourceBufferList, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SourceBufferList) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) } // namespace dom diff --git a/content/media/mediasource/SourceBufferList.h b/content/media/mediasource/SourceBufferList.h index a4bd2ae9cbd1..9c9951b02c2a 100644 --- a/content/media/mediasource/SourceBufferList.h +++ b/content/media/mediasource/SourceBufferList.h @@ -11,10 +11,10 @@ #include "js/RootingAPI.h" #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsAutoPtr.h" #include "nsCycleCollectionNoteChild.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsISupports.h" #include "nsTArray.h" @@ -30,7 +30,7 @@ namespace dom { class MediaSource; -class SourceBufferList MOZ_FINAL : public nsDOMEventTargetHelper +class SourceBufferList MOZ_FINAL : public DOMEventTargetHelper { public: /** WebIDL Methods. */ @@ -40,7 +40,8 @@ public: /** End WebIDL methods. */ NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SourceBufferList, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SourceBufferList, + DOMEventTargetHelper) explicit SourceBufferList(MediaSource* aMediaSource); diff --git a/content/media/webaudio/AudioContext.cpp b/content/media/webaudio/AudioContext.cpp index c526703cb63c..4ee764ba4d54 100644 --- a/content/media/webaudio/AudioContext.cpp +++ b/content/media/webaudio/AudioContext.cpp @@ -47,9 +47,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AudioContext) if (!tmp->mIsStarted) { NS_IMPL_CYCLE_COLLECTION_UNLINK(mActiveNodes) } -NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(DOMEventTargetHelper) -NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioContext, nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioContext, + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDestination) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mListener) if (!tmp->mIsStarted) { @@ -59,10 +60,10 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioContext, nsDOMEventTarget } NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END -NS_IMPL_ADDREF_INHERITED(AudioContext, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(AudioContext, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(AudioContext, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(AudioContext, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AudioContext) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) static float GetSampleRateForAudioContext(bool aIsOffline, float aSampleRate) { @@ -79,7 +80,7 @@ AudioContext::AudioContext(nsPIDOMWindow* aWindow, uint32_t aNumberOfChannels, uint32_t aLength, float aSampleRate) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mSampleRate(GetSampleRateForAudioContext(aIsOffline, aSampleRate)) , mNumberOfChannels(aNumberOfChannels) , mNodeCount(0) diff --git a/content/media/webaudio/AudioContext.h b/content/media/webaudio/AudioContext.h index 56482115f176..78b59ed77ae6 100644 --- a/content/media/webaudio/AudioContext.h +++ b/content/media/webaudio/AudioContext.h @@ -10,16 +10,16 @@ #include "mozilla/dom/AudioChannelBinding.h" #include "MediaBufferDecoder.h" #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" +#include "mozilla/MemoryReporting.h" #include "mozilla/dom/TypedArray.h" #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsHashKeys.h" #include "nsTHashtable.h" #include "js/TypeDecls.h" #include "nsIMemoryReporter.h" -#include "mozilla/MemoryReporting.h" // X11 has a #define for CurrentTime. Unbelievable :-(. // See content/media/DOMMediaStream.h for more fun! @@ -62,7 +62,7 @@ class ScriptProcessorNode; class WaveShaperNode; class PeriodicWave; -class AudioContext MOZ_FINAL : public nsDOMEventTargetHelper, +class AudioContext MOZ_FINAL : public DOMEventTargetHelper, public nsIMemoryReporter { AudioContext(nsPIDOMWindow* aParentWindow, @@ -75,7 +75,7 @@ class AudioContext MOZ_FINAL : public nsDOMEventTargetHelper, public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioContext, - nsDOMEventTargetHelper) + DOMEventTargetHelper) MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf) nsPIDOMWindow* GetParentObject() const @@ -90,7 +90,7 @@ public: virtual JSObject* WrapObject(JSContext* aCx, JS::Handle aScope) MOZ_OVERRIDE; - using nsDOMEventTargetHelper::DispatchTrustedEvent; + using DOMEventTargetHelper::DispatchTrustedEvent; // Constructor for regular AudioContext static already_AddRefed diff --git a/content/media/webaudio/AudioNode.cpp b/content/media/webaudio/AudioNode.cpp index 3644ad43e431..112d99f7572f 100644 --- a/content/media/webaudio/AudioNode.cpp +++ b/content/media/webaudio/AudioNode.cpp @@ -17,20 +17,21 @@ static const uint32_t INVALID_PORT = 0xffffffff; NS_IMPL_CYCLE_COLLECTION_CLASS(AudioNode) -NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AudioNode, nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AudioNode, DOMEventTargetHelper) tmp->DisconnectFromGraph(); tmp->mContext->UpdateNodeCount(-1); NS_IMPL_CYCLE_COLLECTION_UNLINK(mContext) NS_IMPL_CYCLE_COLLECTION_UNLINK(mOutputNodes) NS_IMPL_CYCLE_COLLECTION_UNLINK(mOutputParams) NS_IMPL_CYCLE_COLLECTION_UNLINK_END -NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioNode, nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AudioNode, + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mContext) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOutputNodes) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOutputParams) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END -NS_IMPL_ADDREF_INHERITED(AudioNode, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(AudioNode, DOMEventTargetHelper) NS_IMETHODIMP_(MozExternalRefCountType) AudioNode::Release() @@ -40,26 +41,26 @@ AudioNode::Release() // the derived type is destroyed. DisconnectFromGraph(); } - nsrefcnt r = nsDOMEventTargetHelper::Release(); + nsrefcnt r = DOMEventTargetHelper::Release(); NS_LOG_RELEASE(this, r, "AudioNode"); return r; } NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AudioNode) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) AudioNode::AudioNode(AudioContext* aContext, uint32_t aChannelCount, ChannelCountMode aChannelCountMode, ChannelInterpretation aChannelInterpretation) - : nsDOMEventTargetHelper(aContext->GetParentObject()) + : DOMEventTargetHelper(aContext->GetParentObject()) , mContext(aContext) , mChannelCount(aChannelCount) , mChannelCountMode(aChannelCountMode) , mChannelInterpretation(aChannelInterpretation) { MOZ_ASSERT(aContext); - nsDOMEventTargetHelper::BindToOwner(aContext->GetParentObject()); + DOMEventTargetHelper::BindToOwner(aContext->GetParentObject()); SetIsDOMBinding(); aContext->UpdateNodeCount(1); } diff --git a/content/media/webaudio/AudioNode.h b/content/media/webaudio/AudioNode.h index 43fbdaba9e85..08f54d2d9613 100644 --- a/content/media/webaudio/AudioNode.h +++ b/content/media/webaudio/AudioNode.h @@ -7,7 +7,7 @@ #ifndef AudioNode_h_ #define AudioNode_h_ -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/AudioNodeBinding.h" #include "nsCycleCollectionParticipant.h" #include "nsAutoPtr.h" @@ -81,7 +81,7 @@ private: * still alive, and will still be alive when it receives a message from the * engine. */ -class AudioNode : public nsDOMEventTargetHelper +class AudioNode : public DOMEventTargetHelper { protected: // You can only use refcounting to delete this object @@ -98,7 +98,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioNode, - nsDOMEventTargetHelper) + DOMEventTargetHelper) virtual AudioBufferSourceNode* AsAudioBufferSourceNode() { return nullptr; diff --git a/content/media/webaudio/ScriptProcessorNode.h b/content/media/webaudio/ScriptProcessorNode.h index 0d9ed3dc3e60..ce0dfc3dce85 100644 --- a/content/media/webaudio/ScriptProcessorNode.h +++ b/content/media/webaudio/ScriptProcessorNode.h @@ -88,7 +88,7 @@ public: return mNumberOfOutputChannels; } - using nsDOMEventTargetHelper::DispatchTrustedEvent; + using DOMEventTargetHelper::DispatchTrustedEvent; private: nsAutoPtr mSharedBuffers; diff --git a/content/media/webspeech/recognition/SpeechRecognition.cpp b/content/media/webspeech/recognition/SpeechRecognition.cpp index ecb3b68e603b..992216f8300d 100644 --- a/content/media/webspeech/recognition/SpeechRecognition.cpp +++ b/content/media/webspeech/recognition/SpeechRecognition.cpp @@ -60,15 +60,15 @@ GetSpeechRecognitionLog() NS_INTERFACE_MAP_BEGIN(SpeechRecognition) NS_INTERFACE_MAP_ENTRY(nsIObserver) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(SpeechRecognition, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(SpeechRecognition, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(SpeechRecognition, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(SpeechRecognition, DOMEventTargetHelper) struct SpeechRecognition::TestConfig SpeechRecognition::mTestConfig; SpeechRecognition::SpeechRecognition(nsPIDOMWindow* aOwnerWindow) - : nsDOMEventTargetHelper(aOwnerWindow) + : DOMEventTargetHelper(aOwnerWindow) , mEndpointer(kSAMPLE_RATE) , mAudioSamplesPerChunk(mEndpointer.FrameSize()) , mSpeechDetectionTimer(do_CreateInstance(NS_TIMER_CONTRACTID)) diff --git a/content/media/webspeech/recognition/SpeechRecognition.h b/content/media/webspeech/recognition/SpeechRecognition.h index 02cc59c6d27f..6245c31f3940 100644 --- a/content/media/webspeech/recognition/SpeechRecognition.h +++ b/content/media/webspeech/recognition/SpeechRecognition.h @@ -8,8 +8,8 @@ #define mozilla_dom_SpeechRecognition_h #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsCOMPtr.h" -#include "nsDOMEventTargetHelper.h" #include "nsString.h" #include "nsWrapperCache.h" #include "nsTArray.h" @@ -53,7 +53,7 @@ PRLogModuleInfo* GetSpeechRecognitionLog(); #define SR_LOG(...) #endif -class SpeechRecognition MOZ_FINAL : public nsDOMEventTargetHelper, +class SpeechRecognition MOZ_FINAL : public DOMEventTargetHelper, public nsIObserver, public SupportsWeakPtr { @@ -293,7 +293,7 @@ private: inline nsISupports* ToSupports(dom::SpeechRecognition* aRec) { - return ToSupports(static_cast(aRec)); + return ToSupports(static_cast(aRec)); } } // namespace mozilla diff --git a/content/media/webspeech/recognition/SpeechRecognitionAlternative.cpp b/content/media/webspeech/recognition/SpeechRecognitionAlternative.cpp index 91e7d90c6bc1..afb1f7e365fe 100644 --- a/content/media/webspeech/recognition/SpeechRecognitionAlternative.cpp +++ b/content/media/webspeech/recognition/SpeechRecognitionAlternative.cpp @@ -43,7 +43,7 @@ SpeechRecognitionAlternative::WrapObject(JSContext* aCx, nsISupports* SpeechRecognitionAlternative::GetParentObject() const { - return static_cast(mParent.get()); + return static_cast(mParent.get()); } void diff --git a/content/media/webspeech/recognition/SpeechRecognitionResult.cpp b/content/media/webspeech/recognition/SpeechRecognitionResult.cpp index 8cb91d35741b..0ecdaaab7418 100644 --- a/content/media/webspeech/recognition/SpeechRecognitionResult.cpp +++ b/content/media/webspeech/recognition/SpeechRecognitionResult.cpp @@ -40,7 +40,7 @@ SpeechRecognitionResult::WrapObject(JSContext* aCx, nsISupports* SpeechRecognitionResult::GetParentObject() const { - return static_cast(mParent.get()); + return static_cast(mParent.get()); } already_AddRefed diff --git a/content/media/webspeech/recognition/SpeechRecognitionResultList.cpp b/content/media/webspeech/recognition/SpeechRecognitionResultList.cpp index 293ad2d1b6ac..530ea22cf82c 100644 --- a/content/media/webspeech/recognition/SpeechRecognitionResultList.cpp +++ b/content/media/webspeech/recognition/SpeechRecognitionResultList.cpp @@ -34,7 +34,7 @@ SpeechRecognitionResultList::~SpeechRecognitionResultList() nsISupports* SpeechRecognitionResultList::GetParentObject() const { - return static_cast(mParent.get()); + return static_cast(mParent.get()); } JSObject* diff --git a/content/media/webspeech/recognition/SpeechStreamListener.cpp b/content/media/webspeech/recognition/SpeechStreamListener.cpp index 42408719bed0..1f2aba605e77 100644 --- a/content/media/webspeech/recognition/SpeechStreamListener.cpp +++ b/content/media/webspeech/recognition/SpeechStreamListener.cpp @@ -25,7 +25,7 @@ SpeechStreamListener::~SpeechStreamListener() SpeechRecognition* forgottenRecognition = nullptr; mRecognition.swap(forgottenRecognition); NS_ProxyRelease(mainThread, - static_cast(forgottenRecognition)); + static_cast(forgottenRecognition)); } void diff --git a/content/media/webspeech/synth/SpeechSynthesisUtterance.cpp b/content/media/webspeech/synth/SpeechSynthesisUtterance.cpp index 8c6bd740bbac..29ee99a631f5 100644 --- a/content/media/webspeech/synth/SpeechSynthesisUtterance.cpp +++ b/content/media/webspeech/synth/SpeechSynthesisUtterance.cpp @@ -19,18 +19,18 @@ namespace mozilla { namespace dom { NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SpeechSynthesisUtterance, - nsDOMEventTargetHelper, mVoice); + DOMEventTargetHelper, mVoice); NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SpeechSynthesisUtterance) NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(SpeechSynthesisUtterance, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(SpeechSynthesisUtterance, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(SpeechSynthesisUtterance, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(SpeechSynthesisUtterance, DOMEventTargetHelper) SpeechSynthesisUtterance::SpeechSynthesisUtterance(nsPIDOMWindow* aOwnerWindow, const nsAString& text) - : nsDOMEventTargetHelper(aOwnerWindow) + : DOMEventTargetHelper(aOwnerWindow) , mText(text) , mVolume(1) , mRate(1) diff --git a/content/media/webspeech/synth/SpeechSynthesisUtterance.h b/content/media/webspeech/synth/SpeechSynthesisUtterance.h index 54069195c9a0..9d41f29f2e80 100644 --- a/content/media/webspeech/synth/SpeechSynthesisUtterance.h +++ b/content/media/webspeech/synth/SpeechSynthesisUtterance.h @@ -7,8 +7,8 @@ #ifndef mozilla_dom_SpeechSynthesisUtterance_h #define mozilla_dom_SpeechSynthesisUtterance_h +#include "mozilla/DOMEventTargetHelper.h" #include "nsCOMPtr.h" -#include "nsDOMEventTargetHelper.h" #include "nsString.h" #include "js/TypeDecls.h" @@ -21,7 +21,7 @@ class SpeechSynthesisVoice; class SpeechSynthesis; class nsSynthVoiceRegistry; -class SpeechSynthesisUtterance MOZ_FINAL : public nsDOMEventTargetHelper +class SpeechSynthesisUtterance MOZ_FINAL : public DOMEventTargetHelper { friend class SpeechSynthesis; friend class nsSpeechTask; @@ -33,8 +33,8 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SpeechSynthesisUtterance, - nsDOMEventTargetHelper) - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + DOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) nsISupports* GetParentObject() const; diff --git a/dom/base/DOMRequest.cpp b/dom/base/DOMRequest.cpp index 6d45bcd6afd9..7efd043710cd 100644 --- a/dom/base/DOMRequest.cpp +++ b/dom/base/DOMRequest.cpp @@ -18,8 +18,8 @@ using mozilla::dom::DOMCursor; using mozilla::AutoSafeJSContext; DOMRequest::DOMRequest(nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow->IsInnerWindow() ? - aWindow : aWindow->GetCurrentInnerWindow()) + : DOMEventTargetHelper(aWindow->IsInnerWindow() ? + aWindow : aWindow->GetCurrentInnerWindow()) , mResult(JSVAL_VOID) , mDone(false) { @@ -28,29 +28,29 @@ DOMRequest::DOMRequest(nsPIDOMWindow* aWindow) NS_IMPL_CYCLE_COLLECTION_CLASS(DOMRequest) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(DOMRequest, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mError) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DOMRequest, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK(mError) tmp->mResult = JSVAL_VOID; NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(DOMRequest, - nsDOMEventTargetHelper) + DOMEventTargetHelper) // Don't need NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER because - // nsDOMEventTargetHelper does it for us. + // DOMEventTargetHelper does it for us. NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK(mResult) NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DOMRequest) NS_INTERFACE_MAP_ENTRY(nsIDOMDOMRequest) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(DOMRequest, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(DOMRequest, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(DOMRequest, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(DOMRequest, DOMEventTargetHelper) /* virtual */ JSObject* DOMRequest::WrapObject(JSContext* aCx, JS::Handle aScope) diff --git a/dom/base/DOMRequest.h b/dom/base/DOMRequest.h index 714aa8f50e66..e09b2bc16c1d 100644 --- a/dom/base/DOMRequest.h +++ b/dom/base/DOMRequest.h @@ -8,8 +8,8 @@ #define mozilla_dom_domrequest_h__ #include "nsIDOMDOMRequest.h" -#include "nsDOMEventTargetHelper.h" #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/DOMRequestBinding.h" #include "nsCOMPtr.h" @@ -17,7 +17,7 @@ namespace mozilla { namespace dom { -class DOMRequest : public nsDOMEventTargetHelper, +class DOMRequest : public DOMEventTargetHelper, public nsIDOMDOMRequest { protected: @@ -28,10 +28,10 @@ protected: public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIDOMDOMREQUEST - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(DOMRequest, - nsDOMEventTargetHelper) + DOMEventTargetHelper) // WrapperCache nsPIDOMWindow* GetParentObject() const diff --git a/dom/base/MessagePort.cpp b/dom/base/MessagePort.cpp index c52a73800c1b..1e053120996b 100644 --- a/dom/base/MessagePort.cpp +++ b/dom/base/MessagePort.cpp @@ -269,9 +269,9 @@ PostMessageRunnable::Run() } MessagePortBase::MessagePortBase(nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) { - // SetIsDOMBinding() is called by nsDOMEventTargetHelper's ctor. + // SetIsDOMBinding() is called by DOMEventTargetHelper's ctor. } MessagePortBase::MessagePortBase() @@ -282,7 +282,7 @@ MessagePortBase::MessagePortBase() NS_IMPL_CYCLE_COLLECTION_CLASS(MessagePort) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MessagePort, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK(mEntangledPort) // Custom unlink loop because this array contains nsRunnable objects @@ -300,7 +300,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MessagePort, NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MessagePort, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEntangledPort) // Custom unlink loop because this array contains nsRunnable objects @@ -317,10 +317,10 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MessagePort, NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MessagePort) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(MessagePort, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(MessagePort, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(MessagePort, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(MessagePort, DOMEventTargetHelper) MessagePort::MessagePort(nsPIDOMWindow* aWindow) : MessagePortBase(aWindow) diff --git a/dom/base/MessagePort.h b/dom/base/MessagePort.h index 2cddb64d8651..bc5ea39ae8a4 100644 --- a/dom/base/MessagePort.h +++ b/dom/base/MessagePort.h @@ -7,7 +7,7 @@ #define mozilla_dom_MessagePort_h #include "mozilla/Attributes.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" class nsPIDOMWindow; @@ -17,7 +17,7 @@ namespace dom { class DispatchEventRunnable; class PostMessageRunnable; -class MessagePortBase : public nsDOMEventTargetHelper +class MessagePortBase : public DOMEventTargetHelper { protected: MessagePortBase(nsPIDOMWindow* aWindow); @@ -59,7 +59,7 @@ class MessagePort MOZ_FINAL : public MessagePortBase public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MessagePort, - nsDOMEventTargetHelper) + DOMEventTargetHelper) MessagePort(nsPIDOMWindow* aWindow); ~MessagePort(); diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 4ac42cb47b10..3725a2e97b9d 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -23,6 +23,7 @@ #include "xpcprivate.h" #include "XPCWrapper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/RegisterBindings.h" #include "nscore.h" @@ -37,7 +38,6 @@ #include "nsIXPCSecurityManager.h" #include "xptcall.h" #include "nsTArray.h" -#include "nsDOMEventTargetHelper.h" #include "nsDocument.h" // nsDOMStyleSheetList #include "nsDOMBlobBuilder.h" @@ -3521,8 +3521,7 @@ nsEventTargetSH::PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *aGlobalObj, JSObject **parentObj) { JS::Rooted globalObj(cx, aGlobalObj); - nsDOMEventTargetHelper *target = - nsDOMEventTargetHelper::FromSupports(nativeObj); + DOMEventTargetHelper* target = DOMEventTargetHelper::FromSupports(nativeObj); nsCOMPtr native_parent; target->GetParentObject(getter_AddRefs(native_parent)); @@ -3544,8 +3543,7 @@ nsEventTargetSH::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, void nsEventTargetSH::PreserveWrapper(nsISupports *aNative) { - nsDOMEventTargetHelper *target = - nsDOMEventTargetHelper::FromSupports(aNative); + DOMEventTargetHelper* target = DOMEventTargetHelper::FromSupports(aNative); target->PreserveWrapper(aNative); } diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index bed772cd9903..e7999f280ec6 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -204,7 +204,7 @@ #include "nsLocation.h" #include "nsHTMLDocument.h" #include "nsWrapperCacheInlines.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "prrng.h" #include "nsSandboxFlags.h" #include "TimeChangeObserver.h" @@ -1225,10 +1225,10 @@ nsGlobalWindow::Init() } static PLDHashOperator -DisconnectEventTargetObjects(nsPtrHashKey* aKey, +DisconnectEventTargetObjects(nsPtrHashKey* aKey, void* aClosure) { - nsRefPtr target = aKey->GetKey(); + nsRefPtr target = aKey->GetKey(); target->DisconnectFromOwner(); return PL_DHASH_NEXT; } @@ -1336,13 +1336,13 @@ nsGlobalWindow::~nsGlobalWindow() } void -nsGlobalWindow::AddEventTargetObject(nsDOMEventTargetHelper* aObject) +nsGlobalWindow::AddEventTargetObject(DOMEventTargetHelper* aObject) { mEventTargetObjects.PutEntry(aObject); } void -nsGlobalWindow::RemoveEventTargetObject(nsDOMEventTargetHelper* aObject) +nsGlobalWindow::RemoveEventTargetObject(DOMEventTargetHelper* aObject) { mEventTargetObjects.RemoveEntry(aObject); } @@ -12856,12 +12856,12 @@ nsGlobalWindow::DisableTimeChangeNotifications() static PLDHashOperator CollectSizeAndListenerCount( - nsPtrHashKey *aEntry, + nsPtrHashKey* aEntry, void *arg) { nsWindowSizes* windowSizes = static_cast(arg); - nsDOMEventTargetHelper* et = aEntry->GetKey(); + DOMEventTargetHelper* et = aEntry->GetKey(); if (nsCOMPtr iSizeOf = do_QueryObject(et)) { windowSizes->mDOMEventTargetsSize += @@ -12904,7 +12904,7 @@ nsGlobalWindow::AddSizeOfIncludingThis(nsWindowSizes* aWindowSizes) const mEventTargetObjects.SizeOfExcludingThis(nullptr, aWindowSizes->mMallocSizeOf); aWindowSizes->mDOMEventTargetsCount += - const_cast >*> + const_cast >*> (&mEventTargetObjects)->EnumerateEntries(CollectSizeAndListenerCount, aWindowSizes); } diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 61e25729b1d0..5fc207a0f3d1 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -94,7 +94,6 @@ class nsScreen; class nsHistory; class nsGlobalWindowObserver; class nsGlobalWindow; -class nsDOMEventTargetHelper; class nsDOMWindowUtils; class nsIIdleService; struct nsIntSize; @@ -103,6 +102,7 @@ struct nsRect; class nsWindowSizes; namespace mozilla { +class DOMEventTargetHelper; class Selection; namespace dom { class BarProp; @@ -684,8 +684,8 @@ public: void UnmarkGrayTimers(); - void AddEventTargetObject(nsDOMEventTargetHelper* aObject); - void RemoveEventTargetObject(nsDOMEventTargetHelper* aObject); + void AddEventTargetObject(mozilla::DOMEventTargetHelper* aObject); + void RemoveEventTargetObject(mozilla::DOMEventTargetHelper* aObject); void NotifyIdleObserver(IdleObserverHolder* aIdleObserverHolder, bool aCallOnidle); @@ -1546,7 +1546,7 @@ protected: // currently enabled on this window. bool mAreDialogsEnabled; - nsTHashtable > mEventTargetObjects; + nsTHashtable > mEventTargetObjects; nsTArray mEnabledSensors; diff --git a/dom/base/nsScreen.cpp b/dom/base/nsScreen.cpp index 320ab29a4eab..5985a4efa131 100644 --- a/dom/base/nsScreen.cpp +++ b/dom/base/nsScreen.cpp @@ -44,7 +44,7 @@ nsScreen::Create(nsPIDOMWindow* aWindow) } nsScreen::nsScreen(nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mEventListener(nullptr) { } @@ -59,10 +59,10 @@ nsScreen::~nsScreen() // QueryInterface implementation for nsScreen NS_INTERFACE_MAP_BEGIN(nsScreen) NS_INTERFACE_MAP_ENTRY(nsIDOMScreen) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(nsScreen, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(nsScreen, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(nsScreen, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(nsScreen, DOMEventTargetHelper) int32_t nsScreen::GetPixelDepth(ErrorResult& aRv) diff --git a/dom/base/nsScreen.h b/dom/base/nsScreen.h index 12eebda7aea8..357e89a26d43 100644 --- a/dom/base/nsScreen.h +++ b/dom/base/nsScreen.h @@ -7,17 +7,17 @@ #include "mozilla/Attributes.h" #include "mozilla/dom/ScreenOrientation.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/ErrorResult.h" #include "mozilla/HalScreenConfiguration.h" #include "nsIDOMScreen.h" #include "nsCOMPtr.h" -#include "nsDOMEventTargetHelper.h" #include "nsRect.h" class nsDeviceContext; // Script "screen" object -class nsScreen : public nsDOMEventTargetHelper +class nsScreen : public mozilla::DOMEventTargetHelper , public nsIDOMScreen , public mozilla::hal::ScreenConfigurationObserver { @@ -27,7 +27,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIDOMSCREEN - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(mozilla::DOMEventTargetHelper) nsPIDOMWindow* GetParentObject() const { diff --git a/dom/battery/BatteryManager.cpp b/dom/battery/BatteryManager.cpp index b6138f4156cc..296c697a2758 100644 --- a/dom/battery/BatteryManager.cpp +++ b/dom/battery/BatteryManager.cpp @@ -4,13 +4,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include -#include "mozilla/Hal.h" #include "BatteryManager.h" -#include "nsIDOMClassInfo.h" #include "Constants.h" +#include "mozilla/DOMEventTargetHelper.h" +#include "mozilla/Hal.h" #include "mozilla/Preferences.h" -#include "nsDOMEventTargetHelper.h" #include "mozilla/dom/BatteryManagerBinding.h" +#include "nsIDOMClassInfo.h" /** * We have to use macros here because our leak analysis tool things we are @@ -26,7 +26,7 @@ namespace dom { namespace battery { BatteryManager::BatteryManager(nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mLevel(kDefaultLevel) , mCharging(kDefaultCharging) , mRemainingTime(kDefaultRemainingTime) diff --git a/dom/battery/BatteryManager.h b/dom/battery/BatteryManager.h index 7b9124a31cd2..3ddba9980e98 100644 --- a/dom/battery/BatteryManager.h +++ b/dom/battery/BatteryManager.h @@ -6,11 +6,10 @@ #ifndef mozilla_dom_battery_BatteryManager_h #define mozilla_dom_battery_BatteryManager_h -#include "nsDOMEventTargetHelper.h" -#include "nsCycleCollectionParticipant.h" -#include "mozilla/Observer.h" #include "Types.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" +#include "mozilla/Observer.h" +#include "nsCycleCollectionParticipant.h" class nsPIDOMWindow; class nsIScriptContext; @@ -24,7 +23,7 @@ class BatteryInformation; namespace dom { namespace battery { -class BatteryManager : public nsDOMEventTargetHelper +class BatteryManager : public DOMEventTargetHelper , public BatteryObserver { public: diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index d6c5049488b8..d1033cfbc050 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -394,7 +394,7 @@ DOMInterfaces = { # couldBeDOMBinding stuff in WrapNewBindingObject. 'hasXPConnectImpls': True, 'concrete': False, - 'jsImplParent': 'nsDOMEventTargetHelper' + 'jsImplParent': 'mozilla::DOMEventTargetHelper' }, 'Exception': { diff --git a/dom/bluetooth/BluetoothAdapter.cpp b/dom/bluetooth/BluetoothAdapter.cpp index 803ea28796d2..0ba55e057017 100644 --- a/dom/bluetooth/BluetoothAdapter.cpp +++ b/dom/bluetooth/BluetoothAdapter.cpp @@ -32,27 +32,27 @@ USING_BLUETOOTH_NAMESPACE NS_IMPL_CYCLE_COLLECTION_CLASS(BluetoothAdapter) NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(BluetoothAdapter, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsUuids) NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsDeviceAddresses) NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(BluetoothAdapter, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(BluetoothAdapter, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->Unroot(); NS_IMPL_CYCLE_COLLECTION_UNLINK_END // QueryInterface implementation for BluetoothAdapter NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothAdapter) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(BluetoothAdapter, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(BluetoothAdapter, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(BluetoothAdapter, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(BluetoothAdapter, DOMEventTargetHelper) class GetDevicesTask : public BluetoothReplyRunnable { @@ -160,7 +160,7 @@ static int kCreatePairedDeviceTimeout = 50000; // unit: msec BluetoothAdapter::BluetoothAdapter(nsPIDOMWindow* aWindow, const BluetoothValue& aValue) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , BluetoothPropertyContainer(BluetoothObjectType::TYPE_ADAPTER) , mJsUuids(nullptr) , mJsDeviceAddresses(nullptr) diff --git a/dom/bluetooth/BluetoothAdapter.h b/dom/bluetooth/BluetoothAdapter.h index 9add67b1d302..9bb82a9a80a4 100644 --- a/dom/bluetooth/BluetoothAdapter.h +++ b/dom/bluetooth/BluetoothAdapter.h @@ -8,10 +8,10 @@ #define mozilla_dom_bluetooth_bluetoothadapter_h__ #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "BluetoothCommon.h" #include "BluetoothPropertyContainer.h" #include "nsCOMPtr.h" -#include "nsDOMEventTargetHelper.h" namespace mozilla { namespace dom { @@ -28,7 +28,7 @@ class BluetoothSignal; class BluetoothNamedValue; class BluetoothValue; -class BluetoothAdapter : public nsDOMEventTargetHelper +class BluetoothAdapter : public DOMEventTargetHelper , public BluetoothSignalObserver , public BluetoothPropertyContainer { @@ -36,7 +36,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(BluetoothAdapter, - nsDOMEventTargetHelper) + DOMEventTargetHelper) static already_AddRefed Create(nsPIDOMWindow* aOwner, const BluetoothValue& aValue); diff --git a/dom/bluetooth/BluetoothDevice.cpp b/dom/bluetooth/BluetoothDevice.cpp index a81895f3d86a..0ca6233f65b7 100644 --- a/dom/bluetooth/BluetoothDevice.cpp +++ b/dom/bluetooth/BluetoothDevice.cpp @@ -23,31 +23,31 @@ DOMCI_DATA(BluetoothDevice, BluetoothDevice) NS_IMPL_CYCLE_COLLECTION_CLASS(BluetoothDevice) NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(BluetoothDevice, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsUuids) NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsServices) NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(BluetoothDevice, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(BluetoothDevice, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->Unroot(); NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothDevice) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(BluetoothDevice, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(BluetoothDevice, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(BluetoothDevice, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(BluetoothDevice, DOMEventTargetHelper) BluetoothDevice::BluetoothDevice(nsPIDOMWindow* aWindow, const nsAString& aAdapterPath, const BluetoothValue& aValue) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , BluetoothPropertyContainer(BluetoothObjectType::TYPE_DEVICE) , mJsUuids(nullptr) , mJsServices(nullptr) diff --git a/dom/bluetooth/BluetoothDevice.h b/dom/bluetooth/BluetoothDevice.h index 7dad68ae6ae8..51a5d1eae417 100644 --- a/dom/bluetooth/BluetoothDevice.h +++ b/dom/bluetooth/BluetoothDevice.h @@ -8,9 +8,9 @@ #define mozilla_dom_bluetooth_bluetoothdevice_h__ #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "BluetoothCommon.h" #include "BluetoothPropertyContainer.h" -#include "nsDOMEventTargetHelper.h" #include "nsString.h" BEGIN_BLUETOOTH_NAMESPACE @@ -20,7 +20,7 @@ class BluetoothValue; class BluetoothSignal; class BluetoothSocket; -class BluetoothDevice : public nsDOMEventTargetHelper +class BluetoothDevice : public DOMEventTargetHelper , public BluetoothSignalObserver , public BluetoothPropertyContainer { @@ -28,7 +28,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(BluetoothDevice, - nsDOMEventTargetHelper) + DOMEventTargetHelper) static already_AddRefed Create(nsPIDOMWindow* aOwner, const nsAString& aAdapterPath, diff --git a/dom/bluetooth/BluetoothManager.cpp b/dom/bluetooth/BluetoothManager.cpp index 922c64f853f4..6f23c15108fa 100644 --- a/dom/bluetooth/BluetoothManager.cpp +++ b/dom/bluetooth/BluetoothManager.cpp @@ -25,10 +25,10 @@ USING_BLUETOOTH_NAMESPACE // QueryInterface implementation for BluetoothManager NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothManager) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(BluetoothManager, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(BluetoothManager, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(BluetoothManager, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(BluetoothManager, DOMEventTargetHelper) class GetAdapterTask : public BluetoothReplyRunnable { @@ -90,7 +90,7 @@ private: }; BluetoothManager::BluetoothManager(nsPIDOMWindow *aWindow) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , BluetoothPropertyContainer(BluetoothObjectType::TYPE_MANAGER) { MOZ_ASSERT(aWindow); diff --git a/dom/bluetooth/BluetoothManager.h b/dom/bluetooth/BluetoothManager.h index 10ba1049022b..500aa1856029 100644 --- a/dom/bluetooth/BluetoothManager.h +++ b/dom/bluetooth/BluetoothManager.h @@ -8,10 +8,10 @@ #define mozilla_dom_bluetooth_bluetoothmanager_h__ #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" +#include "mozilla/Observer.h" #include "BluetoothCommon.h" #include "BluetoothPropertyContainer.h" -#include "nsDOMEventTargetHelper.h" -#include "mozilla/Observer.h" #include "nsISupportsImpl.h" namespace mozilla { @@ -24,7 +24,7 @@ BEGIN_BLUETOOTH_NAMESPACE class BluetoothNamedValue; -class BluetoothManager : public nsDOMEventTargetHelper +class BluetoothManager : public DOMEventTargetHelper , public BluetoothSignalObserver , public BluetoothPropertyContainer { diff --git a/dom/cellbroadcast/src/CellBroadcast.cpp b/dom/cellbroadcast/src/CellBroadcast.cpp index 1eb17d7bd0e8..038878228ff8 100644 --- a/dom/cellbroadcast/src/CellBroadcast.cpp +++ b/dom/cellbroadcast/src/CellBroadcast.cpp @@ -66,7 +66,7 @@ CellBroadcast::Create(nsPIDOMWindow* aWindow, ErrorResult& aRv) CellBroadcast::CellBroadcast(nsPIDOMWindow *aWindow, nsICellBroadcastProvider *aProvider) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mProvider(aProvider) { mListener = new Listener(this); diff --git a/dom/cellbroadcast/src/CellBroadcast.h b/dom/cellbroadcast/src/CellBroadcast.h index 7ee1f73ad962..d191dc4c9b36 100644 --- a/dom/cellbroadcast/src/CellBroadcast.h +++ b/dom/cellbroadcast/src/CellBroadcast.h @@ -7,8 +7,8 @@ #define mozilla_dom_CellBroadcast_h__ #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/ErrorResult.h" -#include "nsDOMEventTargetHelper.h" #include "nsICellBroadcastProvider.h" #include "js/TypeDecls.h" @@ -17,7 +17,7 @@ class nsPIDOMWindow; namespace mozilla { namespace dom { -class CellBroadcast MOZ_FINAL : public nsDOMEventTargetHelper +class CellBroadcast MOZ_FINAL : public DOMEventTargetHelper { /** * Class CellBroadcast doesn't actually inherit nsICellBroadcastListener. @@ -31,7 +31,7 @@ class CellBroadcast MOZ_FINAL : public nsDOMEventTargetHelper public: NS_DECL_NSICELLBROADCASTLISTENER - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) static already_AddRefed Create(nsPIDOMWindow* aOwner, ErrorResult& aRv); diff --git a/dom/devicestorage/DeviceStorage.h b/dom/devicestorage/DeviceStorage.h index d1b5fadbeae3..bd52e583dd24 100644 --- a/dom/devicestorage/DeviceStorage.h +++ b/dom/devicestorage/DeviceStorage.h @@ -11,7 +11,7 @@ #include "nsIFile.h" #include "nsIPrincipal.h" #include "nsIObserver.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/RefPtr.h" #include "mozilla/StaticPtr.h" #include "mozilla/dom/DOMRequest.h" @@ -151,7 +151,7 @@ class FileUpdateDispatcher MOZ_FINAL }; class nsDOMDeviceStorage MOZ_FINAL - : public nsDOMEventTargetHelper + : public mozilla::DOMEventTargetHelper , public nsIDOMDeviceStorage , public nsIObserver { diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index 745321c7ebef..80e4d0dbb631 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -3091,13 +3091,13 @@ NS_IMPL_CYCLE_COLLECTION_4(DeviceStorageRequest, NS_INTERFACE_MAP_BEGIN(nsDOMDeviceStorage) NS_INTERFACE_MAP_ENTRY(nsIDOMDeviceStorage) NS_INTERFACE_MAP_ENTRY(nsIObserver) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(nsDOMDeviceStorage, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(nsDOMDeviceStorage, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(nsDOMDeviceStorage, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(nsDOMDeviceStorage, DOMEventTargetHelper) nsDOMDeviceStorage::nsDOMDeviceStorage(nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mIsWatchingFile(false) , mAllowedToWatchFile(false) { @@ -4168,8 +4168,8 @@ nsDOMDeviceStorage::AddEventListener(const nsAString & aType, return rv; } - return nsDOMEventTargetHelper::AddEventListener(aType, aListener, aUseCapture, - aWantsUntrusted, aArgc); + return DOMEventTargetHelper::AddEventListener(aType, aListener, aUseCapture, + aWantsUntrusted, aArgc); } void @@ -4197,8 +4197,8 @@ nsDOMDeviceStorage::AddEventListener(const nsAString & aType, if (NS_WARN_IF(NS_FAILED(rv))) { return; } - nsDOMEventTargetHelper::AddEventListener(aType, aListener, aUseCapture, - aWantsUntrusted, aRv); + DOMEventTargetHelper::AddEventListener(aType, aListener, aUseCapture, + aWantsUntrusted, aRv); } NS_IMETHODIMP @@ -4223,7 +4223,7 @@ nsDOMDeviceStorage::RemoveEventListener(const nsAString & aType, nsIDOMEventListener *aListener, bool aUseCapture) { - nsDOMEventTargetHelper::RemoveEventListener(aType, aListener, false); + DOMEventTargetHelper::RemoveEventListener(aType, aListener, false); if (mIsWatchingFile && !HasListenersFor(nsGkAtoms::onchange)) { mIsWatchingFile = false; @@ -4239,7 +4239,7 @@ nsDOMDeviceStorage::RemoveEventListener(const nsAString& aType, bool aCapture, ErrorResult& aRv) { - nsDOMEventTargetHelper::RemoveEventListener(aType, aListener, aCapture, aRv); + DOMEventTargetHelper::RemoveEventListener(aType, aListener, aCapture, aRv); if (mIsWatchingFile && !HasListenersFor(nsGkAtoms::onchange)) { mIsWatchingFile = false; @@ -4260,37 +4260,37 @@ NS_IMETHODIMP nsDOMDeviceStorage::DispatchEvent(nsIDOMEvent *aEvt, bool *aRetval) { - return nsDOMEventTargetHelper::DispatchEvent(aEvt, aRetval); + return DOMEventTargetHelper::DispatchEvent(aEvt, aRetval); } EventTarget* nsDOMDeviceStorage::GetTargetForDOMEvent() { - return nsDOMEventTargetHelper::GetTargetForDOMEvent(); + return DOMEventTargetHelper::GetTargetForDOMEvent(); } EventTarget * nsDOMDeviceStorage::GetTargetForEventTargetChain() { - return nsDOMEventTargetHelper::GetTargetForEventTargetChain(); + return DOMEventTargetHelper::GetTargetForEventTargetChain(); } nsresult nsDOMDeviceStorage::PreHandleEvent(EventChainPreVisitor& aVisitor) { - return nsDOMEventTargetHelper::PreHandleEvent(aVisitor); + return DOMEventTargetHelper::PreHandleEvent(aVisitor); } nsresult nsDOMDeviceStorage::WillHandleEvent(EventChainPostVisitor& aVisitor) { - return nsDOMEventTargetHelper::WillHandleEvent(aVisitor); + return DOMEventTargetHelper::WillHandleEvent(aVisitor); } nsresult nsDOMDeviceStorage::PostHandleEvent(EventChainPostVisitor& aVisitor) { - return nsDOMEventTargetHelper::PostHandleEvent(aVisitor); + return DOMEventTargetHelper::PostHandleEvent(aVisitor); } nsresult @@ -4299,34 +4299,34 @@ nsDOMDeviceStorage::DispatchDOMEvent(WidgetEvent* aEvent, nsPresContext* aPresContext, nsEventStatus* aEventStatus) { - return nsDOMEventTargetHelper::DispatchDOMEvent(aEvent, - aDOMEvent, - aPresContext, - aEventStatus); + return DOMEventTargetHelper::DispatchDOMEvent(aEvent, + aDOMEvent, + aPresContext, + aEventStatus); } EventListenerManager* nsDOMDeviceStorage::GetOrCreateListenerManager() { - return nsDOMEventTargetHelper::GetOrCreateListenerManager(); + return DOMEventTargetHelper::GetOrCreateListenerManager(); } EventListenerManager* nsDOMDeviceStorage::GetExistingListenerManager() const { - return nsDOMEventTargetHelper::GetExistingListenerManager(); + return DOMEventTargetHelper::GetExistingListenerManager(); } nsIScriptContext * nsDOMDeviceStorage::GetContextForEventHandlers(nsresult *aRv) { - return nsDOMEventTargetHelper::GetContextForEventHandlers(aRv); + return DOMEventTargetHelper::GetContextForEventHandlers(aRv); } JSContext * nsDOMDeviceStorage::GetJSContextForEventHandlers() { - return nsDOMEventTargetHelper::GetJSContextForEventHandlers(); + return DOMEventTargetHelper::GetJSContextForEventHandlers(); } NS_IMPL_EVENT_HANDLER(nsDOMDeviceStorage, change) diff --git a/dom/events/nsDOMEventTargetHelper.cpp b/dom/events/DOMEventTargetHelper.cpp similarity index 65% rename from dom/events/nsDOMEventTargetHelper.cpp rename to dom/events/DOMEventTargetHelper.cpp index d4e80b2a2f56..758852a62e05 100644 --- a/dom/events/nsDOMEventTargetHelper.cpp +++ b/dom/events/DOMEventTargetHelper.cpp @@ -3,49 +3,50 @@ * 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 "nsDOMEventTargetHelper.h" #include "nsContentUtils.h" #include "nsIDocument.h" #include "prprf.h" #include "nsGlobalWindow.h" #include "ScriptSettings.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/EventDispatcher.h" #include "mozilla/EventListenerManager.h" #include "mozilla/Likely.h" -using namespace mozilla; -using namespace mozilla::dom; +namespace mozilla { -NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMEventTargetHelper) +using namespace dom; -NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_CLASS(DOMEventTargetHelper) + +NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER NS_IMPL_CYCLE_COLLECTION_TRACE_END -NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(DOMEventTargetHelper) if (MOZ_UNLIKELY(cb.WantDebugInfo())) { char name[512]; nsAutoString uri; if (tmp->mOwnerWindow && tmp->mOwnerWindow->GetExtantDoc()) { tmp->mOwnerWindow->GetExtantDoc()->GetDocumentURI(uri); } - PR_snprintf(name, sizeof(name), "nsDOMEventTargetHelper %s", + PR_snprintf(name, sizeof(name), "DOMEventTargetHelper %s", NS_ConvertUTF16toUTF8(uri).get()); cb.DescribeRefCountedNode(tmp->mRefCnt.get(), name); } else { - NS_IMPL_CYCLE_COLLECTION_DESCRIBE(nsDOMEventTargetHelper, tmp->mRefCnt.get()) + NS_IMPL_CYCLE_COLLECTION_DESCRIBE(DOMEventTargetHelper, tmp->mRefCnt.get()) } NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mListenerManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END -NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER NS_IMPL_CYCLE_COLLECTION_UNLINK(mListenerManager) NS_IMPL_CYCLE_COLLECTION_UNLINK_END -NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(DOMEventTargetHelper) if (tmp->IsBlack()) { if (tmp->mListenerManager) { tmp->mListenerManager->MarkForCC(); @@ -54,29 +55,29 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsDOMEventTargetHelper) } NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END -NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(DOMEventTargetHelper) return tmp->IsBlackAndDoesNotNeedTracing(tmp); NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END -NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsDOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(DOMEventTargetHelper) return tmp->IsBlack(); NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END -NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMEventTargetHelper) NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_ENTRY(nsIDOMEventTarget) - NS_INTERFACE_MAP_ENTRY(mozilla::dom::EventTarget) - NS_INTERFACE_MAP_ENTRY(nsDOMEventTargetHelper) + NS_INTERFACE_MAP_ENTRY(dom::EventTarget) + NS_INTERFACE_MAP_ENTRY(DOMEventTargetHelper) NS_INTERFACE_MAP_END -NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMEventTargetHelper) -NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE(nsDOMEventTargetHelper, +NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMEventTargetHelper) +NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE(DOMEventTargetHelper, LastRelease()) -NS_IMPL_DOMTARGET_DEFAULTS(nsDOMEventTargetHelper) +NS_IMPL_DOMTARGET_DEFAULTS(DOMEventTargetHelper) -nsDOMEventTargetHelper::~nsDOMEventTargetHelper() +DOMEventTargetHelper::~DOMEventTargetHelper() { if (nsPIDOMWindow* owner = GetOwner()) { static_cast(owner)->RemoveEventTargetObject(this); @@ -88,7 +89,7 @@ nsDOMEventTargetHelper::~nsDOMEventTargetHelper() } void -nsDOMEventTargetHelper::BindToOwner(nsPIDOMWindow* aOwner) +DOMEventTargetHelper::BindToOwner(nsPIDOMWindow* aOwner) { MOZ_ASSERT(!aOwner || aOwner->IsInnerWindow()); nsCOMPtr glob = do_QueryInterface(aOwner); @@ -96,7 +97,7 @@ nsDOMEventTargetHelper::BindToOwner(nsPIDOMWindow* aOwner) } void -nsDOMEventTargetHelper::BindToOwner(nsIGlobalObject* aOwner) +DOMEventTargetHelper::BindToOwner(nsIGlobalObject* aOwner) { if (mParentObject) { if (mOwnerWindow) { @@ -118,7 +119,7 @@ nsDOMEventTargetHelper::BindToOwner(nsIGlobalObject* aOwner) } void -nsDOMEventTargetHelper::BindToOwner(nsDOMEventTargetHelper* aOther) +DOMEventTargetHelper::BindToOwner(DOMEventTargetHelper* aOther) { if (mOwnerWindow) { static_cast(mOwnerWindow)->RemoveEventTargetObject(this); @@ -141,7 +142,7 @@ nsDOMEventTargetHelper::BindToOwner(nsDOMEventTargetHelper* aOther) } void -nsDOMEventTargetHelper::DisconnectFromOwner() +DOMEventTargetHelper::DisconnectFromOwner() { mOwnerWindow = nullptr; mParentObject = nullptr; @@ -153,9 +154,9 @@ nsDOMEventTargetHelper::DisconnectFromOwner() } NS_IMETHODIMP -nsDOMEventTargetHelper::RemoveEventListener(const nsAString& aType, - nsIDOMEventListener* aListener, - bool aUseCapture) +DOMEventTargetHelper::RemoveEventListener(const nsAString& aType, + nsIDOMEventListener* aListener, + bool aUseCapture) { EventListenerManager* elm = GetExistingListenerManager(); if (elm) { @@ -165,14 +166,14 @@ nsDOMEventTargetHelper::RemoveEventListener(const nsAString& aType, return NS_OK; } -NS_IMPL_REMOVE_SYSTEM_EVENT_LISTENER(nsDOMEventTargetHelper) +NS_IMPL_REMOVE_SYSTEM_EVENT_LISTENER(DOMEventTargetHelper) NS_IMETHODIMP -nsDOMEventTargetHelper::AddEventListener(const nsAString& aType, - nsIDOMEventListener *aListener, - bool aUseCapture, - bool aWantsUntrusted, - uint8_t aOptionalArgc) +DOMEventTargetHelper::AddEventListener(const nsAString& aType, + nsIDOMEventListener* aListener, + bool aUseCapture, + bool aWantsUntrusted, + uint8_t aOptionalArgc) { NS_ASSERTION(!aWantsUntrusted || aOptionalArgc > 1, "Won't check if this is chrome, you want to set " @@ -191,11 +192,11 @@ nsDOMEventTargetHelper::AddEventListener(const nsAString& aType, } void -nsDOMEventTargetHelper::AddEventListener(const nsAString& aType, - EventListener* aListener, - bool aUseCapture, - const Nullable& aWantsUntrusted, - ErrorResult& aRv) +DOMEventTargetHelper::AddEventListener(const nsAString& aType, + EventListener* aListener, + bool aUseCapture, + const Nullable& aWantsUntrusted, + ErrorResult& aRv) { bool wantsUntrusted; if (aWantsUntrusted.IsNull()) { @@ -217,11 +218,11 @@ nsDOMEventTargetHelper::AddEventListener(const nsAString& aType, } NS_IMETHODIMP -nsDOMEventTargetHelper::AddSystemEventListener(const nsAString& aType, - nsIDOMEventListener *aListener, - bool aUseCapture, - bool aWantsUntrusted, - uint8_t aOptionalArgc) +DOMEventTargetHelper::AddSystemEventListener(const nsAString& aType, + nsIDOMEventListener* aListener, + bool aUseCapture, + bool aWantsUntrusted, + uint8_t aOptionalArgc) { NS_ASSERTION(!aWantsUntrusted || aOptionalArgc > 1, "Won't check if this is chrome, you want to set " @@ -238,7 +239,7 @@ nsDOMEventTargetHelper::AddSystemEventListener(const nsAString& aType, } NS_IMETHODIMP -nsDOMEventTargetHelper::DispatchEvent(nsIDOMEvent* aEvent, bool* aRetVal) +DOMEventTargetHelper::DispatchEvent(nsIDOMEvent* aEvent, bool* aRetVal) { nsEventStatus status = nsEventStatus_eIgnore; nsresult rv = @@ -249,7 +250,7 @@ nsDOMEventTargetHelper::DispatchEvent(nsIDOMEvent* aEvent, bool* aRetVal) } nsresult -nsDOMEventTargetHelper::DispatchTrustedEvent(const nsAString& aEventName) +DOMEventTargetHelper::DispatchTrustedEvent(const nsAString& aEventName) { nsCOMPtr event; NS_NewDOMEvent(getter_AddRefs(event), this, nullptr, nullptr); @@ -260,7 +261,7 @@ nsDOMEventTargetHelper::DispatchTrustedEvent(const nsAString& aEventName) } nsresult -nsDOMEventTargetHelper::DispatchTrustedEvent(nsIDOMEvent* event) +DOMEventTargetHelper::DispatchTrustedEvent(nsIDOMEvent* event) { event->SetTrusted(true); @@ -269,24 +270,24 @@ nsDOMEventTargetHelper::DispatchTrustedEvent(nsIDOMEvent* event) } nsresult -nsDOMEventTargetHelper::SetEventHandler(nsIAtom* aType, - JSContext* aCx, - const JS::Value& aValue) +DOMEventTargetHelper::SetEventHandler(nsIAtom* aType, + JSContext* aCx, + const JS::Value& aValue) { nsRefPtr handler; JS::Rooted callable(aCx); if (aValue.isObject() && JS_ObjectIsCallable(aCx, callable = &aValue.toObject())) { - handler = new EventHandlerNonNull(callable, mozilla::dom::GetIncumbentGlobal()); + handler = new EventHandlerNonNull(callable, dom::GetIncumbentGlobal()); } SetEventHandler(aType, EmptyString(), handler); return NS_OK; } void -nsDOMEventTargetHelper::GetEventHandler(nsIAtom* aType, - JSContext* aCx, - JS::Value* aValue) +DOMEventTargetHelper::GetEventHandler(nsIAtom* aType, + JSContext* aCx, + JS::Value* aValue) { EventHandlerNonNull* handler = GetEventHandler(aType, EmptyString()); if (handler) { @@ -297,7 +298,7 @@ nsDOMEventTargetHelper::GetEventHandler(nsIAtom* aType, } nsresult -nsDOMEventTargetHelper::PreHandleEvent(EventChainPreVisitor& aVisitor) +DOMEventTargetHelper::PreHandleEvent(EventChainPreVisitor& aVisitor) { aVisitor.mCanHandle = true; aVisitor.mParentTarget = nullptr; @@ -305,23 +306,23 @@ nsDOMEventTargetHelper::PreHandleEvent(EventChainPreVisitor& aVisitor) } nsresult -nsDOMEventTargetHelper::PostHandleEvent(EventChainPostVisitor& aVisitor) +DOMEventTargetHelper::PostHandleEvent(EventChainPostVisitor& aVisitor) { return NS_OK; } nsresult -nsDOMEventTargetHelper::DispatchDOMEvent(WidgetEvent* aEvent, - nsIDOMEvent* aDOMEvent, - nsPresContext* aPresContext, - nsEventStatus* aEventStatus) +DOMEventTargetHelper::DispatchDOMEvent(WidgetEvent* aEvent, + nsIDOMEvent* aDOMEvent, + nsPresContext* aPresContext, + nsEventStatus* aEventStatus) { return EventDispatcher::DispatchDOMEvent(this, aEvent, aDOMEvent, aPresContext, aEventStatus); } EventListenerManager* -nsDOMEventTargetHelper::GetOrCreateListenerManager() +DOMEventTargetHelper::GetOrCreateListenerManager() { if (!mListenerManager) { mListenerManager = new EventListenerManager(this); @@ -331,13 +332,13 @@ nsDOMEventTargetHelper::GetOrCreateListenerManager() } EventListenerManager* -nsDOMEventTargetHelper::GetExistingListenerManager() const +DOMEventTargetHelper::GetExistingListenerManager() const { return mListenerManager; } nsIScriptContext* -nsDOMEventTargetHelper::GetContextForEventHandlers(nsresult* aRv) +DOMEventTargetHelper::GetContextForEventHandlers(nsresult* aRv) { *aRv = CheckInnerWindowCorrectness(); if (NS_FAILED(*aRv)) { @@ -349,7 +350,7 @@ nsDOMEventTargetHelper::GetContextForEventHandlers(nsresult* aRv) } nsresult -nsDOMEventTargetHelper::WantsUntrusted(bool* aRetVal) +DOMEventTargetHelper::WantsUntrusted(bool* aRetVal) { nsresult rv; nsIScriptContext* context = GetContextForEventHandlers(&rv); @@ -362,15 +363,17 @@ nsDOMEventTargetHelper::WantsUntrusted(bool* aRetVal) } void -nsDOMEventTargetHelper::EventListenerAdded(nsIAtom* aType) +DOMEventTargetHelper::EventListenerAdded(nsIAtom* aType) { - mozilla::ErrorResult rv; + ErrorResult rv; EventListenerWasAdded(Substring(nsDependentAtomString(aType), 2), rv); } void -nsDOMEventTargetHelper::EventListenerRemoved(nsIAtom* aType) +DOMEventTargetHelper::EventListenerRemoved(nsIAtom* aType) { - mozilla::ErrorResult rv; + ErrorResult rv; EventListenerWasRemoved(Substring(nsDependentAtomString(aType), 2), rv); } + +} // namespace mozilla diff --git a/dom/events/nsDOMEventTargetHelper.h b/dom/events/DOMEventTargetHelper.h similarity index 86% rename from dom/events/nsDOMEventTargetHelper.h rename to dom/events/DOMEventTargetHelper.h index 9d024116c088..3c70a0a352ec 100644 --- a/dom/events/nsDOMEventTargetHelper.h +++ b/dom/events/DOMEventTargetHelper.h @@ -3,8 +3,8 @@ * 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 nsDOMEventTargetHelper_h_ -#define nsDOMEventTargetHelper_h_ +#ifndef mozilla_DOMEventTargetHelper_h_ +#define mozilla_DOMEventTargetHelper_h_ #include "nsCOMPtr.h" #include "nsGkAtoms.h" @@ -18,23 +18,25 @@ #include "mozilla/dom/EventTarget.h" class JSCompartment; + namespace mozilla { + class ErrorResult; -} #define NS_DOMEVENTTARGETHELPER_IID \ { 0xa28385c6, 0x9451, 0x4d7e, \ { 0xa3, 0xdd, 0xf4, 0xb6, 0x87, 0x2f, 0xa4, 0x76 } } -class nsDOMEventTargetHelper : public mozilla::dom::EventTarget +class DOMEventTargetHelper : public dom::EventTarget { public: - nsDOMEventTargetHelper() + DOMEventTargetHelper() : mParentObject(nullptr) , mOwnerWindow(nullptr) , mHasOrHasHadOwnerWindow(false) - {} - nsDOMEventTargetHelper(nsPIDOMWindow* aWindow) + { + } + DOMEventTargetHelper(nsPIDOMWindow* aWindow) : mParentObject(nullptr) , mOwnerWindow(nullptr) , mHasOrHasHadOwnerWindow(false) @@ -43,7 +45,7 @@ public: // All objects coming through here are WebIDL objects SetIsDOMBinding(); } - nsDOMEventTargetHelper(nsDOMEventTargetHelper* aOther) + DOMEventTargetHelper(DOMEventTargetHelper* aOther) : mParentObject(nullptr) , mOwnerWindow(nullptr) , mHasOrHasHadOwnerWindow(false) @@ -53,23 +55,21 @@ public: SetIsDOMBinding(); } - virtual ~nsDOMEventTargetHelper(); + virtual ~DOMEventTargetHelper(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS - NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(DOMEventTargetHelper) NS_DECL_NSIDOMEVENTTARGET - virtual mozilla::EventListenerManager* - GetExistingListenerManager() const MOZ_OVERRIDE; - virtual mozilla::EventListenerManager* - GetOrCreateListenerManager() MOZ_OVERRIDE; + virtual EventListenerManager* GetExistingListenerManager() const MOZ_OVERRIDE; + virtual EventListenerManager* GetOrCreateListenerManager() MOZ_OVERRIDE; - using mozilla::dom::EventTarget::RemoveEventListener; + using dom::EventTarget::RemoveEventListener; virtual void AddEventListener(const nsAString& aType, - mozilla::dom::EventListener* aListener, + dom::EventListener* aListener, bool aCapture, - const mozilla::dom::Nullable& aWantsUntrusted, - mozilla::ErrorResult& aRv) MOZ_OVERRIDE; + const dom::Nullable& aWantsUntrusted, + ErrorResult& aRv) MOZ_OVERRIDE; NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOMEVENTTARGETHELPER_IID) @@ -82,14 +82,12 @@ public: } } - static nsDOMEventTargetHelper* FromSupports(nsISupports* aSupports) + static DOMEventTargetHelper* FromSupports(nsISupports* aSupports) { - mozilla::dom::EventTarget* target = - static_cast(aSupports); + dom::EventTarget* target = static_cast(aSupports); #ifdef DEBUG { - nsCOMPtr target_qi = - do_QueryInterface(aSupports); + nsCOMPtr target_qi = do_QueryInterface(aSupports); // If this assertion fires the QI implementation for the object in // question doesn't use the EventTarget pointer as the @@ -98,7 +96,7 @@ public: } #endif - return static_cast(target); + return static_cast(target); } bool HasListenersFor(nsIAtom* aTypeWithOn) @@ -109,11 +107,11 @@ public: nsresult SetEventHandler(nsIAtom* aType, JSContext* aCx, const JS::Value& aValue); - using mozilla::dom::EventTarget::SetEventHandler; + using dom::EventTarget::SetEventHandler; void GetEventHandler(nsIAtom* aType, JSContext* aCx, JS::Value* aValue); - using mozilla::dom::EventTarget::GetEventHandler; + using dom::EventTarget::GetEventHandler; virtual nsIDOMWindow* GetOwnerGlobal() MOZ_OVERRIDE { return nsPIDOMWindow::GetOuterFromCurrentInner(GetOwner()); @@ -135,7 +133,7 @@ public: nsPIDOMWindow* GetOwner() const { return mOwnerWindow; } void BindToOwner(nsIGlobalObject* aOwner); void BindToOwner(nsPIDOMWindow* aOwner); - void BindToOwner(nsDOMEventTargetHelper* aOther); + void BindToOwner(DOMEventTargetHelper* aOther); virtual void DisconnectFromOwner(); nsIGlobalObject* GetParentObject() const { return mParentObject; } bool HasOrHasHadOwner() { return mHasOrHasHadOwnerWindow; } @@ -143,15 +141,15 @@ public: virtual void EventListenerAdded(nsIAtom* aType) MOZ_OVERRIDE; virtual void EventListenerRemoved(nsIAtom* aType) MOZ_OVERRIDE; virtual void EventListenerWasAdded(const nsAString& aType, - mozilla::ErrorResult& aRv, + ErrorResult& aRv, JSCompartment* aCompartment = nullptr) {} virtual void EventListenerWasRemoved(const nsAString& aType, - mozilla::ErrorResult& aRv, + ErrorResult& aRv, JSCompartment* aCompartment = nullptr) {} protected: nsresult WantsUntrusted(bool* aRetVal); - nsRefPtr mListenerManager; + nsRefPtr mListenerManager; // Dispatch a trusted, non-cancellable and non-bubbling event to |this|. nsresult DispatchTrustedEvent(const nsAString& aEventName); // Make |event| trusted and dispatch |aEvent| to |this|. @@ -167,9 +165,11 @@ private: bool mHasOrHasHadOwnerWindow; }; -NS_DEFINE_STATIC_IID_ACCESSOR(nsDOMEventTargetHelper, +NS_DEFINE_STATIC_IID_ACCESSOR(DOMEventTargetHelper, NS_DOMEVENTTARGETHELPER_IID) +} // namespace mozilla + // XPIDL event handlers #define NS_IMPL_EVENT_HANDLER(_class, _event) \ NS_IMETHODIMP _class::GetOn##_event(JSContext* aCx, \ @@ -278,4 +278,4 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsDOMEventTargetHelper, return _class::GetExistingListenerManager(); \ } -#endif // nsDOMEventTargetHelper_h_ +#endif // mozilla_DOMEventTargetHelper_h_ diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp index 4fac105483e1..a69d882194bf 100644 --- a/dom/events/Event.cpp +++ b/dom/events/Event.cpp @@ -8,6 +8,7 @@ #include "ipc/IPCMessageUtils.h" #include "mozilla/dom/Event.h" #include "mozilla/ContentEvents.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/EventStateManager.h" #include "mozilla/InternalMutationEvent.h" #include "mozilla/MiscEvents.h" @@ -18,7 +19,6 @@ #include "nsContentUtils.h" #include "nsCOMPtr.h" #include "nsDeviceContext.h" -#include "nsDOMEventTargetHelper.h" #include "nsError.h" #include "nsGlobalWindow.h" #include "nsIFrame.h" @@ -1056,7 +1056,7 @@ Event::SetOwner(mozilla::dom::EventTarget* aOwner) return; } - nsCOMPtr eth = do_QueryInterface(aOwner); + nsCOMPtr eth = do_QueryInterface(aOwner); if (eth) { mOwner = eth->GetOwner(); return; diff --git a/dom/events/moz.build b/dom/events/moz.build index b58c0253a9fa..dc1c4664b604 100644 --- a/dom/events/moz.build +++ b/dom/events/moz.build @@ -14,7 +14,6 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'content_events' EXPORTS += [ - 'nsDOMEventTargetHelper.h', 'nsDOMKeyNameList.h', 'nsEventNameList.h', 'nsEventStates.h', @@ -24,6 +23,7 @@ EXPORTS += [ EXPORTS.mozilla += [ 'AsyncEventDispatcher.h', + 'DOMEventTargetHelper.h', 'EventDispatcher.h', 'EventListenerManager.h', 'EventStateManager.h', @@ -76,6 +76,7 @@ UNIFIED_SOURCES += [ 'DataContainerEvent.cpp', 'DataTransfer.cpp', 'DeviceMotionEvent.cpp', + 'DOMEventTargetHelper.cpp', 'DragEvent.cpp', 'Event.cpp', 'EventDispatcher.cpp', @@ -92,7 +93,6 @@ UNIFIED_SOURCES += [ 'MutationEvent.cpp', 'NotifyAudioAvailableEvent.cpp', 'NotifyPaintEvent.cpp', - 'nsDOMEventTargetHelper.cpp', 'nsJSEventListener.cpp', 'nsPaintRequest.cpp', 'PointerEvent.cpp', diff --git a/dom/file/FileCommon.h b/dom/file/FileCommon.h index 736842660df1..4879511a0dd3 100644 --- a/dom/file/FileCommon.h +++ b/dom/file/FileCommon.h @@ -7,10 +7,10 @@ #ifndef mozilla_dom_file_filecommon_h__ #define mozilla_dom_file_filecommon_h__ +#include "mozilla/DOMEventTargetHelper.h" #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsDebug.h" #include "nsString.h" #include "nsTArray.h" diff --git a/dom/file/FileHandle.cpp b/dom/file/FileHandle.cpp index 89e86cdebbea..74338505d27f 100644 --- a/dom/file/FileHandle.cpp +++ b/dom/file/FileHandle.cpp @@ -55,14 +55,14 @@ private: } // anonymous namespace -NS_IMPL_CYCLE_COLLECTION_INHERITED_1(FileHandle, nsDOMEventTargetHelper, +NS_IMPL_CYCLE_COLLECTION_INHERITED_1(FileHandle, DOMEventTargetHelper, mFileStorage) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FileHandle) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(FileHandle, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(FileHandle, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(FileHandle, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(FileHandle, DOMEventTargetHelper) // static already_AddRefed diff --git a/dom/file/FileHandle.h b/dom/file/FileHandle.h index deda8a9547ed..dbe4b0fceab1 100644 --- a/dom/file/FileHandle.h +++ b/dom/file/FileHandle.h @@ -12,9 +12,8 @@ #include "nsIFile.h" #include "nsIFileStorage.h" -#include "nsDOMEventTargetHelper.h" - #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/FileModeBinding.h" class nsIDOMFile; @@ -44,7 +43,7 @@ class FileHelper; * GetFileInfo, CreateStream and CreateFileObject. * (for example IDBFileHandle provides IndexedDB specific implementation). */ -class FileHandle : public nsDOMEventTargetHelper +class FileHandle : public DOMEventTargetHelper { friend class FileService; friend class LockedFile; @@ -53,7 +52,7 @@ class FileHandle : public nsDOMEventTargetHelper public: NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileHandle, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileHandle, DOMEventTargetHelper) static already_AddRefed Create(nsPIDOMWindow* aWindow, @@ -124,12 +123,12 @@ public: protected: FileHandle(nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) { } - FileHandle(nsDOMEventTargetHelper* aOwner) - : nsDOMEventTargetHelper(aOwner) + FileHandle(DOMEventTargetHelper* aOwner) + : DOMEventTargetHelper(aOwner) { } diff --git a/dom/file/LockedFile.cpp b/dom/file/LockedFile.cpp index 4e5e516a404e..3a691cc6ecb4 100644 --- a/dom/file/LockedFile.cpp +++ b/dom/file/LockedFile.cpp @@ -310,15 +310,15 @@ LockedFile::~LockedFile() NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); } -NS_IMPL_CYCLE_COLLECTION_INHERITED_1(LockedFile, nsDOMEventTargetHelper, +NS_IMPL_CYCLE_COLLECTION_INHERITED_1(LockedFile, DOMEventTargetHelper, mFileHandle) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(LockedFile) NS_INTERFACE_MAP_ENTRY(nsIRunnable) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(LockedFile, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(LockedFile, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(LockedFile, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(LockedFile, DOMEventTargetHelper) nsresult LockedFile::PreHandleEvent(EventChainPreVisitor& aVisitor) diff --git a/dom/file/LockedFile.h b/dom/file/LockedFile.h index 4b5a03f9164c..1af59f38ba18 100644 --- a/dom/file/LockedFile.h +++ b/dom/file/LockedFile.h @@ -9,9 +9,9 @@ #include "FileCommon.h" #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/FileModeBinding.h" #include "mozilla/dom/TypedArray.h" -#include "nsDOMEventTargetHelper.h" #include "nsIInputStream.h" #include "nsIRunnable.h" @@ -32,7 +32,7 @@ class FileHandle; class FileRequest; class MetadataHelper; -class LockedFile : public nsDOMEventTargetHelper, +class LockedFile : public DOMEventTargetHelper, public nsIRunnable { friend class FinishHelper; @@ -44,7 +44,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIRUNNABLE - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(LockedFile, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(LockedFile, DOMEventTargetHelper) enum RequestMode { diff --git a/dom/fmradio/FMRadio.cpp b/dom/fmradio/FMRadio.cpp index 5d3bdab05bd6..0aa7c9f63044 100644 --- a/dom/fmradio/FMRadio.cpp +++ b/dom/fmradio/FMRadio.cpp @@ -405,10 +405,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FMRadio) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_INTERFACE_MAP_ENTRY(nsIAudioChannelAgentCallback) NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(FMRadio, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(FMRadio, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(FMRadio, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(FMRadio, DOMEventTargetHelper) END_FMRADIO_NAMESPACE diff --git a/dom/fmradio/FMRadio.h b/dom/fmradio/FMRadio.h index 64d51bbab272..8cec7daae48d 100644 --- a/dom/fmradio/FMRadio.h +++ b/dom/fmradio/FMRadio.h @@ -6,12 +6,12 @@ #ifndef mozilla_dom_FMRadio_h #define mozilla_dom_FMRadio_h -#include "FMRadioCommon.h" -#include "nsDOMEventTargetHelper.h" -#include "nsCycleCollectionParticipant.h" -#include "mozilla/HalTypes.h" -#include "nsWeakReference.h" #include "AudioChannelAgent.h" +#include "FMRadioCommon.h" +#include "mozilla/DOMEventTargetHelper.h" +#include "mozilla/HalTypes.h" +#include "nsCycleCollectionParticipant.h" +#include "nsWeakReference.h" class nsPIDOMWindow; class nsIScriptContext; @@ -20,7 +20,7 @@ BEGIN_FMRADIO_NAMESPACE class DOMRequest; -class FMRadio MOZ_FINAL : public nsDOMEventTargetHelper +class FMRadio MOZ_FINAL : public DOMEventTargetHelper , public hal::SwitchObserver , public FMRadioEventObserver , public nsSupportsWeakReference @@ -36,7 +36,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIAUDIOCHANNELAGENTCALLBACK - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) void Init(nsPIDOMWindow *aWindow); void Shutdown(); diff --git a/dom/icc/src/Icc.h b/dom/icc/src/Icc.h index 51c10433faf9..57e894ceeae1 100644 --- a/dom/icc/src/Icc.h +++ b/dom/icc/src/Icc.h @@ -5,16 +5,16 @@ #ifndef mozilla_dom_Icc_h #define mozilla_dom_Icc_h -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "nsIIccProvider.h" namespace mozilla { namespace dom { -class Icc MOZ_FINAL : public nsDOMEventTargetHelper +class Icc MOZ_FINAL : public DOMEventTargetHelper { public: - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) Icc(nsPIDOMWindow* aWindow, long aClientId, const nsAString& aIccId); diff --git a/dom/icc/src/IccManager.cpp b/dom/icc/src/IccManager.cpp index 1914bc80bf68..74dd971e62f0 100644 --- a/dom/icc/src/IccManager.cpp +++ b/dom/icc/src/IccManager.cpp @@ -20,7 +20,7 @@ DOMCI_DATA(MozIccManager, IccManager) NS_IMPL_CYCLE_COLLECTION_CLASS(IccManager) NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IccManager, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsIccIds) // We did not setup 'mIccListeners' being a participant of cycle collection is // because in Navigator->Invalidate() it will call mIccManager->Shutdown(), @@ -29,21 +29,21 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IccManager, NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IccManager, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IccManager, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->Unroot(); NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IccManager) NS_INTERFACE_MAP_ENTRY(nsIDOMMozIccManager) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozIccManager) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(IccManager, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(IccManager, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(IccManager, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(IccManager, DOMEventTargetHelper) IccManager::IccManager(nsPIDOMWindow* aWindow) : mJsIccIds(nullptr) diff --git a/dom/icc/src/IccManager.h b/dom/icc/src/IccManager.h index 15f4aa5b8a25..64cece6a868d 100644 --- a/dom/icc/src/IccManager.h +++ b/dom/icc/src/IccManager.h @@ -5,8 +5,8 @@ #ifndef mozilla_dom_IccManager_h #define mozilla_dom_IccManager_h +#include "mozilla/DOMEventTargetHelper.h" #include "nsCycleCollectionParticipant.h" -#include "nsDOMEventTargetHelper.h" #include "nsIDOMIccManager.h" #include "nsIIccProvider.h" #include "nsTArrayHelpers.h" @@ -16,17 +16,17 @@ namespace dom { class IccListener; -class IccManager MOZ_FINAL : public nsDOMEventTargetHelper +class IccManager MOZ_FINAL : public DOMEventTargetHelper , public nsIDOMMozIccManager { public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIDOMMOZICCMANAGER - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(IccManager, - nsDOMEventTargetHelper) + DOMEventTargetHelper) IccManager(nsPIDOMWindow* aWindow); ~IccManager(); diff --git a/dom/indexedDB/IDBDatabase.h b/dom/indexedDB/IDBDatabase.h index e4cd22fd2751..b3432e52b5e7 100644 --- a/dom/indexedDB/IDBDatabase.h +++ b/dom/indexedDB/IDBDatabase.h @@ -14,10 +14,10 @@ #include "nsIOfflineStorage.h" #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/IDBObjectStoreBinding.h" #include "mozilla/dom/IDBTransactionBinding.h" #include "mozilla/dom/quota/PersistenceType.h" -#include "nsDOMEventTargetHelper.h" #include "mozilla/dom/indexedDB/FileManager.h" #include "mozilla/dom/indexedDB/IDBRequest.h" diff --git a/dom/indexedDB/IDBRequest.cpp b/dom/indexedDB/IDBRequest.cpp index 40ccd936d38c..17cdee65f50f 100644 --- a/dom/indexedDB/IDBRequest.cpp +++ b/dom/indexedDB/IDBRequest.cpp @@ -356,7 +356,7 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(IDBRequest) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IDBRequest, IDBWrapperCache) // Don't need NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS because - // nsDOMEventTargetHelper does it for us. + // DOMEventTargetHelper does it for us. NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSourceAsObjectStore) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSourceAsIndex) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSourceAsCursor) @@ -375,7 +375,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IDBRequest, IDBWrapperCache) // Don't need NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER because - // nsDOMEventTargetHelper does it for us. + // DOMEventTargetHelper does it for us. NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK(mResultVal) NS_IMPL_CYCLE_COLLECTION_TRACE_END diff --git a/dom/indexedDB/IDBWrapperCache.cpp b/dom/indexedDB/IDBWrapperCache.cpp index 2b456e01a4e6..964f2992ea06 100644 --- a/dom/indexedDB/IDBWrapperCache.cpp +++ b/dom/indexedDB/IDBWrapperCache.cpp @@ -12,13 +12,13 @@ USING_INDEXEDDB_NAMESPACE NS_IMPL_CYCLE_COLLECTION_CLASS(IDBWrapperCache) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IDBWrapperCache, - nsDOMEventTargetHelper) + DOMEventTargetHelper) // Don't need NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS because - // nsDOMEventTargetHelper does it for us. + // DOMEventTargetHelper does it for us. NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IDBWrapperCache, - nsDOMEventTargetHelper) + DOMEventTargetHelper) if (tmp->mScriptOwner) { tmp->mScriptOwner = nullptr; mozilla::DropJSObjects(tmp); @@ -26,17 +26,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IDBWrapperCache, NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IDBWrapperCache, - nsDOMEventTargetHelper) + DOMEventTargetHelper) // Don't need NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER because - // nsDOMEventTargetHelper does it for us. + // DOMEventTargetHelper does it for us. NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mScriptOwner) NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IDBWrapperCache) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(IDBWrapperCache, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(IDBWrapperCache, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(IDBWrapperCache, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(IDBWrapperCache, DOMEventTargetHelper) IDBWrapperCache::~IDBWrapperCache() { diff --git a/dom/indexedDB/IDBWrapperCache.h b/dom/indexedDB/IDBWrapperCache.h index e5825eff8714..ec20a9b2b783 100644 --- a/dom/indexedDB/IDBWrapperCache.h +++ b/dom/indexedDB/IDBWrapperCache.h @@ -7,19 +7,18 @@ #ifndef mozilla_dom_indexeddb_idbwrappercache_h__ #define mozilla_dom_indexeddb_idbwrappercache_h__ +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/indexedDB/IndexedDatabase.h" -#include "nsDOMEventTargetHelper.h" - BEGIN_INDEXEDDB_NAMESPACE -class IDBWrapperCache : public nsDOMEventTargetHelper +class IDBWrapperCache : public DOMEventTargetHelper { public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED( IDBWrapperCache, - nsDOMEventTargetHelper) + DOMEventTargetHelper) JSObject* GetScriptOwner() const { @@ -35,7 +34,7 @@ public: // Do what nsEventTargetSH::PreCreate does. nsCOMPtr parent; - nsDOMEventTargetHelper::GetParentObject(getter_AddRefs(parent)); + DOMEventTargetHelper::GetParentObject(getter_AddRefs(parent)); return parent ? parent->GetGlobalJSObject() : nullptr; } @@ -49,11 +48,11 @@ public: #endif protected: - IDBWrapperCache(nsDOMEventTargetHelper* aOwner) - : nsDOMEventTargetHelper(aOwner), mScriptOwner(nullptr) + IDBWrapperCache(DOMEventTargetHelper* aOwner) + : DOMEventTargetHelper(aOwner), mScriptOwner(nullptr) { } IDBWrapperCache(nsPIDOMWindow* aOwner) - : nsDOMEventTargetHelper(aOwner), mScriptOwner(nullptr) + : DOMEventTargetHelper(aOwner), mScriptOwner(nullptr) { } virtual ~IDBWrapperCache(); diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index d45792d04cd9..5d0c9bff9143 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -2612,7 +2612,7 @@ TabChildGlobal::Init() MM_CHILD); } -NS_IMPL_CYCLE_COLLECTION_INHERITED_1(TabChildGlobal, nsDOMEventTargetHelper, +NS_IMPL_CYCLE_COLLECTION_INHERITED_1(TabChildGlobal, DOMEventTargetHelper, mMessageManager) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TabChildGlobal) @@ -2623,10 +2623,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TabChildGlobal) NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal) NS_INTERFACE_MAP_ENTRY(nsIGlobalObject) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(ContentFrameMessageManager) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(TabChildGlobal, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(TabChildGlobal, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(TabChildGlobal, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(TabChildGlobal, DOMEventTargetHelper) /* [notxpcom] boolean markForCC (); */ // This method isn't automatically forwarded safely because it's notxpcom, so diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 907a63dba8c3..bdaf2178846a 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -22,7 +22,6 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsFrameMessageManager.h" #include "nsIWebProgressListener.h" -#include "nsDOMEventTargetHelper.h" #include "nsIPresShell.h" #include "nsIScriptObjectPrincipal.h" #include "nsWeakReference.h" @@ -30,6 +29,7 @@ #include "nsITooltipListener.h" #include "mozilla/Attributes.h" #include "mozilla/dom/TabContext.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/EventDispatcher.h" #include "mozilla/EventForwards.h" #include "mozilla/layers/CompositorTypes.h" @@ -48,7 +48,7 @@ class TabChild; class ClonedMessageData; class TabChildBase; -class TabChildGlobal : public nsDOMEventTargetHelper, +class TabChildGlobal : public DOMEventTargetHelper, public nsIContentFrameMessageManager, public nsIScriptObjectPrincipal, public nsIGlobalObject @@ -57,7 +57,7 @@ public: TabChildGlobal(TabChildBase* aTabChild); void Init(); NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TabChildGlobal, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TabChildGlobal, DOMEventTargetHelper) NS_FORWARD_SAFE_NSIMESSAGELISTENERMANAGER(mMessageManager) NS_FORWARD_SAFE_NSIMESSAGESENDER(mMessageManager) NS_IMETHOD SendSyncMessage(const nsAString& aMessageName, @@ -103,19 +103,19 @@ public: bool aUseCapture) { // By default add listeners only for trusted events! - return nsDOMEventTargetHelper::AddEventListener(aType, aListener, - aUseCapture, false, 2); + return DOMEventTargetHelper::AddEventListener(aType, aListener, + aUseCapture, false, 2); } - using nsDOMEventTargetHelper::AddEventListener; + using DOMEventTargetHelper::AddEventListener; NS_IMETHOD AddEventListener(const nsAString& aType, nsIDOMEventListener* aListener, bool aUseCapture, bool aWantsUntrusted, uint8_t optional_argc) MOZ_OVERRIDE { - return nsDOMEventTargetHelper::AddEventListener(aType, aListener, - aUseCapture, - aWantsUntrusted, - optional_argc); + return DOMEventTargetHelper::AddEventListener(aType, aListener, + aUseCapture, + aWantsUntrusted, + optional_argc); } nsresult diff --git a/dom/mobileconnection/src/MobileConnection.cpp b/dom/mobileconnection/src/MobileConnection.cpp index f15cebacd395..55e6980bde1d 100644 --- a/dom/mobileconnection/src/MobileConnection.cpp +++ b/dom/mobileconnection/src/MobileConnection.cpp @@ -52,23 +52,23 @@ DOMCI_DATA(MozMobileConnection, MobileConnection) NS_IMPL_CYCLE_COLLECTION_CLASS(MobileConnection) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MobileConnection, - nsDOMEventTargetHelper) + DOMEventTargetHelper) // Don't traverse mListener because it doesn't keep any reference to // MobileConnection but a raw pointer instead. Neither does mProvider because // it's an xpcom service and is only released at shutting down. NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MobileConnection, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MobileConnection) NS_INTERFACE_MAP_ENTRY(nsIDOMMozMobileConnection) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozMobileConnection) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(MobileConnection, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(MobileConnection, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(MobileConnection, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(MobileConnection, DOMEventTargetHelper) NS_IMPL_EVENT_HANDLER(MobileConnection, voicechange) NS_IMPL_EVENT_HANDLER(MobileConnection, datachange) diff --git a/dom/mobileconnection/src/MobileConnection.h b/dom/mobileconnection/src/MobileConnection.h index 72c5483e5b82..f1da857e0754 100644 --- a/dom/mobileconnection/src/MobileConnection.h +++ b/dom/mobileconnection/src/MobileConnection.h @@ -5,16 +5,16 @@ #ifndef mozilla_dom_network_MobileConnection_h #define mozilla_dom_network_MobileConnection_h +#include "mozilla/DOMEventTargetHelper.h" #include "nsIDOMMobileConnection.h" #include "nsIMobileConnectionProvider.h" -#include "nsDOMEventTargetHelper.h" #include "nsCycleCollectionParticipant.h" #include "nsWeakPtr.h" namespace mozilla { namespace dom { -class MobileConnection : public nsDOMEventTargetHelper +class MobileConnection : public DOMEventTargetHelper , public nsIDOMMozMobileConnection { /** @@ -32,7 +32,7 @@ public: NS_DECL_NSIDOMMOZMOBILECONNECTION NS_DECL_NSIMOBILECONNECTIONLISTENER - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) MobileConnection(uint32_t aClientId); @@ -40,7 +40,7 @@ public: void Shutdown(); NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MobileConnection, - nsDOMEventTargetHelper) + DOMEventTargetHelper) private: nsCOMPtr mProvider; diff --git a/dom/mobilemessage/src/MobileMessageManager.cpp b/dom/mobilemessage/src/MobileMessageManager.cpp index 8889dcd299ad..c330c72cd8ac 100644 --- a/dom/mobilemessage/src/MobileMessageManager.cpp +++ b/dom/mobilemessage/src/MobileMessageManager.cpp @@ -52,10 +52,10 @@ NS_INTERFACE_MAP_BEGIN(MobileMessageManager) NS_INTERFACE_MAP_ENTRY(nsIDOMMozMobileMessageManager) NS_INTERFACE_MAP_ENTRY(nsIObserver) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozMobileMessageManager) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(MobileMessageManager, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(MobileMessageManager, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(MobileMessageManager, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(MobileMessageManager, DOMEventTargetHelper) NS_IMPL_EVENT_HANDLER(MobileMessageManager, received) NS_IMPL_EVENT_HANDLER(MobileMessageManager, retrieving) diff --git a/dom/mobilemessage/src/MobileMessageManager.h b/dom/mobilemessage/src/MobileMessageManager.h index 16536d559e10..7d42097d1fe8 100644 --- a/dom/mobilemessage/src/MobileMessageManager.h +++ b/dom/mobilemessage/src/MobileMessageManager.h @@ -6,9 +6,9 @@ #ifndef mozilla_dom_mobilemessage_MobileMessageManager_h #define mozilla_dom_mobilemessage_MobileMessageManager_h +#include "mozilla/DOMEventTargetHelper.h" #include "nsIDOMMobileMessageManager.h" #include "nsIObserver.h" -#include "nsDOMEventTargetHelper.h" class nsIDOMMozSmsMessage; class nsIDOMMozMmsMessage; @@ -16,7 +16,7 @@ class nsIDOMMozMmsMessage; namespace mozilla { namespace dom { -class MobileMessageManager : public nsDOMEventTargetHelper +class MobileMessageManager : public DOMEventTargetHelper , public nsIDOMMozMobileMessageManager , public nsIObserver { @@ -25,7 +25,7 @@ public: NS_DECL_NSIOBSERVER NS_DECL_NSIDOMMOZMOBILEMESSAGEMANAGER - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) void Init(nsPIDOMWindow *aWindow); void Shutdown(); diff --git a/dom/network/src/Connection.cpp b/dom/network/src/Connection.cpp index e23f1ef91ab2..cc99834bcfb6 100644 --- a/dom/network/src/Connection.cpp +++ b/dom/network/src/Connection.cpp @@ -20,13 +20,13 @@ namespace mozilla { namespace dom { namespace network { -NS_IMPL_QUERY_INTERFACE_INHERITED1(Connection, nsDOMEventTargetHelper, +NS_IMPL_QUERY_INTERFACE_INHERITED1(Connection, DOMEventTargetHelper, nsINetworkProperties) // Don't use |Connection| alone, since that confuses nsTraceRefcnt since // we're not the only class with that name. -NS_IMPL_ADDREF_INHERITED(dom::network::Connection, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(dom::network::Connection, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(dom::network::Connection, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(dom::network::Connection, DOMEventTargetHelper) Connection::Connection() : mType(static_cast(kDefaultType)) diff --git a/dom/network/src/Connection.h b/dom/network/src/Connection.h index 4acb8f54dbcc..8b1898799eef 100644 --- a/dom/network/src/Connection.h +++ b/dom/network/src/Connection.h @@ -6,12 +6,12 @@ #ifndef mozilla_dom_network_Connection_h #define mozilla_dom_network_Connection_h -#include "nsINetworkProperties.h" -#include "nsDOMEventTargetHelper.h" -#include "nsCycleCollectionParticipant.h" -#include "mozilla/Observer.h" #include "Types.h" +#include "mozilla/DOMEventTargetHelper.h" +#include "mozilla/Observer.h" #include "mozilla/dom/NetworkInformationBinding.h" +#include "nsCycleCollectionParticipant.h" +#include "nsINetworkProperties.h" namespace mozilla { @@ -22,7 +22,7 @@ class NetworkInformation; namespace dom { namespace network { -class Connection MOZ_FINAL : public nsDOMEventTargetHelper +class Connection MOZ_FINAL : public DOMEventTargetHelper , public NetworkObserver , public nsINetworkProperties { @@ -30,7 +30,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSINETWORKPROPERTIES - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) Connection(); diff --git a/dom/speakermanager/SpeakerManager.cpp b/dom/speakermanager/SpeakerManager.cpp index 109202add122..e8ba56a4ac2b 100644 --- a/dom/speakermanager/SpeakerManager.cpp +++ b/dom/speakermanager/SpeakerManager.cpp @@ -12,12 +12,13 @@ #include "nsIDocShell.h" #include "AudioChannelService.h" -using namespace mozilla::dom; +namespace mozilla { +namespace dom { -NS_IMPL_QUERY_INTERFACE_INHERITED1(SpeakerManager, nsDOMEventTargetHelper, +NS_IMPL_QUERY_INTERFACE_INHERITED1(SpeakerManager, DOMEventTargetHelper, nsIDOMEventListener) -NS_IMPL_ADDREF_INHERITED(SpeakerManager, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(SpeakerManager, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(SpeakerManager, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(SpeakerManager, DOMEventTargetHelper) SpeakerManager::SpeakerManager() : mForcespeaker(false) @@ -219,3 +220,6 @@ SpeakerManager::SetAudioChannelActive(bool isActive) } } } + +} // namespace dom +} // namespace mozilla diff --git a/dom/speakermanager/SpeakerManager.h b/dom/speakermanager/SpeakerManager.h index 6838e9bd9cf2..d03dd30b3949 100644 --- a/dom/speakermanager/SpeakerManager.h +++ b/dom/speakermanager/SpeakerManager.h @@ -5,7 +5,7 @@ #ifndef mozilla_dom_SpeakerManager_h #define mozilla_dom_SpeakerManager_h -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/MozSpeakerManagerBinding.h" namespace mozilla { @@ -16,7 +16,7 @@ namespace dom { * The device's speaker status would set back to normal when UA close the application. */ class SpeakerManager MOZ_FINAL - : public nsDOMEventTargetHelper + : public DOMEventTargetHelper , public nsIDOMEventListener { friend class SpeakerManagerService; diff --git a/dom/src/notification/DesktopNotification.cpp b/dom/src/notification/DesktopNotification.cpp index 1a4d90ab46c2..de526fdcc8c9 100644 --- a/dom/src/notification/DesktopNotification.cpp +++ b/dom/src/notification/DesktopNotification.cpp @@ -138,7 +138,7 @@ DesktopNotification::DesktopNotification(const nsAString & title, const nsAString & iconURL, nsPIDOMWindow *aWindow, nsIPrincipal* principal) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mTitle(title) , mDescription(description) , mIconURL(iconURL) diff --git a/dom/src/notification/DesktopNotification.h b/dom/src/notification/DesktopNotification.h index 671cee3e23c1..2e42c2a6575a 100644 --- a/dom/src/notification/DesktopNotification.h +++ b/dom/src/notification/DesktopNotification.h @@ -16,11 +16,11 @@ #include "nsIDOMWindow.h" #include "nsIScriptObjectPrincipal.h" -#include "nsDOMEventTargetHelper.h" #include "nsIDOMEvent.h" #include "nsIDocument.h" #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/ErrorResult.h" #include "nsWrapperCache.h" @@ -84,7 +84,7 @@ private: class DesktopNotificationRequest; -class DesktopNotification MOZ_FINAL : public nsDOMEventTargetHelper +class DesktopNotification MOZ_FINAL : public DOMEventTargetHelper { friend class DesktopNotificationRequest; diff --git a/dom/src/notification/Notification.cpp b/dom/src/notification/Notification.cpp index 619ce1853ef7..5504e14ef8a5 100644 --- a/dom/src/notification/Notification.cpp +++ b/dom/src/notification/Notification.cpp @@ -419,7 +419,7 @@ Notification::Notification(const nsAString& aID, const nsAString& aTitle, const NotificationDirection aDir, const nsAString& aLang, const nsAString& aTag, const nsAString& aIconUrl, nsPIDOMWindow* aWindow) - : nsDOMEventTargetHelper(aWindow), + : DOMEventTargetHelper(aWindow), mID(aID), mTitle(aTitle), mBody(aBody), mDir(aDir), mLang(aLang), mTag(aTag), mIconUrl(aIconUrl), mIsClosed(false) { diff --git a/dom/src/notification/Notification.h b/dom/src/notification/Notification.h index e827dfedaa03..c923f6f148a8 100644 --- a/dom/src/notification/Notification.h +++ b/dom/src/notification/Notification.h @@ -5,9 +5,9 @@ #ifndef mozilla_dom_notification_h__ #define mozilla_dom_notification_h__ +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/NotificationBinding.h" -#include "nsDOMEventTargetHelper.h" #include "nsIObserver.h" #include "nsCycleCollectionParticipant.h" @@ -21,7 +21,7 @@ namespace dom { class NotificationObserver; class Promise; -class Notification : public nsDOMEventTargetHelper +class Notification : public DOMEventTargetHelper { friend class NotificationTask; friend class NotificationPermissionRequest; diff --git a/dom/src/offline/nsDOMOfflineResourceList.cpp b/dom/src/offline/nsDOMOfflineResourceList.cpp index 97dcfd391f96..660d759c7fbf 100644 --- a/dom/src/offline/nsDOMOfflineResourceList.cpp +++ b/dom/src/offline/nsDOMOfflineResourceList.cpp @@ -54,7 +54,7 @@ static const char kMaxEntriesPref[] = "offline.max_site_resources"; // NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsDOMOfflineResourceList, - nsDOMEventTargetHelper, + DOMEventTargetHelper, mCacheUpdate, mPendingEvents) @@ -63,10 +63,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDOMOfflineResourceList) NS_INTERFACE_MAP_ENTRY(nsIOfflineCacheUpdateObserver) NS_INTERFACE_MAP_ENTRY(nsIObserver) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(nsDOMOfflineResourceList, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(nsDOMOfflineResourceList, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(nsDOMOfflineResourceList, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(nsDOMOfflineResourceList, DOMEventTargetHelper) NS_IMPL_EVENT_HANDLER(nsDOMOfflineResourceList, checking) NS_IMPL_EVENT_HANDLER(nsDOMOfflineResourceList, error) @@ -80,7 +80,7 @@ NS_IMPL_EVENT_HANDLER(nsDOMOfflineResourceList, obsolete) nsDOMOfflineResourceList::nsDOMOfflineResourceList(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsPIDOMWindow *aWindow) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mInitialized(false) , mManifestURI(aManifestURI) , mDocumentURI(aDocumentURI) diff --git a/dom/src/offline/nsDOMOfflineResourceList.h b/dom/src/offline/nsDOMOfflineResourceList.h index 715ef7ac3b75..9502ee8fdadc 100644 --- a/dom/src/offline/nsDOMOfflineResourceList.h +++ b/dom/src/offline/nsDOMOfflineResourceList.h @@ -23,7 +23,7 @@ #include "nsIScriptContext.h" #include "nsCycleCollectionParticipant.h" #include "nsPIDOMWindow.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/ErrorResult.h" class nsIDOMWindow; @@ -34,7 +34,7 @@ class DOMStringList; } // namespace dom } // namespace mozilla -class nsDOMOfflineResourceList : public nsDOMEventTargetHelper, +class nsDOMOfflineResourceList : public mozilla::DOMEventTargetHelper, public nsIDOMOfflineResourceList, public nsIObserver, public nsIOfflineCacheUpdateObserver, @@ -49,7 +49,7 @@ public: NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMOfflineResourceList, - nsDOMEventTargetHelper) + mozilla::DOMEventTargetHelper) nsDOMOfflineResourceList(nsIURI* aManifestURI, nsIURI* aDocumentURI, diff --git a/dom/system/gonk/AudioChannelManager.cpp b/dom/system/gonk/AudioChannelManager.cpp index f350086118ee..e0b371c9896c 100644 --- a/dom/system/gonk/AudioChannelManager.cpp +++ b/dom/system/gonk/AudioChannelManager.cpp @@ -18,10 +18,10 @@ namespace mozilla { namespace dom { namespace system { -NS_IMPL_QUERY_INTERFACE_INHERITED1(AudioChannelManager, nsDOMEventTargetHelper, +NS_IMPL_QUERY_INTERFACE_INHERITED1(AudioChannelManager, DOMEventTargetHelper, nsIDOMEventListener) -NS_IMPL_ADDREF_INHERITED(AudioChannelManager, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(AudioChannelManager, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(AudioChannelManager, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(AudioChannelManager, DOMEventTargetHelper) AudioChannelManager::AudioChannelManager() : mState(SWITCH_STATE_UNKNOWN) diff --git a/dom/system/gonk/AudioChannelManager.h b/dom/system/gonk/AudioChannelManager.h index d833807906c0..3a7f3fc61d17 100644 --- a/dom/system/gonk/AudioChannelManager.h +++ b/dom/system/gonk/AudioChannelManager.h @@ -5,9 +5,9 @@ #ifndef mozilla_dom_system_AudioChannelManager_h #define mozilla_dom_system_AudioChannelManager_h +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/Hal.h" #include "mozilla/HalTypes.h" -#include "nsDOMEventTargetHelper.h" #include "AudioChannelService.h" namespace mozilla { @@ -20,7 +20,7 @@ namespace dom { namespace system { class AudioChannelManager MOZ_FINAL - : public nsDOMEventTargetHelper + : public DOMEventTargetHelper , public hal::SwitchObserver , public nsIDOMEventListener { diff --git a/dom/telephony/Telephony.cpp b/dom/telephony/Telephony.cpp index 0ce924d4e2df..162692cb3cb8 100644 --- a/dom/telephony/Telephony.cpp +++ b/dom/telephony/Telephony.cpp @@ -119,7 +119,7 @@ public: }; Telephony::Telephony(nsPIDOMWindow* aOwner) - : nsDOMEventTargetHelper(aOwner), mActiveCall(nullptr), mEnumerated(false) + : DOMEventTargetHelper(aOwner), mActiveCall(nullptr), mEnumerated(false) { if (!gTelephonyList) { gTelephonyList = new TelephonyList(); @@ -381,14 +381,14 @@ Telephony::GetCallFromEverywhere(uint32_t aServiceId, uint32_t aCallIndex) NS_IMPL_CYCLE_COLLECTION_CLASS(Telephony) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(Telephony, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCalls) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCallsList) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGroup) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(Telephony, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->Shutdown(); tmp->mActiveCall = nullptr; NS_IMPL_CYCLE_COLLECTION_UNLINK(mCalls) @@ -397,10 +397,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(Telephony, NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(Telephony) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(Telephony, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(Telephony, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(Telephony, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(Telephony, DOMEventTargetHelper) NS_IMPL_ISUPPORTS1(Telephony::Listener, nsITelephonyListener) NS_IMPL_ISUPPORTS1(Telephony::Callback, nsITelephonyCallback) diff --git a/dom/telephony/Telephony.h b/dom/telephony/Telephony.h index f0dcf70f31fc..07a57bffa772 100644 --- a/dom/telephony/Telephony.h +++ b/dom/telephony/Telephony.h @@ -24,7 +24,7 @@ namespace dom { class OwningTelephonyCallOrTelephonyCallGroup; -class Telephony MOZ_FINAL : public nsDOMEventTargetHelper +class Telephony MOZ_FINAL : public DOMEventTargetHelper { /** * Class Telephony doesn't actually inherit nsITelephonyListener. @@ -55,9 +55,9 @@ class Telephony MOZ_FINAL : public nsDOMEventTargetHelper public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSITELEPHONYLISTENER - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(Telephony, - nsDOMEventTargetHelper) + DOMEventTargetHelper) nsPIDOMWindow* GetParentObject() const diff --git a/dom/telephony/TelephonyCall.cpp b/dom/telephony/TelephonyCall.cpp index 3b3266d64a12..72bc21ecafff 100644 --- a/dom/telephony/TelephonyCall.cpp +++ b/dom/telephony/TelephonyCall.cpp @@ -46,7 +46,7 @@ TelephonyCall::Create(Telephony* aTelephony, uint32_t aServiceId, } TelephonyCall::TelephonyCall(nsPIDOMWindow* aOwner) - : nsDOMEventTargetHelper(aOwner), + : DOMEventTargetHelper(aOwner), mCallIndex(kOutgoingPlaceholderCallIndex), mCallState(nsITelephonyProvider::CALL_STATE_UNKNOWN), mLive(false) @@ -181,16 +181,16 @@ TelephonyCall::ChangeGroup(TelephonyCallGroup* aGroup) } NS_IMPL_CYCLE_COLLECTION_INHERITED_3(TelephonyCall, - nsDOMEventTargetHelper, + DOMEventTargetHelper, mTelephony, mError, mGroup); NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TelephonyCall) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(TelephonyCall, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(TelephonyCall, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(TelephonyCall, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(TelephonyCall, DOMEventTargetHelper) // TelephonyCall WebIDL diff --git a/dom/telephony/TelephonyCall.h b/dom/telephony/TelephonyCall.h index 1c589c4ed514..1d7a52bba78b 100644 --- a/dom/telephony/TelephonyCall.h +++ b/dom/telephony/TelephonyCall.h @@ -16,7 +16,7 @@ class nsPIDOMWindow; namespace mozilla { namespace dom { -class TelephonyCall MOZ_FINAL : public nsDOMEventTargetHelper +class TelephonyCall MOZ_FINAL : public DOMEventTargetHelper { nsRefPtr mTelephony; nsRefPtr mGroup; @@ -36,9 +36,9 @@ class TelephonyCall MOZ_FINAL : public nsDOMEventTargetHelper public: NS_DECL_ISUPPORTS_INHERITED - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TelephonyCall, - nsDOMEventTargetHelper) + DOMEventTargetHelper) friend class Telephony; diff --git a/dom/telephony/TelephonyCallGroup.cpp b/dom/telephony/TelephonyCallGroup.cpp index 445ec36cbdf0..a213486f9441 100644 --- a/dom/telephony/TelephonyCallGroup.cpp +++ b/dom/telephony/TelephonyCallGroup.cpp @@ -16,7 +16,7 @@ using namespace mozilla::dom; using mozilla::ErrorResult; TelephonyCallGroup::TelephonyCallGroup(nsPIDOMWindow* aOwner) - : nsDOMEventTargetHelper(aOwner) + : DOMEventTargetHelper(aOwner) , mCallState(nsITelephonyProvider::CALL_STATE_UNKNOWN) { } @@ -199,24 +199,24 @@ TelephonyCallGroup::GetCall(uint32_t aServiceId, uint32_t aCallIndex) NS_IMPL_CYCLE_COLLECTION_CLASS(TelephonyCallGroup) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(TelephonyCallGroup, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCalls) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCallsList) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(TelephonyCallGroup, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK(mCalls) NS_IMPL_CYCLE_COLLECTION_UNLINK(mCallsList) NS_IMPL_CYCLE_COLLECTION_UNLINK(mTelephony) NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TelephonyCallGroup) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) -NS_IMPL_ADDREF_INHERITED(TelephonyCallGroup, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(TelephonyCallGroup, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(TelephonyCallGroup, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(TelephonyCallGroup, DOMEventTargetHelper) // WebIDL already_AddRefed diff --git a/dom/telephony/TelephonyCallGroup.h b/dom/telephony/TelephonyCallGroup.h index 802d87d0407b..e937c0cfb472 100644 --- a/dom/telephony/TelephonyCallGroup.h +++ b/dom/telephony/TelephonyCallGroup.h @@ -12,7 +12,7 @@ namespace mozilla { namespace dom { -class TelephonyCallGroup MOZ_FINAL : public nsDOMEventTargetHelper +class TelephonyCallGroup MOZ_FINAL : public DOMEventTargetHelper { nsRefPtr mTelephony; @@ -27,7 +27,7 @@ class TelephonyCallGroup MOZ_FINAL : public nsDOMEventTargetHelper public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TelephonyCallGroup, - nsDOMEventTargetHelper) + DOMEventTargetHelper) nsPIDOMWindow* GetParentObject() const diff --git a/dom/telephony/TelephonyCommon.h b/dom/telephony/TelephonyCommon.h index f2bc34311d41..b55f6ce75be7 100644 --- a/dom/telephony/TelephonyCommon.h +++ b/dom/telephony/TelephonyCommon.h @@ -8,12 +8,12 @@ #define mozilla_dom_telephony_telephonycommon_h__ #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/ErrorResult.h" #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" #include "nsDebug.h" -#include "nsDOMEventTargetHelper.h" #include "nsString.h" #include "nsTArray.h" diff --git a/dom/voicemail/Voicemail.cpp b/dom/voicemail/Voicemail.cpp index 2b5c3bfec878..248afa03ad11 100644 --- a/dom/voicemail/Voicemail.cpp +++ b/dom/voicemail/Voicemail.cpp @@ -46,7 +46,7 @@ NS_IMPL_ISUPPORTS1(Voicemail::Listener, nsIVoicemailListener) Voicemail::Voicemail(nsPIDOMWindow* aWindow, nsIVoicemailProvider* aProvider) - : nsDOMEventTargetHelper(aWindow) + : DOMEventTargetHelper(aWindow) , mProvider(aProvider) { mListener = new Listener(this); diff --git a/dom/voicemail/Voicemail.h b/dom/voicemail/Voicemail.h index 6eb77dcf9ae0..a0c8792fa933 100644 --- a/dom/voicemail/Voicemail.h +++ b/dom/voicemail/Voicemail.h @@ -8,8 +8,8 @@ #define mozilla_dom_voicemail_voicemail_h__ #include "mozilla/Attributes.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/ErrorResult.h" -#include "nsDOMEventTargetHelper.h" #include "nsIVoicemailProvider.h" class JSObject; @@ -21,7 +21,7 @@ class nsIDOMMozVoicemailStatus; namespace mozilla { namespace dom { -class Voicemail MOZ_FINAL : public nsDOMEventTargetHelper +class Voicemail MOZ_FINAL : public DOMEventTargetHelper { /** * Class Voicemail doesn't actually inherit nsIVoicemailListener. Instead, it @@ -35,7 +35,7 @@ class Voicemail MOZ_FINAL : public nsDOMEventTargetHelper public: NS_DECL_NSIVOICEMAILLISTENER - NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper) + NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper) Voicemail(nsPIDOMWindow* aWindow, nsIVoicemailProvider* aProvider); diff --git a/dom/workers/MessagePort.cpp b/dom/workers/MessagePort.cpp index 0275295e156e..d2215194133f 100644 --- a/dom/workers/MessagePort.cpp +++ b/dom/workers/MessagePort.cpp @@ -217,22 +217,22 @@ MessagePort::AssertCorrectThread() const } #endif -NS_IMPL_ADDREF_INHERITED(MessagePort, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(MessagePort, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(MessagePort, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(MessagePort, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(MessagePort) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_CLASS(MessagePort) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MessagePort, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSharedWorker) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mQueuedEvents) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MessagePort, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->Close(); NS_IMPL_CYCLE_COLLECTION_UNLINK_END @@ -271,7 +271,7 @@ MessagePort::PreHandleEvent(EventChainPreVisitor& aVisitor) } } - return nsDOMEventTargetHelper::PreHandleEvent(aVisitor); + return DOMEventTargetHelper::PreHandleEvent(aVisitor); } bool diff --git a/dom/workers/MessagePort.h b/dom/workers/MessagePort.h index ffab0a486524..5a6d2b92f3f5 100644 --- a/dom/workers/MessagePort.h +++ b/dom/workers/MessagePort.h @@ -8,7 +8,7 @@ #include "Workers.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/BindingDeclarations.h" #include "mozilla/dom/MessagePort.h" @@ -62,7 +62,7 @@ public: QueueEvent(nsIDOMEvent* aEvent); NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MessagePort, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MessagePort, DOMEventTargetHelper) virtual EventHandlerNonNull* GetOnmessage() MOZ_OVERRIDE; diff --git a/dom/workers/SharedWorker.cpp b/dom/workers/SharedWorker.cpp index edf15b1baefb..5a81706b148a 100644 --- a/dom/workers/SharedWorker.cpp +++ b/dom/workers/SharedWorker.cpp @@ -26,7 +26,7 @@ USING_WORKERS_NAMESPACE SharedWorker::SharedWorker(nsPIDOMWindow* aWindow, WorkerPrivate* aWorkerPrivate) -: nsDOMEventTargetHelper(aWindow), mWorkerPrivate(aWorkerPrivate), +: DOMEventTargetHelper(aWindow), mWorkerPrivate(aWorkerPrivate), mSuspended(false) { AssertIsOnMainThread(); @@ -169,22 +169,22 @@ SharedWorker::NoteDeadWorker(JSContext* aCx) mWorkerPrivate = nullptr; } -NS_IMPL_ADDREF_INHERITED(SharedWorker, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(SharedWorker, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(SharedWorker, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(SharedWorker, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SharedWorker) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_CLASS(SharedWorker) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SharedWorker, - nsDOMEventTargetHelper) + DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMessagePort) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSuspendedEvents) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(SharedWorker, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->Close(); NS_IMPL_CYCLE_COLLECTION_UNLINK(mMessagePort) NS_IMPL_CYCLE_COLLECTION_UNLINK(mSuspendedEvents) @@ -213,5 +213,5 @@ SharedWorker::PreHandleEvent(EventChainPreVisitor& aVisitor) return NS_OK; } - return nsDOMEventTargetHelper::PreHandleEvent(aVisitor); + return DOMEventTargetHelper::PreHandleEvent(aVisitor); } diff --git a/dom/workers/SharedWorker.h b/dom/workers/SharedWorker.h index ee49d8e31455..92d831f29494 100644 --- a/dom/workers/SharedWorker.h +++ b/dom/workers/SharedWorker.h @@ -10,7 +10,7 @@ #include "mozilla/dom/BindingDeclarations.h" #include "mozilla/dom/workers/bindings/MessagePort.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" class nsIDOMEvent; class nsPIDOMWindow; @@ -25,7 +25,7 @@ class MessagePort; class RuntimeService; class WorkerPrivate; -class SharedWorker MOZ_FINAL : public nsDOMEventTargetHelper +class SharedWorker MOZ_FINAL : public DOMEventTargetHelper { friend class MessagePort; friend class RuntimeService; @@ -73,7 +73,7 @@ public: Close(); NS_DECL_ISUPPORTS_INHERITED - NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SharedWorker, nsDOMEventTargetHelper) + NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SharedWorker, DOMEventTargetHelper) IMPL_EVENT_HANDLER(error) diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 749a6b452510..1e81834e3ee2 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -967,7 +967,7 @@ public: bool DispatchDOMEvent(JSContext* aCx, WorkerPrivate* aWorkerPrivate, - nsDOMEventTargetHelper* aTarget, bool aIsMainThread) + DOMEventTargetHelper* aTarget, bool aIsMainThread) { // Release reference to objects that were AddRef'd for // cloning into worker when array goes out of scope. @@ -3460,18 +3460,18 @@ WorkerPrivateParent::StealHostObjectURIs(nsTArray& aArray) } template -NS_IMPL_ADDREF_INHERITED(WorkerPrivateParent, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(WorkerPrivateParent, DOMEventTargetHelper) template -NS_IMPL_RELEASE_INHERITED(WorkerPrivateParent, nsDOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(WorkerPrivateParent, DOMEventTargetHelper) template NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(WorkerPrivateParent) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) template NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WorkerPrivateParent, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->AssertIsOnParentThread(); // The WorkerPrivate::mSelfRef has a reference to itself, which is really @@ -3492,13 +3492,13 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END template NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WorkerPrivateParent, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->Terminate(nullptr); NS_IMPL_CYCLE_COLLECTION_UNLINK_END template NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WorkerPrivateParent, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->AssertIsOnParentThread(); NS_IMPL_CYCLE_COLLECTION_TRACE_END diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h index 4ac11fb88b4c..26bf0e50ba49 100644 --- a/dom/workers/WorkerPrivate.h +++ b/dom/workers/WorkerPrivate.h @@ -12,11 +12,11 @@ #include "nsPIDOMWindow.h" #include "mozilla/CondVar.h" +#include "mozilla/DOMEventTargetHelper.h" #include "mozilla/TimeStamp.h" #include "mozilla/dom/BindingDeclarations.h" #include "nsCycleCollectionParticipant.h" #include "nsDataHashtable.h" -#include "nsDOMEventTargetHelper.h" #include "nsHashKeys.h" #include "nsRefPtrHashtable.h" #include "nsString.h" @@ -112,7 +112,7 @@ public: }; template -class WorkerPrivateParent : public nsDOMEventTargetHelper +class WorkerPrivateParent : public DOMEventTargetHelper { class SynchronizeAndResumeRunnable; @@ -289,7 +289,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(WorkerPrivateParent, - nsDOMEventTargetHelper) + DOMEventTargetHelper) void ClearSelfRef() diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index 824a34087ad3..1bc4045c79b8 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -28,6 +28,7 @@ UnwrapObject(obj, value) +using namespace mozilla; using namespace mozilla::dom; USING_WORKERS_NAMESPACE @@ -49,28 +50,28 @@ WorkerGlobalScope::~WorkerGlobalScope() NS_IMPL_CYCLE_COLLECTION_CLASS(WorkerGlobalScope) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WorkerGlobalScope, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->mWorkerPrivate->AssertIsOnWorkerThread(); NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WorkerGlobalScope, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->mWorkerPrivate->AssertIsOnWorkerThread(); NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WorkerGlobalScope, - nsDOMEventTargetHelper) + DOMEventTargetHelper) tmp->mWorkerPrivate->AssertIsOnWorkerThread(); tmp->mWorkerPrivate->TraceTimeouts(aCallbacks, aClosure); NS_IMPL_CYCLE_COLLECTION_TRACE_END -NS_IMPL_ADDREF_INHERITED(WorkerGlobalScope, nsDOMEventTargetHelper) -NS_IMPL_RELEASE_INHERITED(WorkerGlobalScope, nsDOMEventTargetHelper) +NS_IMPL_ADDREF_INHERITED(WorkerGlobalScope, DOMEventTargetHelper) +NS_IMPL_RELEASE_INHERITED(WorkerGlobalScope, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WorkerGlobalScope) NS_INTERFACE_MAP_ENTRY(nsIGlobalObject) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) +NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) JSObject* WorkerGlobalScope::WrapObject(JSContext* aCx, JS::Handle aScope) diff --git a/dom/workers/WorkerScope.h b/dom/workers/WorkerScope.h index 1139e413e505..0bd4c053362a 100644 --- a/dom/workers/WorkerScope.h +++ b/dom/workers/WorkerScope.h @@ -7,7 +7,7 @@ #define mozilla_dom_workerscope_h__ #include "Workers.h" -#include "nsDOMEventTargetHelper.h" +#include "mozilla/DOMEventTargetHelper.h" namespace mozilla { namespace dom { @@ -24,7 +24,7 @@ class WorkerPrivate; class WorkerLocation; class WorkerNavigator; -class WorkerGlobalScope : public nsDOMEventTargetHelper, +class WorkerGlobalScope : public DOMEventTargetHelper, public nsIGlobalObject { nsRefPtr mConsole; @@ -52,7 +52,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(WorkerGlobalScope, - nsDOMEventTargetHelper) + DOMEventTargetHelper) already_AddRefed Self()