There is currently some ambiguity about animations of hidden iframes (with
`display: none`). Current Firefox does not animate them. This introduces a race
condition if an input event causes a navigation: If the animation wait finishes
before the `fragmentNavigated`, things are fine. But if the `fragmentNavigated`
happens before, the `AnimationFramePromise` never finishes, and eventually the
Input BiDi event times out and never returns an actual result.
Waiting for animations is opportunistic in any case, so as a bandaid add a
default timeout to the animation promise. It can be overridden with
`{ timeout: null }` if desired.
[1] https://github.com/whatwg/html/issues/11138
Differential Revision: https://phabricator.services.mozilla.com/D247042