1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/events/NotifyPaintEvent.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,65 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef mozilla_dom_NotifyPaintEvent_h_ 1.10 +#define mozilla_dom_NotifyPaintEvent_h_ 1.11 + 1.12 +#include "mozilla/Attributes.h" 1.13 +#include "mozilla/dom/Event.h" 1.14 +#include "mozilla/dom/NotifyPaintEventBinding.h" 1.15 +#include "nsIDOMNotifyPaintEvent.h" 1.16 +#include "nsPresContext.h" 1.17 + 1.18 +namespace mozilla { 1.19 +namespace dom { 1.20 + 1.21 +class DOMRect; 1.22 +class DOMRectList; 1.23 +class PaintRequestList; 1.24 + 1.25 +class NotifyPaintEvent : public Event, 1.26 + public nsIDOMNotifyPaintEvent 1.27 +{ 1.28 + 1.29 +public: 1.30 + NotifyPaintEvent(EventTarget* aOwner, 1.31 + nsPresContext* aPresContext, 1.32 + WidgetEvent* aEvent, 1.33 + uint32_t aEventType, 1.34 + nsInvalidateRequestList* aInvalidateRequests); 1.35 + 1.36 + NS_DECL_ISUPPORTS_INHERITED 1.37 + 1.38 + NS_DECL_NSIDOMNOTIFYPAINTEVENT 1.39 + 1.40 + // Forward to base class 1.41 + NS_FORWARD_TO_EVENT_NO_SERIALIZATION_NO_DUPLICATION 1.42 + NS_IMETHOD DuplicatePrivateData() MOZ_OVERRIDE 1.43 + { 1.44 + return Event::DuplicatePrivateData(); 1.45 + } 1.46 + NS_IMETHOD_(void) Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) MOZ_OVERRIDE; 1.47 + NS_IMETHOD_(bool) Deserialize(const IPC::Message* aMsg, void** aIter) MOZ_OVERRIDE; 1.48 + 1.49 + virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE 1.50 + { 1.51 + return NotifyPaintEventBinding::Wrap(aCx, this); 1.52 + } 1.53 + 1.54 + already_AddRefed<DOMRectList> ClientRects(); 1.55 + 1.56 + already_AddRefed<DOMRect> BoundingClientRect(); 1.57 + 1.58 + already_AddRefed<PaintRequestList> PaintRequests(); 1.59 +private: 1.60 + nsRegion GetRegion(); 1.61 + 1.62 + nsTArray<nsInvalidateRequestList::Request> mInvalidateRequests; 1.63 +}; 1.64 + 1.65 +} // namespace dom 1.66 +} // namespace mozilla 1.67 + 1.68 +#endif // mozilla_dom_NotifyPaintEvent_h_