Merge autoland to mozilla-central. a=merge

This commit is contained in:
Ciure Andrei
2018-04-11 11:56:26 +03:00
262 changed files with 11300 additions and 8866 deletions

View File

@@ -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