Last Comment Bug 782190 - Implement onwheel attribute
: Implement onwheel attribute
Product: Core
Classification: Components
Component: DOM: Events (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: mozilla17
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan)
: Andrew Overholt [:overholt]
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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 | Splinter Review
Patch (6.96 KB, patch)
2012-08-15 00:41 PDT, Masayuki Nakano [:masayuki] (Mozilla Japan)
bugs: review+
jst: superreview+
Details | Diff | Splinter 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.
Comment 1 Olli Pettay [:smaug] 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] 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>

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]
Comment 6 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-13 23:54:26 PDT
Created attachment 651650 [details] [diff] [review]
Comment 7 Olli Pettay [:smaug] 2012-08-13 23:58:37 PDT
Comment on attachment 651650 [details] [diff] [review]

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] 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.
Comment 12 Olli Pettay [:smaug] 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]
Comment 14 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-15 16:10:55 PDT
Comment 15 Ed Morley [:emorley] 2012-08-16 06:18:41 PDT

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