Closed Bug 629192 Opened 14 years ago Closed 8 years ago

mozRequestAnimationFrame callbacks fire while a modal dialog is open

Categories

(Core :: DOM: Events, defect, P2)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: jamesr, Assigned: bzbarsky)

References

Details

User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0b11pre) Gecko/20110126 Firefox/4.0b11pre Build Identifier: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0b11pre) Gecko/20110126 Firefox/4.0b11pre mozRequestAnimationFrame callbacks will fire while a modal dialog (such as window.alert() is up, which violates javascript's general aversion to reentrancy. For example: var startTime = Date.now(); window.mozRequestAnimationFrame(function(){window.endTime=Date.now();}); window.alert("hi"); if the user takes 2 seconds to dismiss the dialog, endTime-startTime should be >= 2000. Instead it's much shorter. Reproducible: Always Steps to Reproduce: see script The experimental WebKit implementation of requestAnimationFrame defers invoking the callback until the dialog is dismissed.
Hmm. I suppose we could do that, though of course declarative animations _do_ continue while the modal dialog is up... Olli, is just checking EventHandlingSuppressed() on the document involved the right thing to do?
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'd check top windows modal state depth.
Talked to smaug. Sounds like we need to do both, actually. We need to add a sane accessor for IsInModalState().
Assignee: nobody → bzbarsky
Priority: -- → P2
James, does webkit fire animation callbacks while there is a sync XHR being processed?
Apparently it does not.
Fixeed by bug 675121.
Status: NEW → RESOLVED
Closed: 8 years ago
Depends on: 675121
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.