chromium/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc

/*
 * Copyright (C) 2012 Google Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1.  Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 * 2.  Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#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 {}

}  // namespace blink