Bug 1845441 - get rid of global constructors in dom/html/HTMLInputElement.cpp r=mstange,dom-core,mccr8

This requires to make Decimal constructor constexpr.

Differential Revision: https://phabricator.services.mozilla.com/D184552
This commit is contained in:
serge-sans-paille
2023-07-27 11:40:18 +00:00
parent db94ea0e7f
commit 6998fd5bb6
3 changed files with 53 additions and 67 deletions

View File

@@ -187,16 +187,16 @@ static const nsAttrValue::EnumTable kCaptureTable[] = {
static const nsAttrValue::EnumTable* kCaptureDefault = &kCaptureTable[2];
const Decimal HTMLInputElement::kStepScaleFactorDate = Decimal(86400000);
const Decimal HTMLInputElement::kStepScaleFactorNumberRange = Decimal(1);
const Decimal HTMLInputElement::kStepScaleFactorTime = Decimal(1000);
const Decimal HTMLInputElement::kStepScaleFactorMonth = Decimal(1);
const Decimal HTMLInputElement::kStepScaleFactorWeek = Decimal(7 * 86400000);
const Decimal HTMLInputElement::kDefaultStepBase = Decimal(0);
const Decimal HTMLInputElement::kDefaultStepBaseWeek = Decimal(-259200000);
const Decimal HTMLInputElement::kDefaultStep = Decimal(1);
const Decimal HTMLInputElement::kDefaultStepTime = Decimal(60);
const Decimal HTMLInputElement::kStepAny = Decimal(0);
constexpr Decimal HTMLInputElement::kStepScaleFactorDate(86400000);
constexpr Decimal HTMLInputElement::kStepScaleFactorNumberRange(1);
constexpr Decimal HTMLInputElement::kStepScaleFactorTime(1000);
constexpr Decimal HTMLInputElement::kStepScaleFactorMonth(1);
constexpr Decimal HTMLInputElement::kStepScaleFactorWeek(7 * 86400000);
constexpr Decimal HTMLInputElement::kDefaultStepBase(0);
constexpr Decimal HTMLInputElement::kDefaultStepBaseWeek(-259200000);
constexpr Decimal HTMLInputElement::kDefaultStep(1);
constexpr Decimal HTMLInputElement::kDefaultStepTime(60);
constexpr Decimal HTMLInputElement::kStepAny(0);
const double HTMLInputElement::kMinimumYear = 1;
const double HTMLInputElement::kMaximumYear = 275760;