mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1357191 - 1. Use Gecko controls for Fennec date/time fields; r=jessica r=nechen
Right now, date/time fields in Fennec appear as regular text fields, which display the date/time values without formatting. This patch makes the fields use the Gecko controls, which do support formatting. This only changes the appearance of the fields; we still display the native date/time pickers when the fields are tapped on. The reset button is hidden in the controls because the Fennec date/time picker provides a separate "clear" button. MozReview-Commit-ID: 75QyKmolNuf
This commit is contained in:
parent
2bb7fc2c35
commit
ea127a6715
@ -289,11 +289,6 @@ nsIFormControl::IsSingleLineTextControl(bool aExcludePassword, uint32_t aType)
|
||||
aType == NS_FORM_INPUT_TEL ||
|
||||
aType == NS_FORM_INPUT_URL ||
|
||||
// TODO: those are temporary until bug 773205 is fixed.
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
// On Android/B2G, date/time input appears as a normal text box.
|
||||
aType == NS_FORM_INPUT_TIME ||
|
||||
aType == NS_FORM_INPUT_DATE ||
|
||||
#endif
|
||||
aType == NS_FORM_INPUT_MONTH ||
|
||||
aType == NS_FORM_INPUT_WEEK ||
|
||||
aType == NS_FORM_INPUT_DATETIME_LOCAL ||
|
||||
|
@ -3819,14 +3819,8 @@ nsCSSFrameConstructor::FindInputData(Element* aElement,
|
||||
nsCSSAnonBoxes::buttonContent) },
|
||||
// TODO: this is temporary until a frame is written: bug 635240.
|
||||
SIMPLE_INT_CREATE(NS_FORM_INPUT_NUMBER, NS_NewNumberControlFrame),
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
// On Android, date/time input appears as a normal text box.
|
||||
SIMPLE_INT_CREATE(NS_FORM_INPUT_TIME, NS_NewTextControlFrame),
|
||||
SIMPLE_INT_CREATE(NS_FORM_INPUT_DATE, NS_NewTextControlFrame),
|
||||
#else
|
||||
SIMPLE_INT_CREATE(NS_FORM_INPUT_TIME, NS_NewDateTimeControlFrame),
|
||||
SIMPLE_INT_CREATE(NS_FORM_INPUT_DATE, NS_NewDateTimeControlFrame),
|
||||
#endif
|
||||
// TODO: this is temporary until a frame is written: bug 888320
|
||||
SIMPLE_INT_CREATE(NS_FORM_INPUT_MONTH, NS_NewTextControlFrame),
|
||||
// TODO: this is temporary until a frame is written: bug 888320
|
||||
|
@ -181,7 +181,8 @@ pref("browser.formfill.enable", true);
|
||||
pref("layout.spellcheckDefault", 0);
|
||||
|
||||
/* new html5 forms */
|
||||
pref("dom.experimental_forms", true);
|
||||
pref("dom.forms.datetime", true);
|
||||
pref("dom.forms.datetime.others", true);
|
||||
pref("dom.forms.number", true);
|
||||
|
||||
/* extension manager and xpinstall */
|
||||
|
@ -305,6 +305,10 @@ input[type=number]::-moz-number-spin-box {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button:-moz-native-anonymous.datetime-reset-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Override accessiblecaret css in layout/style/ua.css */
|
||||
div:-moz-native-anonymous.moz-accessiblecaret > #text-overlay,
|
||||
div:-moz-native-anonymous.moz-accessiblecaret > #image {
|
||||
|
Loading…
Reference in New Issue
Block a user