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]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 719320
  Show dependency treegraph
 
Reported: 2012-08-12 23:35 PDT by Masayuki Nakano [:masayuki]
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]
no flags Details
Patch (5.57 KB, patch)
2012-08-13 23:54 PDT, Masayuki Nakano [:masayuki]
bugs: review-
Details | Diff | Splinter Review
Patch (6.96 KB, patch)
2012-08-15 00:41 PDT, Masayuki Nakano [:masayuki]
bugs: review+
jst: superreview+
Details | Diff | Splinter Review

Description User image Masayuki Nakano [:masayuki] 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 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2012-08-13 02:57:08 PDT
Does IE have onwheel?

But anyhow, we should have it.
Comment 2 User image Masayuki Nakano [:masayuki] 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 User image Olli Pettay [:smaug] (pto-ish for couple of days) 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 User image Masayuki Nakano [:masayuki] 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 User image Masayuki Nakano [:masayuki] 2012-08-13 09:22:22 PDT
Created attachment 651417 [details]
testcase
Comment 6 User image Masayuki Nakano [:masayuki] 2012-08-13 23:54:26 PDT
Created attachment 651650 [details] [diff] [review]
Patch
Comment 7 User image Olli Pettay [:smaug] (pto-ish for couple of days) 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 User image Masayuki Nakano [:masayuki] 2012-08-14 06:31:54 PDT
Ah, but I don't know where I need to change. Where should I change?
Comment 10 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2012-08-14 07:27:51 PDT
Yup, similarly to, hmm, I guess onclick for example.
Comment 12 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2012-08-14 08:12:37 PDT
You'll need to also use different macro in nsEventNameList.h
Comment 13 User image Masayuki Nakano [:masayuki] 2012-08-15 00:41:00 PDT
Created attachment 652027 [details] [diff] [review]
Patch
Comment 14 User image Masayuki Nakano [:masayuki] 2012-08-15 16:10:55 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/90b4786131bd
Comment 15 User image 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.