chromium/third_party/blink/renderer/core/html/forms/date_time_field_elements.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_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) {}

}  // namespace

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

}  // namespace

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

}  // namespace

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

}  // namespace blink