diff --git a/dom/events/UIEvent.cpp b/dom/events/UIEvent.cpp index cabab0ce38ab..eddebaf61673 100644 --- a/dom/events/UIEvent.cpp +++ b/dom/events/UIEvent.cpp @@ -144,13 +144,6 @@ UIEvent::GetView(mozIDOMWindowProxy** aView) return NS_OK; } -NS_IMETHODIMP -UIEvent::GetDetail(int32_t* aDetail) -{ - *aDetail = mDetail; - return NS_OK; -} - void UIEvent::InitUIEvent(const nsAString& typeArg, bool canBubbleArg, @@ -369,9 +362,7 @@ UIEvent::Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) Event::Serialize(aMsg, false); - int32_t detail = 0; - GetDetail(&detail); - IPC::WriteParam(aMsg, detail); + IPC::WriteParam(aMsg, Detail()); } NS_IMETHODIMP_(bool) diff --git a/dom/interfaces/events/nsIDOMUIEvent.idl b/dom/interfaces/events/nsIDOMUIEvent.idl index 3912765ea7dd..733c40df0c35 100644 --- a/dom/interfaces/events/nsIDOMUIEvent.idl +++ b/dom/interfaces/events/nsIDOMUIEvent.idl @@ -31,7 +31,6 @@ class Event; interface nsIDOMUIEvent : nsISupports { readonly attribute mozIDOMWindowProxy view; - readonly attribute long detail; void initUIEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, diff --git a/editor/libeditor/HTMLEditorEventListener.cpp b/editor/libeditor/HTMLEditorEventListener.cpp index e3121118c2fc..86f05220b806 100644 --- a/editor/libeditor/HTMLEditorEventListener.cpp +++ b/editor/libeditor/HTMLEditorEventListener.cpp @@ -99,9 +99,7 @@ HTMLEditorEventListener::MouseDown(MouseEvent* aMouseEvent) bool isContextClick = buttonNumber == 2; - int32_t clickCount; - nsresult rv = aMouseEvent->GetDetail(&clickCount); - NS_ENSURE_SUCCESS(rv, rv); + int32_t clickCount = aMouseEvent->Detail(); nsCOMPtr target = aMouseEvent->GetExplicitOriginalTarget(); NS_ENSURE_TRUE(target, NS_ERROR_NULL_POINTER); @@ -148,7 +146,7 @@ HTMLEditorEventListener::MouseDown(MouseEvent* aMouseEvent) } else { // Get enclosing link if in text so we can select the link nsCOMPtr linkElement; - rv = htmlEditor->GetElementOrParentByTagName( + nsresult rv = htmlEditor->GetElementOrParentByTagName( NS_LITERAL_STRING("href"), node, getter_AddRefs(linkElement)); NS_ENSURE_SUCCESS(rv, rv);