2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2008-09-18 13:47:21 +04:00
|
|
|
|
2014-02-28 18:58:43 +04:00
|
|
|
#ifndef mozilla_dom_NotifyPaintEvent_h_
|
|
|
|
#define mozilla_dom_NotifyPaintEvent_h_
|
2008-09-18 13:47:21 +04:00
|
|
|
|
2013-05-30 00:43:41 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2014-03-05 04:37:43 +04:00
|
|
|
#include "mozilla/dom/Event.h"
|
2017-02-02 02:26:31 +03:00
|
|
|
#include "mozilla/dom/BindingDeclarations.h"
|
2014-03-05 04:37:43 +04:00
|
|
|
#include "mozilla/dom/NotifyPaintEventBinding.h"
|
2009-09-04 08:49:18 +04:00
|
|
|
#include "nsPresContext.h"
|
|
|
|
|
2013-09-20 14:21:03 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2014-02-28 18:58:43 +04:00
|
|
|
|
2013-09-20 14:21:03 +04:00
|
|
|
class DOMRect;
|
|
|
|
class DOMRectList;
|
2014-04-03 08:18:37 +04:00
|
|
|
class PaintRequestList;
|
2008-09-18 13:47:21 +04:00
|
|
|
|
2018-03-26 21:53:47 +03:00
|
|
|
class NotifyPaintEvent : public Event
|
2008-09-18 13:47:21 +04:00
|
|
|
{
|
2013-09-20 14:21:03 +04:00
|
|
|
|
2008-09-18 13:47:21 +04:00
|
|
|
public:
|
2014-02-28 18:58:43 +04:00
|
|
|
NotifyPaintEvent(EventTarget* aOwner,
|
|
|
|
nsPresContext* aPresContext,
|
|
|
|
WidgetEvent* aEvent,
|
2015-08-26 15:56:59 +03:00
|
|
|
EventMessage aEventMessage,
|
2017-02-17 01:50:58 +03:00
|
|
|
nsTArray<nsRect>* aInvalidateRequests,
|
2017-01-26 08:01:33 +03:00
|
|
|
uint64_t aTransactionId,
|
|
|
|
DOMHighResTimeStamp aTimeStamp);
|
2008-09-18 13:47:21 +04:00
|
|
|
|
2018-03-26 21:53:47 +03:00
|
|
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(NotifyPaintEvent, Event)
|
2008-09-18 13:47:21 +04:00
|
|
|
|
2018-04-20 19:55:31 +03:00
|
|
|
void Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
|
|
|
|
bool Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
|
2012-12-22 12:16:55 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
|
2013-04-16 00:27:37 +04:00
|
|
|
{
|
2018-06-26 00:20:54 +03:00
|
|
|
return NotifyPaintEvent_Binding::Wrap(aCx, this, aGivenProto);
|
2013-04-16 00:27:37 +04:00
|
|
|
}
|
2012-12-22 12:16:55 +04:00
|
|
|
|
2017-02-02 02:26:31 +03:00
|
|
|
already_AddRefed<DOMRectList> ClientRects(SystemCallerGuarantee aGuarantee);
|
2013-04-16 00:27:37 +04:00
|
|
|
|
2017-02-02 02:26:31 +03:00
|
|
|
already_AddRefed<DOMRect> BoundingClientRect(SystemCallerGuarantee aGuarantee);
|
2013-04-16 00:27:37 +04:00
|
|
|
|
2017-02-02 02:26:31 +03:00
|
|
|
already_AddRefed<PaintRequestList> PaintRequests(SystemCallerGuarantee);
|
2014-07-09 01:23:17 +04:00
|
|
|
|
2017-02-02 02:26:31 +03:00
|
|
|
uint64_t TransactionId(SystemCallerGuarantee);
|
2016-04-13 23:59:15 +03:00
|
|
|
|
2017-02-02 02:26:31 +03:00
|
|
|
DOMHighResTimeStamp PaintTimeStamp(SystemCallerGuarantee);
|
2017-01-26 08:01:33 +03:00
|
|
|
|
2014-07-09 01:23:17 +04:00
|
|
|
protected:
|
|
|
|
~NotifyPaintEvent() {}
|
|
|
|
|
2008-09-18 13:47:21 +04:00
|
|
|
private:
|
2017-02-02 02:26:31 +03:00
|
|
|
nsRegion GetRegion(SystemCallerGuarantee);
|
2009-06-23 13:09:05 +04:00
|
|
|
|
2017-02-17 01:50:58 +03:00
|
|
|
nsTArray<nsRect> mInvalidateRequests;
|
2016-04-13 23:59:15 +03:00
|
|
|
uint64_t mTransactionId;
|
2017-01-26 08:01:33 +03:00
|
|
|
DOMHighResTimeStamp mTimeStamp;
|
2008-09-18 13:47:21 +04:00
|
|
|
};
|
|
|
|
|
2014-02-28 18:58:43 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2015-08-12 14:39:31 +03:00
|
|
|
// This empties aInvalidateRequests.
|
|
|
|
already_AddRefed<mozilla::dom::NotifyPaintEvent>
|
|
|
|
NS_NewDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
|
|
|
|
nsPresContext* aPresContext,
|
|
|
|
mozilla::WidgetEvent* aEvent,
|
2015-08-26 15:56:59 +03:00
|
|
|
mozilla::EventMessage aEventMessage =
|
2015-08-29 02:58:26 +03:00
|
|
|
mozilla::eVoidEvent,
|
2017-02-17 01:50:58 +03:00
|
|
|
nsTArray<nsRect>* aInvalidateRequests = nullptr,
|
2017-01-26 08:01:33 +03:00
|
|
|
uint64_t aTransactionId = 0,
|
|
|
|
DOMHighResTimeStamp aTimeStamp = 0);
|
2015-08-12 14:39:31 +03:00
|
|
|
|
2014-02-28 18:58:43 +04:00
|
|
|
#endif // mozilla_dom_NotifyPaintEvent_h_
|