Closed Bug 788401 Opened 12 years ago Closed 12 years ago

Avoid warnings in EventUtils.synthesizeWheel()

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file, 1 obsolete file)

In the test log, there are some warnings:

> JavaScript strict warning: chrome://mochikit/content/tests/SimpleTest/EventUtils.js, line 310: reference to undefined property aEvent.deltaX

> JavaScript strict warning: chrome://mochikit/content/tests/SimpleTest/EventUtils.js, line 314: reference to undefined property aEvent.deltaY
Attached patch Patch (obsolete) — Splinter Review
Attachment #658377 - Flags: review?(bugs)
Comment on attachment 658377 [details] [diff] [review]
Patch

Do we need to change aEvent.lineOrPageDeltaX != null too?
I mean, is it possible that aEvent.lineOrPageDeltaX is undefined, and would
that cause a warning?
Attachment #658377 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #2)
> Do we need to change aEvent.lineOrPageDeltaX != null too?

Hmm, I guess it's not problem because it's checking the fact but I'll check it later.
Attached patch PatchSplinter Review
Smaug:

It's not a problem, browser_overflowScroll.js calls it only with deltaX and deltaMode. However, there is no warnings with this patch:

https://tbpl.mozilla.org/php/getParsedLog.php?id=15002058&tree=Try&full=1
https://tbpl.mozilla.org/php/getParsedLog.php?id=15003870&tree=Try&full=1
https://tbpl.mozilla.org/php/getParsedLog.php?id=15003290&tree=Try&full=1

This patch makes the method simpler than the previous patch. I'd like to use this instead.
Attachment #658377 - Attachment is obsolete: true
Attachment #658807 - Flags: review?(bugs)
Attachment #658807 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/211a7f7cae85
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: