Closed Bug 1241672 Opened 5 years ago Closed 5 years ago

Need a method to fire wheel events without any flush

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: hiro, Unassigned)

Details

Attachments

(1 file)

We need a method which fires wheel events without flush just like synthesizeMouseAtPoint.

In out animation tests[1], we need to know whether various animations on various situations update its style or not.  EventUtils.synthesizeWheel calls getBoundingClientRect which leads style flush in it.  We need another method similar to synthesizeMouseAtPoint there.

[1] https://dxr.mozilla.org/mozilla-central/rev/66e07ef46853709e3fa91e7c9ad9fe6abf0d5f06/dom/animation/test/chrome/test_restyles.html
(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)
> We need a method which fires wheel events without flush just like
> synthesizeMouseAtPoint.
> 
> In out animation tests[1], we need to know whether various animations on
> various situations update its style or not.  EventUtils.synthesizeWheel
> calls getBoundingClientRect which leads style flush in it.

The style flush comes from https://dxr.mozilla.org/mozilla-central/rev/66e07ef46853709e3fa91e7c9ad9fe6abf0d5f06/dom/base/Element.cpp#921
Attachment #8710737 - Flags: review?(bugs) → review+
Comment on attachment 8710737 [details]
MozReview Request: Bug 1241672 - Add synthesizeWheelAtPoint to avoid styling flush. r?smaug

https://reviewboard.mozilla.org/r/31853/#review28585

::: testing/mochitest/tests/SimpleTest/EventUtils.js:410
(Diff revision 1)
> - * Synthesize a wheel event on a target. The actual client point is determined
> + * Synthesize a wheel event at a particular point in aWindow.

Want to document here that this method is trying to not flush layout. It is not too obvious without some comment.
Comment on attachment 8710737 [details]
MozReview Request: Bug 1241672 - Add synthesizeWheelAtPoint to avoid styling flush. r?smaug

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31853/diff/1-2/
https://hg.mozilla.org/mozilla-central/rev/c7b15445fa23
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.