зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1766395 - Remove dom.forms.datetime-local prefs. r=edgar
We shipped this a while ago. Differential Revision: https://phabricator.services.mozilla.com/D144800
This commit is contained in:
Родитель
c49495fe2e
Коммит
72d2420c2b
|
@ -5089,9 +5089,8 @@ bool HTMLInputElement::IsDateTimeTypeSupported(
|
|||
switch (aDateTimeInputType) {
|
||||
case FormControlType::InputDate:
|
||||
case FormControlType::InputTime:
|
||||
return true;
|
||||
case FormControlType::InputDatetimeLocal:
|
||||
return StaticPrefs::dom_forms_datetime_local();
|
||||
return true;
|
||||
case FormControlType::InputMonth:
|
||||
case FormControlType::InputWeek:
|
||||
return StaticPrefs::dom_forms_datetime_others();
|
||||
|
|
|
@ -1567,8 +1567,7 @@ class HTMLInputElement final : public TextControlElement,
|
|||
static bool CreatesDateTimeWidget(FormControlType aType) {
|
||||
return aType == FormControlType::InputDate ||
|
||||
aType == FormControlType::InputTime ||
|
||||
(aType == FormControlType::InputDatetimeLocal &&
|
||||
StaticPrefs::dom_forms_datetime_local_widget());
|
||||
aType == FormControlType::InputDatetimeLocal;
|
||||
}
|
||||
|
||||
bool CreatesDateTimeWidget() const { return CreatesDateTimeWidget(mType); }
|
||||
|
|
|
@ -244,8 +244,6 @@ bool nsIFormControl::IsSingleLineTextControl(bool aExcludePassword,
|
|||
case FormControlType::InputMonth:
|
||||
case FormControlType::InputWeek:
|
||||
return true;
|
||||
case FormControlType::InputDatetimeLocal:
|
||||
return !mozilla::StaticPrefs::dom_forms_datetime_local_widget();
|
||||
case FormControlType::InputPassword:
|
||||
return !aExcludePassword;
|
||||
default:
|
||||
|
|
|
@ -43,18 +43,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=764481
|
|||
prefs: [["dom.forms.datetime.others", true]],
|
||||
inputType: "week",
|
||||
expectedType: "week"
|
||||
}, {
|
||||
prefs: [["dom.forms.datetime-local", false]],
|
||||
inputType: "datetime-local",
|
||||
expectedType: "text"
|
||||
}, {
|
||||
prefs: [["dom.forms.datetime-local", false]],
|
||||
inputType: "datetime-local",
|
||||
expectedType: "text"
|
||||
}, {
|
||||
prefs: [["dom.forms.datetime-local", true]],
|
||||
inputType: "datetime-local",
|
||||
expectedType: "datetime-local"
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -3456,21 +3456,6 @@ nsCSSFrameConstructor::FindSearchControlData(const Element& aElement,
|
|||
return &sTextControlData;
|
||||
}
|
||||
|
||||
/* static */
|
||||
const nsCSSFrameConstructor::FrameConstructionData*
|
||||
nsCSSFrameConstructor::FindDateTimeLocalInputData(const Element& aElement,
|
||||
ComputedStyle& aStyle) {
|
||||
if (StaticPrefs::dom_forms_datetime_local_widget()) {
|
||||
static constexpr FrameConstructionData sDateTimeData(
|
||||
NS_NewDateTimeControlFrame);
|
||||
return &sDateTimeData;
|
||||
}
|
||||
|
||||
static constexpr FrameConstructionData sTextControlData(
|
||||
NS_NewTextControlFrame);
|
||||
return &sTextControlData;
|
||||
}
|
||||
|
||||
/* static */
|
||||
const nsCSSFrameConstructor::FrameConstructionData*
|
||||
nsCSSFrameConstructor::FindInputData(const Element& aElement,
|
||||
|
@ -3497,12 +3482,12 @@ nsCSSFrameConstructor::FindInputData(const Element& aElement,
|
|||
SIMPLE_INT_CREATE(FormControlType::InputNumber, NS_NewNumberControlFrame),
|
||||
SIMPLE_INT_CREATE(FormControlType::InputTime, NS_NewDateTimeControlFrame),
|
||||
SIMPLE_INT_CREATE(FormControlType::InputDate, NS_NewDateTimeControlFrame),
|
||||
SIMPLE_INT_CREATE(FormControlType::InputDatetimeLocal,
|
||||
NS_NewDateTimeControlFrame),
|
||||
// TODO: this is temporary until a frame is written: bug 888320
|
||||
SIMPLE_INT_CREATE(FormControlType::InputMonth, NS_NewTextControlFrame),
|
||||
// TODO: this is temporary until a frame is written: bug 888320
|
||||
SIMPLE_INT_CREATE(FormControlType::InputWeek, NS_NewTextControlFrame),
|
||||
SIMPLE_INT_CHAIN(FormControlType::InputDatetimeLocal,
|
||||
FindDateTimeLocalInputData),
|
||||
{int32_t(FormControlType::InputSubmit),
|
||||
{ToCreationFunc(NS_NewGfxButtonControlFrame), 0,
|
||||
PseudoStyleType::buttonContent}},
|
||||
|
|
|
@ -1411,8 +1411,6 @@ class nsCSSFrameConstructor final : public nsFrameManager {
|
|||
ComputedStyle&);
|
||||
static const FrameConstructionData* FindSearchControlData(const Element&,
|
||||
ComputedStyle&);
|
||||
static const FrameConstructionData* FindDateTimeLocalInputData(
|
||||
const Element&, ComputedStyle&);
|
||||
static const FrameConstructionData* FindInputData(const Element&,
|
||||
ComputedStyle&);
|
||||
static const FrameConstructionData* FindObjectData(const Element&,
|
||||
|
|
|
@ -2640,18 +2640,6 @@
|
|||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
|
||||
# Support for input type=datetime-local.
|
||||
- name: dom.forms.datetime-local
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Support for input type=datetime-local widget. Disabled for now.
|
||||
- name: dom.forms.datetime-local.widget
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Support for input type=month, type=week. By default, disabled.
|
||||
- name: dom.forms.datetime.others
|
||||
type: bool
|
||||
|
|
|
@ -22,7 +22,6 @@ user_pref("media.mediasource.webm.enabled", true);
|
|||
user_pref("media.av1.enabled", true);
|
||||
user_pref("media.eme.enabled", true);
|
||||
user_pref("dom.forms.datetime.others", true);
|
||||
user_pref("dom.forms.datetime-local", true);
|
||||
// Enable Gamepad
|
||||
user_pref("dom.gamepad.enabled", true);
|
||||
user_pref("dom.gamepad.non_standard_events.enabled", true);
|
||||
|
|
|
@ -786,13 +786,6 @@ add_task(async function test_datepicker_abs_max() {
|
|||
* Ensure datetime-local picker closes when focus moves to a time input.
|
||||
*/
|
||||
add_task(async function test_datetime_focus_to_input() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["dom.forms.datetime-local", true],
|
||||
["dom.forms.datetime-local.widget", true],
|
||||
],
|
||||
});
|
||||
|
||||
await helper.openPicker(
|
||||
`data:text/html,<input id=datetime type=datetime-local>`
|
||||
);
|
||||
|
@ -824,13 +817,6 @@ add_task(async function test_datetime_focus_to_input() {
|
|||
|
||||
// Bug 1726546
|
||||
add_task(async function test_datetime_local_min() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["dom.forms.datetime-local", true],
|
||||
["dom.forms.datetime-local.widget", true],
|
||||
],
|
||||
});
|
||||
|
||||
const inputValue = "2016-12-15T04:00";
|
||||
const inputMin = "2016-12-05T12:22";
|
||||
const inputMax = "2016-12-25T12:22";
|
||||
|
@ -894,13 +880,6 @@ add_task(async function test_datetime_local_min() {
|
|||
|
||||
// Bug 1726546
|
||||
add_task(async function test_datetime_local_min_select_invalid() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["dom.forms.datetime-local", true],
|
||||
["dom.forms.datetime-local.widget", true],
|
||||
],
|
||||
});
|
||||
|
||||
const inputValue = "2016-12-15T05:00";
|
||||
const inputMin = "2016-12-05T12:22";
|
||||
const inputMax = "2016-12-25T12:22";
|
||||
|
|
Загрузка…
Ссылка в новой задаче