[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 09:45:25 PDT 2019


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

--- Comment #4 from Antoine Quint <graouts at apple.com> ---
(In reply to Chris Dumez from comment #3)
> (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.

Right, we have a Document at creation time. It may not necessarily match the animation's associated document, but for the purpose of the back/forward cache, that should be fine since they will all be associated with the same top-level navigation.

I will look into SuspendableTaskQueue, it seems to be the most appropriate for my use. Thanks for the tips.

-- 
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/19514df1/attachment.html>


More information about the webkit-unassigned mailing list