Bug 1446527 part 5. Remove unused nsIDOMUIEvent bits. r=qdot

MozReview-Commit-ID: IPzWAakqHN4
This commit is contained in:
Boris Zbarsky 2018-03-26 14:53:02 -04:00
parent b7f9b8d095
commit 00bd4c9912
3 changed files with 5 additions and 78 deletions

View File

@ -44,8 +44,7 @@ InputEvent::Constructor(const GlobalObject& aGlobal,
nsCOMPtr<EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
RefPtr<InputEvent> e = new InputEvent(t, nullptr, nullptr);
bool trusted = e->Init(t);
auto* view = aParam.mView ? aParam.mView->AsInner() : nullptr;
e->InitUIEvent(aType, aParam.mBubbles, aParam.mCancelable, view,
e->InitUIEvent(aType, aParam.mBubbles, aParam.mCancelable, aParam.mView,
aParam.mDetail);
InternalEditorInputEvent* internalEvent = e->mEvent->AsEditorInputEvent();
internalEvent->mIsComposing = aParam.mIsComposing;

View File

@ -136,14 +136,6 @@ UIEvent::GetMovementPoint()
return current - last;
}
NS_IMETHODIMP
UIEvent::GetView(mozIDOMWindowProxy** aView)
{
*aView = mView;
NS_IF_ADDREF(*aView);
return NS_OK;
}
void
UIEvent::InitUIEvent(const nsAString& typeArg,
bool canBubbleArg,
@ -151,34 +143,14 @@ UIEvent::InitUIEvent(const nsAString& typeArg,
nsGlobalWindowInner* viewArg,
int32_t detailArg)
{
auto* view = viewArg ? viewArg->AsInner() : nullptr;
InitUIEvent(typeArg, canBubbleArg, cancelableArg, view, detailArg);
}
NS_IMETHODIMP
UIEvent::InitUIEvent(const nsAString& typeArg,
bool canBubbleArg,
bool cancelableArg,
mozIDOMWindow* viewArg,
int32_t detailArg)
{
NS_ENSURE_TRUE(!mEvent->mFlags.mIsBeingDispatched, NS_OK);
if (NS_WARN_IF(mEvent->mFlags.mIsBeingDispatched)) {
return;
}
Event::InitEvent(typeArg, canBubbleArg, cancelableArg);
mDetail = detailArg;
mView = viewArg ? nsPIDOMWindowInner::From(viewArg)->GetOuterWindow() :
nullptr;
return NS_OK;
}
NS_IMETHODIMP
UIEvent::GetPageX(int32_t* aPageX)
{
NS_ENSURE_ARG_POINTER(aPageX);
*aPageX = PageX();
return NS_OK;
mView = viewArg ? viewArg->GetOuterWindow() : nullptr;
}
int32_t
@ -196,14 +168,6 @@ UIEvent::PageX() const
mClientPoint).x;
}
NS_IMETHODIMP
UIEvent::GetPageY(int32_t* aPageY)
{
NS_ENSURE_ARG_POINTER(aPageY);
*aPageY = PageY();
return NS_OK;
}
int32_t
UIEvent::PageY() const
{
@ -219,14 +183,6 @@ UIEvent::PageY() const
mClientPoint).y;
}
NS_IMETHODIMP
UIEvent::GetWhich(uint32_t* aWhich)
{
NS_ENSURE_ARG_POINTER(aWhich);
*aWhich = Which();
return NS_OK;
}
already_AddRefed<nsINode>
UIEvent::GetRangeParent()
{
@ -309,22 +265,6 @@ UIEvent::GetLayerPoint() const
nsPresContext::AppUnitsToIntCSSPixels(pt.y));
}
NS_IMETHODIMP
UIEvent::GetLayerX(int32_t* aLayerX)
{
NS_ENSURE_ARG_POINTER(aLayerX);
*aLayerX = GetLayerPoint().x;
return NS_OK;
}
NS_IMETHODIMP
UIEvent::GetLayerY(int32_t* aLayerY)
{
NS_ENSURE_ARG_POINTER(aLayerY);
*aLayerY = GetLayerPoint().y;
return NS_OK;
}
NS_IMETHODIMP
UIEvent::DuplicatePrivateData()
{

View File

@ -30,16 +30,4 @@ class Event;
[builtinclass, uuid(85ae52eb-37fa-4fd9-a2e6-c7d0f2a521b3)]
interface nsIDOMUIEvent : nsISupports
{
readonly attribute mozIDOMWindowProxy view;
void initUIEvent(in DOMString typeArg,
in boolean canBubbleArg,
in boolean cancelableArg,
in mozIDOMWindow viewArg,
in long detailArg);
readonly attribute long layerX;
readonly attribute long layerY;
readonly attribute long pageX;
readonly attribute long pageY;
readonly attribute unsigned long which;
};