haikuwebkit/Source/WebCore/svg/animation
Chris Dumez f368003434 Make sure SVG SMIL animations do not run in processes without any pages
https://bugs.webkit.org/show_bug.cgi?id=227720
<rdar://79625708>

Reviewed by Simon Fraser.

Make sure SVG SMIL animations do not run in processes without any pages.

We have seen traces / logging indicating that SVG SMIL animations may run in cached WebProcesses, thus
using CPU unnecessarily. Cached WebProcesses have no WebPage so this patch adds assertions to catch cases
where those animations run when there is no Page (and early returns in release to avoid doing unnecessary
work).

* page/Page.cpp:
(WebCore::Page::nonUtilityPageCount):
(WebCore::m_httpsUpgradeEnabled):
(WebCore::Page::~Page):
(WebCore::Page::isOnlyNonUtilityPage const):
* page/Page.h:
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::begin):
(WebCore::SMILTimeContainer::resume):
(WebCore::SMILTimeContainer::setElapsed):
(WebCore::SMILTimeContainer::startTimer):
(WebCore::SMILTimeContainer::updateAnimations):


Canonical link: https://commits.webkit.org/239538@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-09 00:12:30 +00:00
..
SMILTime.cpp
SMILTime.h
SMILTimeContainer.cpp Make sure SVG SMIL animations do not run in processes without any pages 2021-07-09 00:12:30 +00:00
SMILTimeContainer.h
SVGSMILElement.cpp Remove uses of the String::toInt family of functions from WebCore/html and similar directories 2021-05-09 18:22:23 +00:00
SVGSMILElement.h