The default bug view has changed. See this FAQ.

Implement onwheel attribute

RESOLVED FIXED in mozilla17

Status

()

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

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

5 years ago
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
Does IE have onwheel?

But anyhow, we should have it.
(Assignee)

Comment 2

5 years ago
(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.
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.
(Assignee)

Comment 4

5 years ago
(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.
(Assignee)

Comment 5

5 years ago
Created attachment 651417 [details]
testcase
(Assignee)

Comment 6

5 years ago
Created attachment 651650 [details] [diff] [review]
Patch
Attachment #651650 - Flags: review?(bugs)
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-
(Assignee)

Comment 8

5 years ago
Ah, but I don't know where I need to change. Where should I change?
(Assignee)

Comment 9

5 years ago
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.
(Assignee)

Comment 11

5 years ago
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
(Assignee)

Comment 13

5 years ago
Created attachment 652027 [details] [diff] [review]
Patch
Attachment #651650 - Attachment is obsolete: true
Attachment #652027 - Flags: review?(bugs)
Attachment #652027 - Flags: review?(bugs) → review+
(Assignee)

Updated

5 years ago
Attachment #652027 - Flags: superreview?(jst)
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED

Updated

5 years ago
Attachment #652027 - Flags: superreview?(jst) → superreview+
(Assignee)

Comment 14

5 years ago
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
You need to log in before you can comment on or make changes to this bug.