88#include " prtime.h"
99#include " mozilla/TextEvents.h"
1010
11+ using namespace mozilla ;
12+
1113nsDOMCompositionEvent::nsDOMCompositionEvent (mozilla::dom::EventTarget* aOwner,
1214 nsPresContext* aPresContext,
13- nsCompositionEvent * aEvent)
15+ WidgetCompositionEvent * aEvent)
1416 : nsDOMUIEvent(aOwner, aPresContext, aEvent ? aEvent :
15- new nsCompositionEvent (false , 0 , nullptr ))
17+ new WidgetCompositionEvent (false , 0 , nullptr ))
1618{
1719 NS_ASSERTION (mEvent ->eventStructType == NS_COMPOSITION_EVENT,
1820 " event type mismatch" );
@@ -29,14 +31,14 @@ nsDOMCompositionEvent::nsDOMCompositionEvent(mozilla::dom::EventTarget* aOwner,
2931 mEvent ->mFlags .mCancelable = false ;
3032 }
3133
32- mData = static_cast <nsCompositionEvent *>(mEvent )->data ;
34+ mData = static_cast <WidgetCompositionEvent *>(mEvent )->data ;
3335 // TODO: Native event should have locale information.
3436}
3537
3638nsDOMCompositionEvent::~nsDOMCompositionEvent ()
3739{
3840 if (mEventIsInternal ) {
39- delete static_cast <nsCompositionEvent *>(mEvent );
41+ delete static_cast <WidgetCompositionEvent *>(mEvent );
4042 mEvent = nullptr ;
4143 }
4244}
@@ -83,7 +85,7 @@ nsresult
8385NS_NewDOMCompositionEvent (nsIDOMEvent** aInstancePtrResult,
8486 mozilla::dom::EventTarget* aOwner,
8587 nsPresContext* aPresContext,
86- nsCompositionEvent * aEvent)
88+ WidgetCompositionEvent* aEvent)
8789{
8890 nsDOMCompositionEvent* event =
8991 new nsDOMCompositionEvent (aOwner, aPresContext, aEvent);
0 commit comments