diff --git a/dom/events/UIEvent.cpp b/dom/events/UIEvent.cpp index eddebaf61673..7f6dd8689753 100644 --- a/dom/events/UIEvent.cpp +++ b/dom/events/UIEvent.cpp @@ -325,12 +325,6 @@ UIEvent::GetLayerY(int32_t* aLayerY) return NS_OK; } -mozilla::dom::Event* -UIEvent::AsEvent(void) -{ - return this; -} - NS_IMETHODIMP UIEvent::DuplicatePrivateData() { diff --git a/dom/interfaces/events/nsIDOMUIEvent.idl b/dom/interfaces/events/nsIDOMUIEvent.idl index 733c40df0c35..723d6cecabcb 100644 --- a/dom/interfaces/events/nsIDOMUIEvent.idl +++ b/dom/interfaces/events/nsIDOMUIEvent.idl @@ -45,6 +45,4 @@ interface nsIDOMUIEvent : nsISupports readonly attribute long pageX; readonly attribute long pageY; readonly attribute unsigned long which; - - [notxpcom, nostdcall] EventPtr AsEvent(); }; diff --git a/dom/xbl/nsXBLPrototypeHandler.cpp b/dom/xbl/nsXBLPrototypeHandler.cpp index aa6c01a8094c..5617c7eeaccd 100644 --- a/dom/xbl/nsXBLPrototypeHandler.cpp +++ b/dom/xbl/nsXBLPrototypeHandler.cpp @@ -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) { diff --git a/dom/xbl/nsXBLPrototypeHandler.h b/dom/xbl/nsXBLPrototypeHandler.h index 9208bedcd8e0..6aa9d73192ef 100644 --- a/dom/xbl/nsXBLPrototypeHandler.h +++ b/dom/xbl/nsXBLPrototypeHandler.h @@ -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); diff --git a/editor/libeditor/EditorEventListener.cpp b/editor/libeditor/EditorEventListener.cpp index 9c00b7061689..3bc7b86d90d7 100644 --- a/editor/libeditor/EditorEventListener.cpp +++ b/editor/libeditor/EditorEventListener.cpp @@ -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); diff --git a/layout/xul/nsSplitterFrame.cpp b/layout/xul/nsSplitterFrame.cpp index 2e8d63d3e4c4..4eb826befeaa 100644 --- a/layout/xul/nsSplitterFrame.cpp +++ b/layout/xul/nsSplitterFrame.cpp @@ -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; diff --git a/layout/xul/nsXULPopupManager.cpp b/layout/xul/nsXULPopupManager.cpp index f52220394e31..7ab8d580757f 100644 --- a/layout/xul/nsXULPopupManager.cpp +++ b/layout/xul/nsXULPopupManager.cpp @@ -2731,7 +2731,7 @@ nsXULPopupManager::KeyDown(KeyboardEvent* aKeyEvent) } } - aKeyEvent->AsEvent()->StopCrossProcessForwarding(); + aKeyEvent->StopCrossProcessForwarding(); return NS_OK; }