Implement onwheel attribute

RESOLVED FIXED in mozilla17

Status

()

Core
DOM: Events
--
enhancement
RESOLVED FIXED
5 years ago
2 months ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla17
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

D3E WheelEvent has been implemented already. However, there is no event attribute for it.

HTML5 draft doesn't define onwheel, but defines onmousewheel which is for the legacy mousewheel event (implemented on IE and WebKit). I think that we shouldn't use the name for wheel event and should be dropped from HTML5 spec.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=18542

Comment 1

5 years ago
Does IE have onwheel?

But anyhow, we should have it.
(In reply to Olli Pettay [:smaug] from comment #1)
> Does IE have onwheel?

IE9 doesn't support onwheel event. I don't know IE10. I don't have environment which has IE10.

Comment 3

5 years ago
you mean IE9 doesn't have onwheel property? It should support "wheel" event, I think.
At least they were claiming to implement all of D3E.
(In reply to Olli Pettay [:smaug] from comment #3)
> you mean IE9 doesn't have onwheel property?

Oops, I meant onwheel attribute isn't supported. E.g.,

<div style="overflow: auto; height: 100px; width: 100px;" onwheel="alert(event.type);">
<div style="height: 1000px; width: 1000px;" onwheel="alert(event.type);"></div>
</div>

In this case, these onwheel's script are not performed.
Created attachment 651417 [details]
testcase
Created attachment 651650 [details] [diff] [review]
Patch
Attachment #651650 - Flags: review?(bugs)

Comment 7

5 years ago
Comment on attachment 651650 [details] [diff] [review]
Patch

I think we want also target.onwheel support, not only <element onwheel>
Attachment #651650 - Flags: review?(bugs) → review-
Ah, but I don't know where I need to change. Where should I change?
Oh, in each interface?
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/base/nsIDOMWindow.idl
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/core/nsIDOMElement.idl
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/core/nsIDOMDocument.idl
Yup, similarly to, hmm, I guess onclick for example.
Ah, I got it.
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/core/nsIInlineEventHandlers.idl
You'll need to also use different macro in nsEventNameList.h
Created attachment 652027 [details] [diff] [review]
Patch
Attachment #651650 - Attachment is obsolete: true
Attachment #652027 - Flags: review?(bugs)

Updated

5 years ago
Attachment #652027 - Flags: review?(bugs) → review+
Attachment #652027 - Flags: superreview?(jst)
Status: NEW → ASSIGNED

Updated

5 years ago
Attachment #652027 - Flags: superreview?(jst) → superreview+
https://hg.mozilla.org/integration/mozilla-inbound/rev/90b4786131bd
Target Milestone: --- → mozilla17
https://hg.mozilla.org/mozilla-central/rev/90b4786131bd
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

2 months ago
Depends on: 1377080
You need to log in before you can comment on or make changes to this bug.