#include "third_party/blink/renderer/core/html/forms/date_time_edit_element.h"
#include "base/ranges/algorithm.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/focus_params.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/events/mouse_event.h"
#include "third_party/blink/renderer/core/frame/use_counter_impl.h"
#include "third_party/blink/renderer/core/html/forms/date_time_field_elements.h"
#include "third_party/blink/renderer/core/html/forms/date_time_fields_state.h"
#include "third_party/blink/renderer/core/html/shadow/shadow_element_names.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/layout/text_utils.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/text/date_time_format.h"
#include "third_party/blink/renderer/platform/text/platform_locale.h"
#include "third_party/blink/renderer/platform/wtf/date_math.h"
namespace blink {
class DateTimeEditBuilder : private DateTimeFormat::TokenHandler { … };
DateTimeEditBuilder::DateTimeEditBuilder(
DateTimeEditElement& element,
const DateTimeEditElement::LayoutParameters& layout_parameters,
const DateComponents& date_value)
: … { … }
bool DateTimeEditBuilder::Build(const String& format_string) { … }
bool DateTimeEditBuilder::NeedMillisecondField() const { … }
void DateTimeEditBuilder::VisitField(DateTimeFormat::FieldType field_type,
int count) { … }
bool DateTimeEditBuilder::ShouldAMPMFieldDisabled() const { … }
bool DateTimeEditBuilder::ShouldDayOfMonthFieldDisabled() const { … }
bool DateTimeEditBuilder::ShouldHourFieldDisabled() const { … }
bool DateTimeEditBuilder::ShouldMillisecondFieldDisabled() const { … }
bool DateTimeEditBuilder::ShouldMinuteFieldDisabled() const { … }
bool DateTimeEditBuilder::ShouldSecondFieldDisabled() const { … }
bool DateTimeEditBuilder::ShouldYearFieldDisabled() const { … }
void DateTimeEditBuilder::VisitLiteral(const String& text) { … }
DateTimeEditElement& DateTimeEditBuilder::EditElement() const { … }
DateTimeNumericFieldElement::Step DateTimeEditBuilder::CreateStep(
double ms_per_field_unit,
double ms_per_field_size) const { … }
DateTimeEditElement::EditControlOwner::~EditControlOwner() = default;
DateTimeEditElement::DateTimeEditElement(Document& document,
EditControlOwner& edit_control_owner)
: … { … }
DateTimeEditElement::~DateTimeEditElement() = default;
void DateTimeEditElement::Trace(Visitor* visitor) const { … }
inline Element* DateTimeEditElement::FieldsWrapperElement() const { … }
void DateTimeEditElement::AddField(DateTimeFieldElement* field) { … }
bool DateTimeEditElement::AnyEditableFieldsHaveValues() const { … }
void DateTimeEditElement::BlurByOwner() { … }
const ComputedStyle* DateTimeEditElement::CustomStyleForLayoutObject(
const StyleRecalcContext& style_recalc_context) { … }
void DateTimeEditElement::DidBlurFromField(mojom::blink::FocusType focus_type) { … }
void DateTimeEditElement::DidFocusOnField(mojom::blink::FocusType focus_type) { … }
void DateTimeEditElement::DisabledStateChanged() { … }
DateTimeFieldElement* DateTimeEditElement::FieldAt(
wtf_size_t field_index) const { … }
wtf_size_t DateTimeEditElement::FieldIndexOf(
const DateTimeFieldElement& field) const { … }
void DateTimeEditElement::FocusIfNoFocus() { … }
void DateTimeEditElement::FocusByOwner(Element* old_focused_element) { … }
DateTimeFieldElement* DateTimeEditElement::FocusedField() const { … }
wtf_size_t DateTimeEditElement::FocusedFieldIndex() const { … }
void DateTimeEditElement::FieldValueChanged() { … }
bool DateTimeEditElement::FocusOnNextFocusableField(wtf_size_t start_index) { … }
bool DateTimeEditElement::FocusOnNextField(const DateTimeFieldElement& field) { … }
bool DateTimeEditElement::FocusOnPreviousField(
const DateTimeFieldElement& field) { … }
void DateTimeEditElement::HandleAmPmRollover(
DateTimeFieldElement::FieldRolloverType rollover_type) { … }
bool DateTimeEditElement::IsDateTimeEditElement() const { … }
bool DateTimeEditElement::IsDisabled() const { … }
bool DateTimeEditElement::IsFieldOwnerDisabled() const { … }
bool DateTimeEditElement::IsFieldOwnerReadOnly() const { … }
bool DateTimeEditElement::IsReadOnly() const { … }
void DateTimeEditElement::GetLayout(const LayoutParameters& layout_parameters,
const DateComponents& date_value) { … }
AtomicString DateTimeEditElement::LocaleIdentifier() const { … }
void DateTimeEditElement::FieldDidChangeValueByKeyboard() { … }
void DateTimeEditElement::ReadOnlyStateChanged() { … }
void DateTimeEditElement::ResetFields() { … }
void DateTimeEditElement::DefaultEventHandler(Event& event) { … }
void DateTimeEditElement::SetValueAsDate(
const LayoutParameters& layout_parameters,
const DateComponents& date) { … }
void DateTimeEditElement::SetValueAsDateTimeFieldsState(
const DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeEditElement::SetEmptyValue(
const LayoutParameters& layout_parameters,
const DateComponents& date_for_read_only_field) { … }
DateTimeFieldElement* DateTimeEditElement::GetField(DateTimeField type) const { … }
bool DateTimeEditElement::HasField(DateTimeField type) const { … }
bool DateTimeEditElement::IsFirstFieldAMPM() const { … }
bool DateTimeEditElement::HasFocusedField() { … }
void PopulateOnlyYearMonthDay(const DateComponents& date,
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeEditElement::SetOnlyYearMonthDay(const DateComponents& date) { … }
void PopulateOnlyTime(const DateComponents& date,
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeEditElement::SetOnlyTime(const DateComponents& date) { … }
void PopulateDateTimeLocal(const DateComponents& date,
DateTimeFieldsState& date_time_fields_state) { … }
void DateTimeEditElement::SetDateTimeLocal(const DateComponents& date) { … }
void DateTimeEditElement::StepDown() { … }
void DateTimeEditElement::StepUp() { … }
void DateTimeEditElement::UpdateUIState() { … }
String DateTimeEditElement::Value() const { … }
DateTimeFieldsState DateTimeEditElement::ValueAsDateTimeFieldsState() const { … }
}