Bug 920425 part.19 Use mozilla::WidgetEvent::AsTextEvent() r=smaug

This commit is contained in:
Masayuki Nakano 2013-10-18 15:10:24 +09:00
parent 05606a8033
commit 792408dff7
6 changed files with 6 additions and 6 deletions

View File

@ -580,7 +580,7 @@ nsDOMEvent::DuplicatePrivateData()
}
case NS_TEXT_EVENT:
{
WidgetTextEvent* oldTextEvent = static_cast<WidgetTextEvent*>(mEvent);
WidgetTextEvent* oldTextEvent = mEvent->AsTextEvent();
WidgetTextEvent* textEvent = new WidgetTextEvent(false, msg, nullptr);
textEvent->AssignTextEventData(*oldTextEvent, true);
newEvent = textEvent;

View File

@ -30,7 +30,7 @@ nsDOMTextEvent::nsDOMTextEvent(mozilla::dom::EventTarget* aOwner,
//
// extract the IME composition string
//
WidgetTextEvent *te = static_cast<WidgetTextEvent*>(mEvent);
WidgetTextEvent* te = mEvent->AsTextEvent();
mText = te->theText;
//

View File

@ -725,7 +725,7 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner,
static_cast<WidgetDragEvent*>(aEvent));
case NS_TEXT_EVENT:
return NS_NewDOMTextEvent(aDOMEvent, aOwner, aPresContext,
static_cast<WidgetTextEvent*>(aEvent));
aEvent->AsTextEvent());
case NS_CLIPBOARD_EVENT:
return NS_NewDOMClipboardEvent(aDOMEvent, aOwner, aPresContext,
aEvent->AsClipboardEvent());

View File

@ -1303,7 +1303,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
break;
case NS_TEXT_TEXT:
{
WidgetTextEvent *textEvent = static_cast<WidgetTextEvent*>(aEvent);
WidgetTextEvent *textEvent = aEvent->AsTextEvent();
if (IsTargetCrossProcess(textEvent)) {
// Will not be handled locally, remote the event
if (GetCrossProcessTarget()->SendTextEvent(*textEvent)) {

View File

@ -689,7 +689,7 @@ nsWindow::DispatchEvent(WidgetGUIEvent* aEvent)
break;
case NS_TEXT_TEXT:
MOZ_ASSERT(mIMEComposing);
mIMEComposingText = static_cast<WidgetTextEvent*>(aEvent)->theText;
mIMEComposingText = aEvent->AsTextEvent()->theText;
break;
}
return status;

View File

@ -280,7 +280,7 @@ PuppetWidget::DispatchEvent(WidgetGUIEvent* event, nsEventStatus& aStatus)
return NS_OK;
break;
case NS_TEXT_EVENT:
mIMELastReceivedSeqno = static_cast<WidgetTextEvent*>(event)->seqno;
mIMELastReceivedSeqno = event->AsTextEvent()->seqno;
if (mIMELastReceivedSeqno < mIMELastBlurSeqno)
return NS_OK;
break;