#include "third_party/blink/renderer/core/html/forms/date_time_field_elements.h"
#include "third_party/blink/renderer/core/html/forms/date_time_field_element.h"
#include "third_party/blink/renderer/core/html/forms/date_time_fields_state.h"
#include "third_party/blink/renderer/platform/text/date_components.h"
#include "third_party/blink/renderer/platform/text/platform_locale.h"
#include "third_party/blink/renderer/platform/wtf/date_math.h"
#include "ui/strings/grit/ax_strings.h"
namespace blink {
static String QueryString(int resource_id) { … }
DateTimeAMPMFieldElement::DateTimeAMPMFieldElement(
Document& document,
FieldOwner& field_owner,
const Vector<String>& ampm_labels)
: … { … }
void DateTimeAMPMFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeAMPMFieldElement::SetValueAsDate(const DateComponents& date) { … }
void DateTimeAMPMFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
DateTimeDayFieldElement::DateTimeDayFieldElement(Document& document,
FieldOwner& field_owner,
const String& placeholder,
const Range& range)
: … { … }
void DateTimeDayFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeDayFieldElement::SetValueAsDate(const DateComponents& date) { … }
void DateTimeDayFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
DateTimeHourFieldElementBase::DateTimeHourFieldElementBase(
Document& document,
FieldOwner& field_owner,
const Range& range,
const Range& hard_limits,
const Step& step)
: … { … }
void DateTimeHourFieldElementBase::Initialize() { … }
void DateTimeHourFieldElementBase::SetValueAsDate(const DateComponents& date) { … }
void DateTimeHourFieldElementBase::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
namespace {
const DateTimeNumericFieldElement::Range Range11From23(
const DateTimeNumericFieldElement::Range& hour23_range) { … }
}
DateTimeHour11FieldElement::DateTimeHour11FieldElement(
Document& document,
FieldOwner& field_owner,
const Range& hour23_range,
const Step& step)
: … { … }
void DateTimeHour11FieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeHour11FieldElement::SetValueAsInteger(
int value,
EventBehavior event_behavior) { … }
namespace {
const DateTimeNumericFieldElement::Range Range12From23(
const DateTimeNumericFieldElement::Range& hour23_range) { … }
}
DateTimeHour12FieldElement::DateTimeHour12FieldElement(Document& document,
FieldOwner& field_owner,
const Range& range,
const Step& step)
: … { … }
void DateTimeHour12FieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeHour12FieldElement::SetValueAsInteger(
int value,
EventBehavior event_behavior) { … }
void DateTimeHour12FieldElement::NotifyOwnerIfStepDownRollOver(bool has_value,
Step step,
int old_value,
int new_value) { … }
void DateTimeHour12FieldElement::NotifyOwnerIfStepUpRollOver(bool has_value,
Step step,
int old_value,
int new_value) { … }
DateTimeHour23FieldElement::DateTimeHour23FieldElement(
Document& document,
FieldOwner& field_owner,
const Range& hour23_range,
const Step& step)
: … { … }
void DateTimeHour23FieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeHour23FieldElement::SetValueAsInteger(
int value,
EventBehavior event_behavior) { … }
namespace {
const DateTimeNumericFieldElement::Range Range24From23(
const DateTimeNumericFieldElement::Range& hour23_range) { … }
}
DateTimeHour24FieldElement::DateTimeHour24FieldElement(
Document& document,
FieldOwner& field_owner,
const Range& hour23_range,
const Step& step)
: … { … }
void DateTimeHour24FieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeHour24FieldElement::SetValueAsInteger(
int value,
EventBehavior event_behavior) { … }
DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement(
Document& document,
FieldOwner& field_owner,
const Range& range,
const Step& step)
: … { … }
void DateTimeMillisecondFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeMillisecondFieldElement::SetValueAsDate(
const DateComponents& date) { … }
void DateTimeMillisecondFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
DateTimeMinuteFieldElement::DateTimeMinuteFieldElement(Document& document,
FieldOwner& field_owner,
const Range& range,
const Step& step)
: … { … }
void DateTimeMinuteFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeMinuteFieldElement::SetValueAsDate(const DateComponents& date) { … }
void DateTimeMinuteFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
DateTimeMonthFieldElement::DateTimeMonthFieldElement(Document& document,
FieldOwner& field_owner,
const String& placeholder,
const Range& range)
: … { … }
void DateTimeMonthFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeMonthFieldElement::SetValueAsDate(const DateComponents& date) { … }
void DateTimeMonthFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
DateTimeSecondFieldElement::DateTimeSecondFieldElement(Document& document,
FieldOwner& field_owner,
const Range& range,
const Step& step)
: … { … }
void DateTimeSecondFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeSecondFieldElement::SetValueAsDate(const DateComponents& date) { … }
void DateTimeSecondFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
DateTimeSymbolicMonthFieldElement::DateTimeSymbolicMonthFieldElement(
Document& document,
FieldOwner& field_owner,
const Vector<String>& labels,
int minimum,
int maximum)
: … { … }
void DateTimeSymbolicMonthFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeSymbolicMonthFieldElement::SetValueAsDate(
const DateComponents& date) { … }
void DateTimeSymbolicMonthFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
DateTimeWeekFieldElement::DateTimeWeekFieldElement(Document& document,
FieldOwner& field_owner,
const Range& range)
: … { … }
void DateTimeWeekFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeWeekFieldElement::SetValueAsDate(const DateComponents& date) { … }
void DateTimeWeekFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
DateTimeYearFieldElement::DateTimeYearFieldElement(
Document& document,
FieldOwner& field_owner,
const DateTimeYearFieldElement::Parameters& parameters)
: … { … }
static int CurrentFullYear() { … }
int DateTimeYearFieldElement::DefaultValueForStepDown() const { … }
int DateTimeYearFieldElement::DefaultValueForStepUp() const { … }
void DateTimeYearFieldElement::PopulateDateTimeFieldsState(
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeYearFieldElement::SetValueAsDate(const DateComponents& date) { … }
void DateTimeYearFieldElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
}