Bug 975688 part.24 Rename nsDOMNotifyPaintEvent to mozilla::dom::NotifyPaintEvent r=smaug

--HG--
rename : dom/events/nsDOMNotifyPaintEvent.cpp => dom/events/NotifyPaintEvent.cpp
rename : dom/events/nsDOMNotifyPaintEvent.h => dom/events/NotifyPaintEvent.h
This commit is contained in:
Masayuki Nakano 2014-02-28 23:58:43 +09:00
Родитель 1546c00e9d
Коммит beb0ea2022
5 изменённых файлов: 55 добавлений и 54 удалений

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

@ -828,10 +828,6 @@ DOMInterfaces = {
'resultNotAddRefed': [ 'item' ]
},
'NotifyPaintEvent': {
'nativeType': 'nsDOMNotifyPaintEvent',
},
'OfflineAudioCompletionEvent': {
'resultNotAddRefed': [ 'renderedBuffer' ],
},

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

@ -5,16 +5,16 @@
#include "base/basictypes.h"
#include "ipc/IPCMessageUtils.h"
#include "mozilla/dom/DOMRect.h"
#include "mozilla/dom/NotifyPaintEvent.h"
#include "mozilla/GfxMessageUtils.h"
#include "nsDOMNotifyPaintEvent.h"
#include "nsContentUtils.h"
#include "nsPaintRequest.h"
#include "mozilla/dom/DOMRect.h"
using namespace mozilla;
using namespace mozilla::dom;
namespace mozilla {
namespace dom {
nsDOMNotifyPaintEvent::nsDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
NotifyPaintEvent::NotifyPaintEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
WidgetEvent* aEvent,
uint32_t aEventType,
@ -29,15 +29,15 @@ nsDOMNotifyPaintEvent::nsDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
}
}
NS_INTERFACE_MAP_BEGIN(nsDOMNotifyPaintEvent)
NS_INTERFACE_MAP_BEGIN(NotifyPaintEvent)
NS_INTERFACE_MAP_ENTRY(nsIDOMNotifyPaintEvent)
NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent)
NS_IMPL_ADDREF_INHERITED(nsDOMNotifyPaintEvent, nsDOMEvent)
NS_IMPL_RELEASE_INHERITED(nsDOMNotifyPaintEvent, nsDOMEvent)
NS_IMPL_ADDREF_INHERITED(NotifyPaintEvent, nsDOMEvent)
NS_IMPL_RELEASE_INHERITED(NotifyPaintEvent, nsDOMEvent)
nsRegion
nsDOMNotifyPaintEvent::GetRegion()
NotifyPaintEvent::GetRegion()
{
nsRegion r;
if (!nsContentUtils::IsCallerChrome()) {
@ -51,14 +51,14 @@ nsDOMNotifyPaintEvent::GetRegion()
}
NS_IMETHODIMP
nsDOMNotifyPaintEvent::GetBoundingClientRect(nsIDOMClientRect** aResult)
NotifyPaintEvent::GetBoundingClientRect(nsIDOMClientRect** aResult)
{
*aResult = BoundingClientRect().get();
return NS_OK;
}
already_AddRefed<DOMRect>
nsDOMNotifyPaintEvent::BoundingClientRect()
NotifyPaintEvent::BoundingClientRect()
{
nsRefPtr<DOMRect> rect = new DOMRect(ToSupports(this));
@ -70,14 +70,14 @@ nsDOMNotifyPaintEvent::BoundingClientRect()
}
NS_IMETHODIMP
nsDOMNotifyPaintEvent::GetClientRects(nsIDOMClientRectList** aResult)
NotifyPaintEvent::GetClientRects(nsIDOMClientRectList** aResult)
{
*aResult = ClientRects().get();
return NS_OK;
}
already_AddRefed<DOMRectList>
nsDOMNotifyPaintEvent::ClientRects()
NotifyPaintEvent::ClientRects()
{
nsISupports* parent = ToSupports(this);
nsRefPtr<DOMRectList> rectList = new DOMRectList(parent);
@ -95,7 +95,7 @@ nsDOMNotifyPaintEvent::ClientRects()
}
NS_IMETHODIMP
nsDOMNotifyPaintEvent::GetPaintRequests(nsISupports** aResult)
NotifyPaintEvent::GetPaintRequests(nsISupports** aResult)
{
nsRefPtr<nsPaintRequestList> requests = PaintRequests();
requests.forget(aResult);
@ -103,7 +103,7 @@ nsDOMNotifyPaintEvent::GetPaintRequests(nsISupports** aResult)
}
already_AddRefed<nsPaintRequestList>
nsDOMNotifyPaintEvent::PaintRequests()
NotifyPaintEvent::PaintRequests()
{
nsDOMEvent* parent = this;
nsRefPtr<nsPaintRequestList> requests = new nsPaintRequestList(parent);
@ -120,7 +120,7 @@ nsDOMNotifyPaintEvent::PaintRequests()
}
NS_IMETHODIMP_(void)
nsDOMNotifyPaintEvent::Serialize(IPC::Message* aMsg,
NotifyPaintEvent::Serialize(IPC::Message* aMsg,
bool aSerializeInterfaceType)
{
if (aSerializeInterfaceType) {
@ -138,7 +138,7 @@ nsDOMNotifyPaintEvent::Serialize(IPC::Message* aMsg,
}
NS_IMETHODIMP_(bool)
nsDOMNotifyPaintEvent::Deserialize(const IPC::Message* aMsg, void** aIter)
NotifyPaintEvent::Deserialize(const IPC::Message* aMsg, void** aIter)
{
NS_ENSURE_TRUE(nsDOMEvent::Deserialize(aMsg, aIter), false);
@ -155,16 +155,21 @@ nsDOMNotifyPaintEvent::Deserialize(const IPC::Message* aMsg, void** aIter)
return true;
}
nsresult NS_NewDOMNotifyPaintEvent(nsIDOMEvent** aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,
} // namespace dom
} // namespace mozilla
using namespace mozilla;
using namespace mozilla::dom;
nsresult
NS_NewDOMNotifyPaintEvent(nsIDOMEvent** aInstancePtrResult,
EventTarget* aOwner,
nsPresContext* aPresContext,
WidgetEvent* aEvent,
uint32_t aEventType,
nsInvalidateRequestList* aInvalidateRequests)
{
nsDOMNotifyPaintEvent* it =
new nsDOMNotifyPaintEvent(aOwner, aPresContext, aEvent, aEventType,
aInvalidateRequests);
NotifyPaintEvent* it = new NotifyPaintEvent(aOwner, aPresContext, aEvent,
aEventType, aInvalidateRequests);
return CallQueryInterface(it, aInstancePtrResult);
}

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

@ -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 nsDOMNotifyPaintEvent_h_
#define nsDOMNotifyPaintEvent_h_
#ifndef mozilla_dom_NotifyPaintEvent_h_
#define mozilla_dom_NotifyPaintEvent_h_
#include "mozilla/Attributes.h"
#include "nsIDOMNotifyPaintEvent.h"
@ -16,21 +16,18 @@ class nsPaintRequestList;
namespace mozilla {
namespace dom {
class DOMRect;
class DOMRectList;
}
}
class nsDOMNotifyPaintEvent : public nsDOMEvent,
class NotifyPaintEvent : public nsDOMEvent,
public nsIDOMNotifyPaintEvent
{
typedef mozilla::dom::DOMRect DOMRect;
typedef mozilla::dom::DOMRectList DOMRectList;
public:
nsDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
NotifyPaintEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
mozilla::WidgetEvent* aEvent,
WidgetEvent* aEvent,
uint32_t aEventType,
nsInvalidateRequestList* aInvalidateRequests);
@ -50,7 +47,7 @@ public:
virtual JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
{
return mozilla::dom::NotifyPaintEventBinding::Wrap(aCx, aScope, this);
return NotifyPaintEventBinding::Wrap(aCx, aScope, this);
}
already_AddRefed<DOMRectList> ClientRects();
@ -64,4 +61,7 @@ private:
nsTArray<nsInvalidateRequestList::Request> mInvalidateRequests;
};
#endif // nsDOMNotifyPaintEvent_h_
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_NotifyPaintEvent_h_

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

@ -52,6 +52,7 @@ EXPORTS.mozilla.dom += [
'MouseScrollEvent.h',
'MutationEvent.h',
'NotifyAudioAvailableEvent.h',
'NotifyPaintEvent.h',
'PointerEvent.h',
'SimpleGestureEvent.h',
'Touch.h',
@ -105,10 +106,10 @@ UNIFIED_SOURCES += [
SOURCES += [
# nsDOMEvent.cpp should be built separately because it includes
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
'nsDOMEvent.cpp',
'NotifyPaintEvent.cpp',
# nsDOMEvent.cpp should be built separately because it includes
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
'nsDOMNotifyPaintEvent.cpp',
'nsDOMEvent.cpp',
# nsDOMEvent.cpp should be built separately because it includes
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
'nsDOMScrollAreaEvent.cpp',

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

@ -19,7 +19,6 @@
#include "nsIGeolocationProvider.h"
#include "nsCacheService.h"
#include "nsIDOMEventListener.h"
#include "nsDOMNotifyPaintEvent.h"
#include "nsIDOMClientRectList.h"
#include "nsIDOMClientRect.h"
#include "nsIDOMWakeLockListener.h"