mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
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:
parent
1546c00e9d
commit
beb0ea2022
@ -828,10 +828,6 @@ DOMInterfaces = {
|
||||
'resultNotAddRefed': [ 'item' ]
|
||||
},
|
||||
|
||||
'NotifyPaintEvent': {
|
||||
'nativeType': 'nsDOMNotifyPaintEvent',
|
||||
},
|
||||
|
||||
'OfflineAudioCompletionEvent': {
|
||||
'resultNotAddRefed': [ 'renderedBuffer' ],
|
||||
},
|
||||
|
@ -5,20 +5,20 @@
|
||||
|
||||
#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,
|
||||
nsPresContext* aPresContext,
|
||||
WidgetEvent* aEvent,
|
||||
uint32_t aEventType,
|
||||
nsInvalidateRequestList* aInvalidateRequests)
|
||||
NotifyPaintEvent::NotifyPaintEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
WidgetEvent* aEvent,
|
||||
uint32_t aEventType,
|
||||
nsInvalidateRequestList* aInvalidateRequests)
|
||||
: nsDOMEvent(aOwner, aPresContext, aEvent)
|
||||
{
|
||||
if (mEvent) {
|
||||
@ -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,8 +120,8 @@ nsDOMNotifyPaintEvent::PaintRequests()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
nsDOMNotifyPaintEvent::Serialize(IPC::Message* aMsg,
|
||||
bool aSerializeInterfaceType)
|
||||
NotifyPaintEvent::Serialize(IPC::Message* aMsg,
|
||||
bool aSerializeInterfaceType)
|
||||
{
|
||||
if (aSerializeInterfaceType) {
|
||||
IPC::WriteParam(aMsg, NS_LITERAL_STRING("notifypaintevent"));
|
||||
@ -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,
|
||||
nsPresContext* aPresContext,
|
||||
WidgetEvent* aEvent,
|
||||
uint32_t aEventType,
|
||||
nsInvalidateRequestList* aInvalidateRequests)
|
||||
{
|
||||
nsDOMNotifyPaintEvent* it =
|
||||
new nsDOMNotifyPaintEvent(aOwner, aPresContext, aEvent, aEventType,
|
||||
aInvalidateRequests);
|
||||
} // 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)
|
||||
{
|
||||
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,23 +16,20 @@ class nsPaintRequestList;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class DOMRect;
|
||||
class DOMRectList;
|
||||
}
|
||||
}
|
||||
|
||||
class nsDOMNotifyPaintEvent : public nsDOMEvent,
|
||||
public nsIDOMNotifyPaintEvent
|
||||
class NotifyPaintEvent : public nsDOMEvent,
|
||||
public nsIDOMNotifyPaintEvent
|
||||
{
|
||||
typedef mozilla::dom::DOMRect DOMRect;
|
||||
typedef mozilla::dom::DOMRectList DOMRectList;
|
||||
|
||||
public:
|
||||
nsDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
mozilla::WidgetEvent* aEvent,
|
||||
uint32_t aEventType,
|
||||
nsInvalidateRequestList* aInvalidateRequests);
|
||||
NotifyPaintEvent(EventTarget* aOwner,
|
||||
nsPresContext* aPresContext,
|
||||
WidgetEvent* aEvent,
|
||||
uint32_t aEventType,
|
||||
nsInvalidateRequestList* aInvalidateRequests);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user