Last Comment Bug 782190 - Implement onwheel attribute
: Implement onwheel attribute
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Events (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: mozilla17
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan)
:
Mentors:
Depends on:
Blocks: 719320
  Show dependency treegraph
 
Reported: 2012-08-12 23:35 PDT by Masayuki Nakano [:masayuki] (Mozilla Japan)
Modified: 2012-08-16 06:18 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (336 bytes, text/html)
2012-08-13 09:22 PDT, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details
Patch (5.57 KB, patch)
2012-08-13 23:54 PDT, Masayuki Nakano [:masayuki] (Mozilla Japan)
bugs: review-
Details | Diff | Review
Patch (6.96 KB, patch)
2012-08-15 00:41 PDT, Masayuki Nakano [:masayuki] (Mozilla Japan)
bugs: review+
jst: superreview+
Details | Diff | Review

Description Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-12 23:35:45 PDT
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 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2012-08-13 02:57:08 PDT
Does IE have onwheel?

But anyhow, we should have it.
Comment 2 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-13 08:06:00 PDT
(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 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2012-08-13 08:17:44 PDT
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.
Comment 4 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-13 09:21:33 PDT
(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.
Comment 5 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-13 09:22:22 PDT
Created attachment 651417 [details]
testcase
Comment 6 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-13 23:54:26 PDT
Created attachment 651650 [details] [diff] [review]
Patch
Comment 7 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2012-08-13 23:58:37 PDT
Comment on attachment 651650 [details] [diff] [review]
Patch

I think we want also target.onwheel support, not only <element onwheel>
Comment 8 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-14 06:31:54 PDT
Ah, but I don't know where I need to change. Where should I change?
Comment 10 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2012-08-14 07:27:51 PDT
Yup, similarly to, hmm, I guess onclick for example.
Comment 11 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-14 08:07:26 PDT
Ah, I got it.
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/core/nsIInlineEventHandlers.idl
Comment 12 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2012-08-14 08:12:37 PDT
You'll need to also use different macro in nsEventNameList.h
Comment 13 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-15 00:41:00 PDT
Created attachment 652027 [details] [diff] [review]
Patch
Comment 14 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-15 16:10:55 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/90b4786131bd
Comment 15 Ed Morley [:emorley] 2012-08-16 06:18:41 PDT
https://hg.mozilla.org/mozilla-central/rev/90b4786131bd

Note You need to log in before you can comment on or make changes to this bug.