зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1546c00e9d
Коммит
beb0ea2022
|
@ -828,10 +828,6 @@ DOMInterfaces = {
|
||||||
'resultNotAddRefed': [ 'item' ]
|
'resultNotAddRefed': [ 'item' ]
|
||||||
},
|
},
|
||||||
|
|
||||||
'NotifyPaintEvent': {
|
|
||||||
'nativeType': 'nsDOMNotifyPaintEvent',
|
|
||||||
},
|
|
||||||
|
|
||||||
'OfflineAudioCompletionEvent': {
|
'OfflineAudioCompletionEvent': {
|
||||||
'resultNotAddRefed': [ 'renderedBuffer' ],
|
'resultNotAddRefed': [ 'renderedBuffer' ],
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,16 @@
|
||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
#include "ipc/IPCMessageUtils.h"
|
#include "ipc/IPCMessageUtils.h"
|
||||||
|
#include "mozilla/dom/DOMRect.h"
|
||||||
|
#include "mozilla/dom/NotifyPaintEvent.h"
|
||||||
#include "mozilla/GfxMessageUtils.h"
|
#include "mozilla/GfxMessageUtils.h"
|
||||||
#include "nsDOMNotifyPaintEvent.h"
|
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsPaintRequest.h"
|
#include "nsPaintRequest.h"
|
||||||
#include "mozilla/dom/DOMRect.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
namespace mozilla {
|
||||||
using namespace mozilla::dom;
|
namespace dom {
|
||||||
|
|
||||||
nsDOMNotifyPaintEvent::nsDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
|
NotifyPaintEvent::NotifyPaintEvent(EventTarget* aOwner,
|
||||||
nsPresContext* aPresContext,
|
nsPresContext* aPresContext,
|
||||||
WidgetEvent* aEvent,
|
WidgetEvent* aEvent,
|
||||||
uint32_t aEventType,
|
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_ENTRY(nsIDOMNotifyPaintEvent)
|
||||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent)
|
NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent)
|
||||||
|
|
||||||
NS_IMPL_ADDREF_INHERITED(nsDOMNotifyPaintEvent, nsDOMEvent)
|
NS_IMPL_ADDREF_INHERITED(NotifyPaintEvent, nsDOMEvent)
|
||||||
NS_IMPL_RELEASE_INHERITED(nsDOMNotifyPaintEvent, nsDOMEvent)
|
NS_IMPL_RELEASE_INHERITED(NotifyPaintEvent, nsDOMEvent)
|
||||||
|
|
||||||
nsRegion
|
nsRegion
|
||||||
nsDOMNotifyPaintEvent::GetRegion()
|
NotifyPaintEvent::GetRegion()
|
||||||
{
|
{
|
||||||
nsRegion r;
|
nsRegion r;
|
||||||
if (!nsContentUtils::IsCallerChrome()) {
|
if (!nsContentUtils::IsCallerChrome()) {
|
||||||
|
@ -51,14 +51,14 @@ nsDOMNotifyPaintEvent::GetRegion()
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMNotifyPaintEvent::GetBoundingClientRect(nsIDOMClientRect** aResult)
|
NotifyPaintEvent::GetBoundingClientRect(nsIDOMClientRect** aResult)
|
||||||
{
|
{
|
||||||
*aResult = BoundingClientRect().get();
|
*aResult = BoundingClientRect().get();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<DOMRect>
|
already_AddRefed<DOMRect>
|
||||||
nsDOMNotifyPaintEvent::BoundingClientRect()
|
NotifyPaintEvent::BoundingClientRect()
|
||||||
{
|
{
|
||||||
nsRefPtr<DOMRect> rect = new DOMRect(ToSupports(this));
|
nsRefPtr<DOMRect> rect = new DOMRect(ToSupports(this));
|
||||||
|
|
||||||
|
@ -70,14 +70,14 @@ nsDOMNotifyPaintEvent::BoundingClientRect()
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMNotifyPaintEvent::GetClientRects(nsIDOMClientRectList** aResult)
|
NotifyPaintEvent::GetClientRects(nsIDOMClientRectList** aResult)
|
||||||
{
|
{
|
||||||
*aResult = ClientRects().get();
|
*aResult = ClientRects().get();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<DOMRectList>
|
already_AddRefed<DOMRectList>
|
||||||
nsDOMNotifyPaintEvent::ClientRects()
|
NotifyPaintEvent::ClientRects()
|
||||||
{
|
{
|
||||||
nsISupports* parent = ToSupports(this);
|
nsISupports* parent = ToSupports(this);
|
||||||
nsRefPtr<DOMRectList> rectList = new DOMRectList(parent);
|
nsRefPtr<DOMRectList> rectList = new DOMRectList(parent);
|
||||||
|
@ -95,7 +95,7 @@ nsDOMNotifyPaintEvent::ClientRects()
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMNotifyPaintEvent::GetPaintRequests(nsISupports** aResult)
|
NotifyPaintEvent::GetPaintRequests(nsISupports** aResult)
|
||||||
{
|
{
|
||||||
nsRefPtr<nsPaintRequestList> requests = PaintRequests();
|
nsRefPtr<nsPaintRequestList> requests = PaintRequests();
|
||||||
requests.forget(aResult);
|
requests.forget(aResult);
|
||||||
|
@ -103,7 +103,7 @@ nsDOMNotifyPaintEvent::GetPaintRequests(nsISupports** aResult)
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsPaintRequestList>
|
already_AddRefed<nsPaintRequestList>
|
||||||
nsDOMNotifyPaintEvent::PaintRequests()
|
NotifyPaintEvent::PaintRequests()
|
||||||
{
|
{
|
||||||
nsDOMEvent* parent = this;
|
nsDOMEvent* parent = this;
|
||||||
nsRefPtr<nsPaintRequestList> requests = new nsPaintRequestList(parent);
|
nsRefPtr<nsPaintRequestList> requests = new nsPaintRequestList(parent);
|
||||||
|
@ -120,7 +120,7 @@ nsDOMNotifyPaintEvent::PaintRequests()
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP_(void)
|
NS_IMETHODIMP_(void)
|
||||||
nsDOMNotifyPaintEvent::Serialize(IPC::Message* aMsg,
|
NotifyPaintEvent::Serialize(IPC::Message* aMsg,
|
||||||
bool aSerializeInterfaceType)
|
bool aSerializeInterfaceType)
|
||||||
{
|
{
|
||||||
if (aSerializeInterfaceType) {
|
if (aSerializeInterfaceType) {
|
||||||
|
@ -138,7 +138,7 @@ nsDOMNotifyPaintEvent::Serialize(IPC::Message* aMsg,
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP_(bool)
|
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);
|
NS_ENSURE_TRUE(nsDOMEvent::Deserialize(aMsg, aIter), false);
|
||||||
|
|
||||||
|
@ -155,16 +155,21 @@ nsDOMNotifyPaintEvent::Deserialize(const IPC::Message* aMsg, void** aIter)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult NS_NewDOMNotifyPaintEvent(nsIDOMEvent** aInstancePtrResult,
|
} // namespace dom
|
||||||
mozilla::dom::EventTarget* aOwner,
|
} // namespace mozilla
|
||||||
|
|
||||||
|
using namespace mozilla;
|
||||||
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
NS_NewDOMNotifyPaintEvent(nsIDOMEvent** aInstancePtrResult,
|
||||||
|
EventTarget* aOwner,
|
||||||
nsPresContext* aPresContext,
|
nsPresContext* aPresContext,
|
||||||
WidgetEvent* aEvent,
|
WidgetEvent* aEvent,
|
||||||
uint32_t aEventType,
|
uint32_t aEventType,
|
||||||
nsInvalidateRequestList* aInvalidateRequests)
|
nsInvalidateRequestList* aInvalidateRequests)
|
||||||
{
|
{
|
||||||
nsDOMNotifyPaintEvent* it =
|
NotifyPaintEvent* it = new NotifyPaintEvent(aOwner, aPresContext, aEvent,
|
||||||
new nsDOMNotifyPaintEvent(aOwner, aPresContext, aEvent, aEventType,
|
aEventType, aInvalidateRequests);
|
||||||
aInvalidateRequests);
|
|
||||||
|
|
||||||
return CallQueryInterface(it, aInstancePtrResult);
|
return CallQueryInterface(it, aInstancePtrResult);
|
||||||
}
|
}
|
|
@ -3,8 +3,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef nsDOMNotifyPaintEvent_h_
|
#ifndef mozilla_dom_NotifyPaintEvent_h_
|
||||||
#define nsDOMNotifyPaintEvent_h_
|
#define mozilla_dom_NotifyPaintEvent_h_
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsIDOMNotifyPaintEvent.h"
|
#include "nsIDOMNotifyPaintEvent.h"
|
||||||
|
@ -16,21 +16,18 @@ class nsPaintRequestList;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class DOMRect;
|
class DOMRect;
|
||||||
class DOMRectList;
|
class DOMRectList;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class nsDOMNotifyPaintEvent : public nsDOMEvent,
|
class NotifyPaintEvent : public nsDOMEvent,
|
||||||
public nsIDOMNotifyPaintEvent
|
public nsIDOMNotifyPaintEvent
|
||||||
{
|
{
|
||||||
typedef mozilla::dom::DOMRect DOMRect;
|
|
||||||
typedef mozilla::dom::DOMRectList DOMRectList;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
nsDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
|
NotifyPaintEvent(EventTarget* aOwner,
|
||||||
nsPresContext* aPresContext,
|
nsPresContext* aPresContext,
|
||||||
mozilla::WidgetEvent* aEvent,
|
WidgetEvent* aEvent,
|
||||||
uint32_t aEventType,
|
uint32_t aEventType,
|
||||||
nsInvalidateRequestList* aInvalidateRequests);
|
nsInvalidateRequestList* aInvalidateRequests);
|
||||||
|
|
||||||
|
@ -50,7 +47,7 @@ public:
|
||||||
virtual JSObject* WrapObject(JSContext* aCx,
|
virtual JSObject* WrapObject(JSContext* aCx,
|
||||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
|
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
return mozilla::dom::NotifyPaintEventBinding::Wrap(aCx, aScope, this);
|
return NotifyPaintEventBinding::Wrap(aCx, aScope, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<DOMRectList> ClientRects();
|
already_AddRefed<DOMRectList> ClientRects();
|
||||||
|
@ -64,4 +61,7 @@ private:
|
||||||
nsTArray<nsInvalidateRequestList::Request> mInvalidateRequests;
|
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',
|
'MouseScrollEvent.h',
|
||||||
'MutationEvent.h',
|
'MutationEvent.h',
|
||||||
'NotifyAudioAvailableEvent.h',
|
'NotifyAudioAvailableEvent.h',
|
||||||
|
'NotifyPaintEvent.h',
|
||||||
'PointerEvent.h',
|
'PointerEvent.h',
|
||||||
'SimpleGestureEvent.h',
|
'SimpleGestureEvent.h',
|
||||||
'Touch.h',
|
'Touch.h',
|
||||||
|
@ -105,10 +106,10 @@ UNIFIED_SOURCES += [
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
# nsDOMEvent.cpp should be built separately because it includes
|
# nsDOMEvent.cpp should be built separately because it includes
|
||||||
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
||||||
'nsDOMEvent.cpp',
|
'NotifyPaintEvent.cpp',
|
||||||
# nsDOMEvent.cpp should be built separately because it includes
|
# nsDOMEvent.cpp should be built separately because it includes
|
||||||
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
||||||
'nsDOMNotifyPaintEvent.cpp',
|
'nsDOMEvent.cpp',
|
||||||
# nsDOMEvent.cpp should be built separately because it includes
|
# nsDOMEvent.cpp should be built separately because it includes
|
||||||
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
|
||||||
'nsDOMScrollAreaEvent.cpp',
|
'nsDOMScrollAreaEvent.cpp',
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include "nsIGeolocationProvider.h"
|
#include "nsIGeolocationProvider.h"
|
||||||
#include "nsCacheService.h"
|
#include "nsCacheService.h"
|
||||||
#include "nsIDOMEventListener.h"
|
#include "nsIDOMEventListener.h"
|
||||||
#include "nsDOMNotifyPaintEvent.h"
|
|
||||||
#include "nsIDOMClientRectList.h"
|
#include "nsIDOMClientRectList.h"
|
||||||
#include "nsIDOMClientRect.h"
|
#include "nsIDOMClientRect.h"
|
||||||
#include "nsIDOMWakeLockListener.h"
|
#include "nsIDOMWakeLockListener.h"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче