Bug 1317539 - Remove dom.forms.number pref. r=bz
MozReview-Commit-ID: EgeUfWMcE8D
This commit is contained in:
@@ -5660,20 +5660,6 @@ HTMLInputElement::IsInputDateTimeOthersEnabled()
|
||||
return sDateTimeOthersEnabled;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
HTMLInputElement::IsInputNumberEnabled()
|
||||
{
|
||||
static bool sInputNumberEnabled = false;
|
||||
static bool sInputNumberPrefCached = false;
|
||||
if (!sInputNumberPrefCached) {
|
||||
sInputNumberPrefCached = true;
|
||||
Preferences::AddBoolVarCache(&sInputNumberEnabled, "dom.forms.number",
|
||||
false);
|
||||
}
|
||||
|
||||
return sInputNumberEnabled;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
HTMLInputElement::IsInputColorEnabled()
|
||||
{
|
||||
@@ -5710,8 +5696,7 @@ HTMLInputElement::ParseAttribute(int32_t aNamespaceID,
|
||||
if (aAttribute == nsGkAtoms::type) {
|
||||
aResult.ParseEnumValue(aValue, kInputTypeTable, false, kInputDefaultType);
|
||||
int32_t newType = aResult.GetEnumValue();
|
||||
if ((newType == NS_FORM_INPUT_NUMBER && !IsInputNumberEnabled()) ||
|
||||
(newType == NS_FORM_INPUT_COLOR && !IsInputColorEnabled()) ||
|
||||
if ((newType == NS_FORM_INPUT_COLOR && !IsInputColorEnabled()) ||
|
||||
(IsDateTimeInputType(newType) && !IsDateTimeTypeSupported(newType))) {
|
||||
// There's no public way to set an nsAttrValue to an enum value, but we
|
||||
// can just re-parse with a table that doesn't have any types other than
|
||||
|
||||
Reference in New Issue
Block a user