Bug 920377 part.25 Get rid of nsUIEvent r=roc

This commit is contained in:
Masayuki Nakano 2013-10-01 16:23:01 +09:00
Родитель 255381c975
Коммит e98333c284
9 изменённых файлов: 20 добавлений и 17 удалений

Просмотреть файл

@ -2228,8 +2228,8 @@ Element::PostHandleEventForLinks(nsEventChainPostVisitor& aVisitor)
if (shell) {
// single-click
nsEventStatus status = nsEventStatus_eIgnore;
nsUIEvent actEvent(aVisitor.mEvent->mFlags.mIsTrusted,
NS_UI_ACTIVATE, 1);
InternalUIEvent actEvent(aVisitor.mEvent->mFlags.mIsTrusted,
NS_UI_ACTIVATE, 1);
rv = shell->HandleDOMEventWithTarget(this, &actEvent, &status);
if (NS_SUCCEEDED(rv)) {

Просмотреть файл

@ -680,8 +680,9 @@ nsDOMEvent::DuplicatePrivateData()
}
case NS_UI_EVENT:
{
nsUIEvent* oldUIEvent = static_cast<nsUIEvent*>(mEvent);
nsUIEvent* uiEvent = new nsUIEvent(false, msg, oldUIEvent->detail);
InternalUIEvent* oldUIEvent = static_cast<InternalUIEvent*>(mEvent);
InternalUIEvent* uiEvent =
new InternalUIEvent(false, msg, oldUIEvent->detail);
uiEvent->AssignUIEventData(*oldUIEvent, true);
newEvent = uiEvent;
break;
@ -697,8 +698,8 @@ nsDOMEvent::DuplicatePrivateData()
}
case NS_SMIL_TIME_EVENT:
{
nsUIEvent* oldUIEvent = static_cast<nsUIEvent*>(mEvent);
nsUIEvent* uiEvent = new nsUIEvent(false, msg, 0);
InternalUIEvent* oldUIEvent = static_cast<InternalUIEvent*>(mEvent);
InternalUIEvent* uiEvent = new InternalUIEvent(false, msg, 0);
uiEvent->eventStructType = NS_SMIL_TIME_EVENT;
uiEvent->AssignUIEventData(*oldUIEvent, true);
newEvent = uiEvent;

Просмотреть файл

@ -24,9 +24,8 @@ using namespace mozilla;
nsDOMUIEvent::nsDOMUIEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext, nsGUIEvent* aEvent)
: nsDOMEvent(aOwner, aPresContext, aEvent ?
static_cast<nsEvent *>(aEvent) :
static_cast<nsEvent *>(new nsUIEvent(false, 0, 0)))
: nsDOMEvent(aOwner, aPresContext,
aEvent ? aEvent : new InternalUIEvent(false, 0, 0))
, mClientPoint(0, 0), mLayerPoint(0, 0), mPagePoint(0, 0), mMovementPoint(0, 0)
, mIsPointerLocked(nsEventStateManager::sIsPointerLocked)
, mLastClientPoint(nsEventStateManager::sLastClientPoint)
@ -45,7 +44,7 @@ nsDOMUIEvent::nsDOMUIEvent(mozilla::dom::EventTarget* aOwner,
{
case NS_UI_EVENT:
{
nsUIEvent *event = static_cast<nsUIEvent*>(mEvent);
InternalUIEvent *event = static_cast<InternalUIEvent*>(mEvent);
mDetail = event->detail;
break;
}

Просмотреть файл

@ -227,7 +227,8 @@ HTMLButtonElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
if (aVisitor.mEventStatus != nsEventStatus_eConsumeNoDefault &&
aVisitor.mEvent->IsLeftClickEvent()) {
nsUIEvent actEvent(aVisitor.mEvent->mFlags.mIsTrusted, NS_UI_ACTIVATE, 1);
InternalUIEvent actEvent(aVisitor.mEvent->mFlags.mIsTrusted,
NS_UI_ACTIVATE, 1);
nsCOMPtr<nsIPresShell> shell = aVisitor.mPresContext->GetPresShell();
if (shell) {

Просмотреть файл

@ -3298,7 +3298,8 @@ HTMLInputElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
!IsSingleLineTextControl(true) &&
aVisitor.mEvent->IsLeftClickEvent() &&
!ShouldPreventDOMActivateDispatch(aVisitor.mEvent->originalTarget)) {
nsUIEvent actEvent(aVisitor.mEvent->mFlags.mIsTrusted, NS_UI_ACTIVATE, 1);
InternalUIEvent actEvent(aVisitor.mEvent->mFlags.mIsTrusted,
NS_UI_ACTIVATE, 1);
nsCOMPtr<nsIPresShell> shell = aVisitor.mPresContext->GetPresShell();
if (shell) {

Просмотреть файл

@ -8,9 +8,12 @@
#include "nsIInterfaceRequestorUtils.h"
#include "mozilla/BasicEvents.h"
using namespace mozilla;
nsDOMTimeEvent::nsDOMTimeEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext, nsEvent* aEvent)
: nsDOMEvent(aOwner, aPresContext, aEvent ? aEvent : new nsUIEvent(false, 0, 0)),
: nsDOMEvent(aOwner, aPresContext,
aEvent ? aEvent : new InternalUIEvent(false, 0, 0)),
mDetail(0)
{
SetIsDOMBinding();
@ -22,7 +25,7 @@ nsDOMTimeEvent::nsDOMTimeEvent(mozilla::dom::EventTarget* aOwner,
}
if (mEvent->eventStructType == NS_SMIL_TIME_EVENT) {
nsUIEvent* event = static_cast<nsUIEvent*>(mEvent);
InternalUIEvent* event = static_cast<InternalUIEvent*>(mEvent);
mDetail = event->detail;
}

Просмотреть файл

@ -92,7 +92,7 @@ namespace
NS_IMETHOD Run()
{
nsUIEvent event(true, mMsg, mDetail);
InternalUIEvent event(true, mMsg, mDetail);
event.eventStructType = NS_SMIL_TIME_EVENT;
nsPresContext* context = nullptr;

Просмотреть файл

@ -1026,6 +1026,5 @@ public:
typedef mozilla::WidgetEvent nsEvent;
typedef mozilla::WidgetGUIEvent nsGUIEvent;
typedef mozilla::WidgetInputEvent nsInputEvent;
typedef mozilla::InternalUIEvent nsUIEvent;
#endif // mozilla_BasicEvents_h__

Просмотреть файл

@ -106,7 +106,6 @@ class InternalMutationEvent;
typedef mozilla::WidgetEvent nsEvent;
typedef mozilla::WidgetGUIEvent nsGUIEvent;
typedef mozilla::WidgetInputEvent nsInputEvent;
typedef mozilla::InternalUIEvent nsUIEvent;
typedef mozilla::WidgetMouseEventBase nsMouseEvent_base;
typedef mozilla::WidgetMouseEvent nsMouseEvent;
typedef mozilla::WidgetDragEvent nsDragEvent;