[Webkit-unassigned] [Bug 203088] WebAnimation should never prevent entering the back/forward cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 21 07:32:00 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=203088

--- Comment #3 from Chris Dumez <cdumez at apple.com> ---
(In reply to Antoine Quint from comment #2)
> So to fix we need to:
> 
> - remove WebAnimation::shouldPreventEnteringBackForwardCache_DEPRECATED()
> - subclass ActiveDOMObject::suspend() and ActiveDOMObject::resume()
> - queue events between calls to suspend() and resume() or use a
> WindowEventLoop (though I'm not sure that is always possible since a
> WebAnimation may not be associated with a Document directly)

ActiveDOMObject need a script execution context when constructed. So presumably WebAnimation has one on construction.

If you cannot use WindowEventLoop, we have GenericEventQueue & SuspendableTaskQueue.
In your case, since you have both promises and events, SuspendableTaskQueue may be better. You can add such data member and then simply enqueue lambdas that either dispatch events or resolve promises. Those data types are PageCache aware and will delay things during suspension for you.

> - don't resolve promises while the document is suspended
> 
> We might need something similar for DocumentTimeline, although it's possible
> that already happens.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191021/010ee81a/attachment.html>


More information about the webkit-unassigned mailing list