The default bug view has changed. See this FAQ.

Remove nsIDOMNSUIEvent, nsIDOMNSMouseEvent

RESOLVED FIXED in mozilla9

Status

()

Core
DOM: Events
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

({addon-compat, dev-doc-needed})

Trunk
mozilla9
addon-compat, dev-doc-needed
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

6 years ago
I've got patches that just need to be finished.
(Assignee)

Comment 1

6 years ago
Created attachment 550036 [details] [diff] [review]
Part a: Remove nsIDOMNSUIEvent
Attachment #550036 - Flags: review?(Olli.Pettay)
(Assignee)

Comment 2

6 years ago
Created attachment 550037 [details] [diff] [review]
Part b: Remove nsIDOMNSMouseEvent
Attachment #550037 - Flags: review?(Olli.Pettay)

Comment 3

6 years ago
Comment on attachment 550036 [details] [diff] [review]
Part a: Remove nsIDOMNSUIEvent

>+  virtual nsresult Which(PRUint32* aWhich) {
{ should be in the next line

>-  nsCOMPtr<nsIDOMNSUIEvent> nsUIEvent(do_QueryInterface(aEvent));
>-  if (nsUIEvent)
>-    nsUIEvent->GetPreventDefault(&preventDefault);
>+  nsCOMPtr<nsIDOMNSEvent> domNSEvent = do_QueryInterface(aEvent);
>+  if (domNSEvent)
>+    domNSEvent->GetPreventDefault(&preventDefault);
if (expr) {
  stmt;
}



Could you ask someone to check if addons use nsIDOMNSUIEvent often.
If they do, could you add a dummy nsIDOMNSUIEvent: nsIDOMUIEvent interface
to nsIDOMUIEvent.idl
Attachment #550036 - Flags: review?(Olli.Pettay) → review+
(Assignee)

Comment 4

6 years ago
Created attachment 550999 [details] [diff] [review]
Part c: Remove nsIDOMNSEvent
Attachment #550999 - Flags: review?(Olli.Pettay)

Comment 5

6 years ago
...and then nsDOMUIEvent::QueryInterface could warn about using
nsIDOMNSUIEvent.
Same with other NS*Event interfaces.

Comment 6

6 years ago
Comment on attachment 550037 [details] [diff] [review]
Part b: Remove nsIDOMNSMouseEvent

update the iid of nsIDOMMouseEvent, nsIDOMDragEvent and nsIDOMMouseScrollEvent
Attachment #550037 - Flags: review?(Olli.Pettay) → review+

Comment 7

6 years ago
Comment on attachment 550999 [details] [diff] [review]
Part c: Remove nsIDOMNSEvent

I guess you should update iid of all the event interfaces, with that
r+ for the patch.

But please ask someone to check how often nsIDOMNSEvent is used in addons.
We may need to keep the interface just for the consts.
Attachment #550999 - Flags: review?(Olli.Pettay) → review+
(Assignee)

Comment 8

6 years ago
I asked Jesse to check for add-ons, and nsIDOMNSMouseEvent and nsIDOMNSUIEvent aren't used in code, and for nsIDOMNSEvent he said that just 7 files used it, and "most of the nsIDOMNSEvent hits are just using the constants, but there are some QI calls as well". I'm happy to keep nsIDOMNSEvent for the constants, but I'd rather not have to keep supporting it in all events' QI implementations. What do you think?

Comment 9

6 years ago
I believe you missed two tiny spots for nsIDOMNSUIEvent:
https://mxr.mozilla.org/mozilla-central/search?string=nsuievent&find=\.xml&tree=mozilla-central

They're just there for constants, so it's not that bad. I think they end up being exposed to unprivileged content (http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Cscript%3Edocument.write%28NSUIEvent%29%3B%3C%2Fscript%3E) but that's probably not worth thinking about.
(Assignee)

Comment 10

6 years ago
Comment on attachment 550036 [details] [diff] [review]
Part a: Remove nsIDOMNSUIEvent

http://hg.mozilla.org/mozilla-central/rev/ce4f04d1c8e7
Attachment #550036 - Flags: checkin+
(Assignee)

Comment 11

6 years ago
Comment on attachment 550037 [details] [diff] [review]
Part b: Remove nsIDOMNSMouseEvent

http://hg.mozilla.org/mozilla-central/rev/cc1e08803869
Attachment #550037 - Flags: checkin+
Keywords: addon-compat

Updated

5 years ago
Depends on: 710239
Are the check-ins in comment #10 and comment #11 already in Firefox? If so, which version(s)? I'm getting reports from an add-on developer that says nsIDOMNSUIEvent is no longer there, and this bug is not resolved and doesn't have a milestone.

If this is being fixed in chunks during several releases, I would appreciate it that you create dependent bugs that are easier to track.
(Assignee)

Updated

5 years ago
Blocks: 716822
(Assignee)

Comment 13

5 years ago
You're right, of course. I'd planned to get nsIDOMNSEvent done faster, but there always seems to be more urgent things to do.

nsIDOMNS{UI,Mouse}Event were removed in 9, and I filed bug 716822 for nsIDOMNSEvent.
Keywords: dev-doc-needed
Summary: Remove nsIDOMNSUIEvent, nsIDOMNSMouseEvent, nsIDOMNSEvent → Remove nsIDOMNSUIEvent, nsIDOMNSMouseEvent
Target Milestone: --- → mozilla9
(Assignee)

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.