Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent

RESOLVED FIXED in Firefox 57

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: emk, Assigned: emk)

Tracking

(Blocks 1 bug)

unspecified
mozilla57
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

No description provided.
Comment on attachment 8896239 [details]
Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent.

https://reviewboard.mozilla.org/r/167528/#review172738

::: xpfe/appshell/nsWebShellWindow.cpp:337
(Diff revision 1)
>      RefPtr<nsPresContext> presContext = presShell->GetPresContext();
>  
>      nsEventStatus status = nsEventStatus_eIgnore;
>      WidgetMouseEvent event(true, eClose, nullptr,
>                             WidgetMouseEvent::eReal);
> -    if (NS_SUCCEEDED(eventTarget->DispatchDOMEvent(&event, nullptr, presContext, &status)) &&
> +    if (NS_SUCCEEDED(EventDispatcher::DispatchDOMEvent(eventTarget, &event,

I would use EventDispatcher::Dispatch here, since 3rd param is anyhow null, which means that EventDispatcher::DispatchDOMEvent just calls Dispatch

::: xpfe/appshell/nsWebShellWindow.cpp:722
(Diff revision 1)
>  
>        nsEventStatus status = nsEventStatus_eIgnore;
>        WidgetMouseEvent event(true, eClose, nullptr,
>                               WidgetMouseEvent::eReal);
>  
> -      nsresult rv =
> +      nsresult rv = EventDispatcher::DispatchDOMEvent(eventTarget, &event,

ditto
Attachment #8896239 - Flags: review?(bugs) → review+
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/685802013f43
Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
Backed out for OS X bustage at widget/cocoa/nsMenuX.mm:364: no member named 'DispatchDOMEvent' in 'nsIContent':

https://hg.mozilla.org/integration/autoland/rev/46a6ae7634c718152d8a28fbbe8df1ea19cc34a1

Push with bustage: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=685802013f432de1fb288d37f3a2118b9d020bb1&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=runnable&filter-resultStatus=usercancel
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=122589630&repo=autoland

[task 2017-08-11T15:42:17.457548Z] 15:42:17     INFO -  In file included from /home/worker/workspace/build/src/obj-firefox/widget/cocoa/Unified_mm_widget_cocoa1.mm:128:
[task 2017-08-11T15:42:17.457614Z] 15:42:17     INFO -  /home/worker/workspace/build/src/widget/cocoa/nsMenuX.mm:364:15: error: no member named 'DispatchDOMEvent' in 'nsIContent'
[task 2017-08-11T15:42:17.457668Z] 15:42:17     INFO -    dispatchTo->DispatchDOMEvent(&event, nullptr, nullptr, &status);
[task 2017-08-11T15:42:17.457697Z] 15:42:17     INFO -    ~~~~~~~~~~  ^
[task 2017-08-11T15:42:17.457764Z] 15:42:17     INFO -  /home/worker/workspace/build/src/widget/cocoa/nsMenuX.mm:388:17: error: no member named 'DispatchDOMEvent' in 'nsIContent'
[task 2017-08-11T15:42:17.457814Z] 15:42:17     INFO -      dispatchTo->DispatchDOMEvent(&event, nullptr, nullptr, &status);
[task 2017-08-11T15:42:17.457848Z] 15:42:17     INFO -      ~~~~~~~~~~  ^
[task 2017-08-11T15:42:17.457910Z] 15:42:17     INFO -  /home/worker/workspace/build/src/widget/cocoa/nsMenuX.mm:577:20: error: no member named 'DispatchDOMEvent' in 'nsIContent'
[task 2017-08-11T15:42:17.457957Z] 15:42:17     INFO -    rv = dispatchTo->DispatchDOMEvent(&event, nullptr, nullptr, &status);
[task 2017-08-11T15:42:17.457987Z] 15:42:17     INFO -         ~~~~~~~~~~  ^
[task 2017-08-11T15:42:17.458053Z] 15:42:17     INFO -  /home/worker/workspace/build/src/widget/cocoa/nsMenuX.mm:615:20: error: no member named 'DispatchDOMEvent' in 'nsIContent'
[task 2017-08-11T15:42:17.458103Z] 15:42:17     INFO -    rv = dispatchTo->DispatchDOMEvent(&event, nullptr, nullptr, &status);
[task 2017-08-11T15:42:17.458138Z] 15:42:17     INFO -         ~~~~~~~~~~  ^
[task 2017-08-11T15:42:17.458169Z] 15:42:17     INFO -  4 errors generated.
Flags: needinfo?(VYV03354)
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/b3284273f3e3
Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
I missed *.mm files.
Flags: needinfo?(VYV03354)
https://hg.mozilla.org/mozilla-central/rev/b3284273f3e3
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.