Bug 1446527 part 3. Remove nsIDOMUIEvent::AsEvent. r=qdot

MozReview-Commit-ID: 9KqSXRUIc8G
This commit is contained in:
Boris Zbarsky 2018-03-26 14:53:02 -04:00
Родитель 35a72f73ba
Коммит 18b01d00a3
7 изменённых файлов: 7 добавлений и 15 удалений

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

@ -325,12 +325,6 @@ UIEvent::GetLayerY(int32_t* aLayerY)
return NS_OK;
}
mozilla::dom::Event*
UIEvent::AsEvent(void)
{
return this;
}
NS_IMETHODIMP
UIEvent::DuplicatePrivateData()
{

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

@ -45,6 +45,4 @@ interface nsIDOMUIEvent : nsISupports
readonly attribute long pageX;
readonly attribute long pageY;
readonly attribute unsigned long which;
[notxpcom, nostdcall] EventPtr AsEvent();
};

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

@ -1023,10 +1023,10 @@ nsXBLPrototypeHandler::ReportKeyConflict(const char16_t* aKey, const char16_t* a
bool
nsXBLPrototypeHandler::ModifiersMatchMask(
nsIDOMUIEvent* aEvent,
UIEvent* aEvent,
const IgnoreModifierState& aIgnoreModifierState)
{
WidgetInputEvent* inputEvent = aEvent->AsEvent()->WidgetEventPtr()->AsInputEvent();
WidgetInputEvent* inputEvent = aEvent->WidgetEventPtr()->AsInputEvent();
NS_ENSURE_TRUE(inputEvent, false);
if (mKeyMask & cMetaMask) {

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

@ -21,7 +21,6 @@
class nsIDOMEvent;
class nsIContent;
class nsIDOMUIEvent;
class nsIObjectInputStream;
class nsIObjectOutputStream;
class nsXBLPrototypeBinding;
@ -35,6 +34,7 @@ class AutoJSAPI;
class EventTarget;
class KeyboardEvent;
class MouseEvent;
class UIEvent;
} // namespace dom
namespace layers {
@ -192,7 +192,7 @@ protected:
void ReportKeyConflict(const char16_t* aKey, const char16_t* aModifiers, mozilla::dom::Element* aElement, const char *aMessageName);
void GetEventType(nsAString& type);
bool ModifiersMatchMask(nsIDOMUIEvent* aEvent,
bool ModifiersMatchMask(mozilla::dom::UIEvent* aEvent,
const IgnoreModifierState& aIgnoreModifierState);
nsresult DispatchXBLCommand(mozilla::dom::EventTarget* aTarget, nsIDOMEvent* aEvent);
nsresult DispatchXULKeyCommand(nsIDOMEvent* aEvent);

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

@ -455,7 +455,7 @@ EditorEventListener::HandleEvent(nsIDOMEvent* aEvent)
// editor shouldn't handle this click event.
if (mMouseDownOrUpConsumedByIME) {
mMouseDownOrUpConsumedByIME = false;
mouseEvent->AsEvent()->PreventDefault();
mouseEvent->PreventDefault();
return NS_OK;
}
return MouseClick(mouseEvent);

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

@ -744,7 +744,7 @@ nsSplitterFrameInner::MouseDown(nsIDOMEvent* aMouseEvent)
mChildInfosAfterCount = 0;
int32_t c;
nsPoint pt = nsLayoutUtils::GetDOMEventCoordinatesRelativeTo(mouseEvent->AsEvent(),
nsPoint pt = nsLayoutUtils::GetDOMEventCoordinatesRelativeTo(mouseEvent,
mParentBox);
if (isHorizontal) {
c = pt.x;

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

@ -2731,7 +2731,7 @@ nsXULPopupManager::KeyDown(KeyboardEvent* aKeyEvent)
}
}
aKeyEvent->AsEvent()->StopCrossProcessForwarding();
aKeyEvent->StopCrossProcessForwarding();
return NS_OK;
}