Bug 1921276 - Remove global constructor from dom/smil/SMILTimedElement.cpp r=longsonr

Differential Revision: https://phabricator.services.mozilla.com/D223865
This commit is contained in:
serge-sans-paille 2024-10-02 19:41:39 +00:00
parent a25de2a57d
commit 4e9ef35943
3 changed files with 6 additions and 6 deletions

View File

@ -38,9 +38,10 @@ namespace mozilla {
*/
class SMILMilestone {
public:
SMILMilestone(SMILTime aTime, bool aIsEnd) : mTime(aTime), mIsEnd(aIsEnd) {}
constexpr SMILMilestone(SMILTime aTime, bool aIsEnd)
: mTime(aTime), mIsEnd(aIsEnd) {}
SMILMilestone() : mTime(0), mIsEnd(false) {}
constexpr SMILMilestone() : mTime(0), mIsEnd(false) {}
bool operator==(const SMILMilestone& aOther) const {
return mTime == aOther.mTime && mIsEnd == aOther.mIsEnd;

View File

@ -201,9 +201,6 @@ const nsAttrValue::EnumTable SMILTimedElement::sRestartModeTable[] = {
{"never", RESTART_NEVER},
{nullptr, 0}};
const SMILMilestone SMILTimedElement::sMaxMilestone(
std::numeric_limits<SMILTime>::max(), false);
// The thresholds at which point we start filtering intervals and instance times
// indiscriminately.
// See FilterIntervals and FilterInstanceTimes.

View File

@ -8,6 +8,7 @@
#define DOM_SMIL_SMILTIMEDELEMENT_H_
#include <utility>
#include <limits>
#include "mozilla/EventForwards.h"
#include "mozilla/SMILInstanceTime.h"
@ -585,7 +586,8 @@ class SMILTimedElement {
IntervalList mOldIntervals;
uint32_t mCurrentRepeatIteration;
SMILMilestone mPrevRegisteredMilestone;
static const SMILMilestone sMaxMilestone;
static constexpr SMILMilestone sMaxMilestone = {
std::numeric_limits<SMILTime>::max(), false};
static const uint8_t sMaxNumIntervals;
static const uint8_t sMaxNumInstanceTimes;