| Differences between
and this patch
- a/Source/WebCore/ChangeLog +73 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2012-09-27  Yoshifumi Inoue  <yosin@chromium.org>
2
3
        [Forms] Multiple fields month input UI
4
        https://bugs.webkit.org/show_bug.cgi?id=97299
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        This patch introduces multiple fields month input UI inside ENABLE_INPUT_TYPE_MONTH
9
        and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
10
11
        To support month and year fields, this patch adds new functionalities
12
        into DateTimeNumericFields class:
13
          - Field specific default for step down and up with empty value for
14
            year field to set current year instead of minimum year(1) or
15
            maximum year(27160).
16
          - Field specific placeholder instead of sequence of dash characters
17
            calculated from minimum/maximum value for displaying "----"
18
            instead of "------" on year field which maximum value is 27160.
19
20
        Tests: fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic.html
21
               fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes.html
22
               fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html
23
               fast/forms/month-multiple-fields/month-multiple-fields-appearance-style.html
24
25
        Note: To reduce size of patch, other tests are introduced by another patch.
26
27
        * css/html.css:
28
        (input::-webkit-datetime-edit-month-field):
29
        (input::-webkit-datetime-edit-year-field):
30
        (input::-webkit-datetime-edit-month-field:focus):
31
        (input::-webkit-datetime-edit-year-field:focus):
32
        * html/MonthInputType.cpp:
33
        (WebCore::MonthInputType::formatDateTimeFieldsState): Added to implement virtual funciton declared in BaseMultipleFieldsDateAndTimeInputType to format DateTimeFieldsState as submitted value.
34
        (WebCore::MonthInputType::setupLayoutParameters): Added  implement virtual funciton declared in BaseMultipleFieldsDateAndTimeInputType to set layout parameters for "month" input type.
35
        * html/MonthInputType.h:
36
        (WebCore::MonthInputType::MonthInputType): Changed base class name to BaseMonthInputType.
37
        (MonthInputType): Added declarations for formatDateTimeFieldsState and setupLayoutParameters.
38
        * html/shadow/DateTimeEditElement.cpp:
39
        (WebCore::DateTimeEditBuilder::DateTimeEditBuilder): Changed to initialize new member variables, m_placeholderForMonth and m_placeholderForYear.
40
        (WebCore::DateTimeEditBuilder::visitField): Changed to pass placeholder to month and year fields.
41
        * html/shadow/DateTimeEditElement.h:
42
        (LayoutParameters): Changed to add new member variables, m_placeholderForMonth and m_placeholderForYear.
43
        * html/shadow/DateTimeFieldElements.cpp:
44
        (WebCore::DateTimeHourFieldElement::DateTimeHourFieldElement): Changed to pass placeholder to base class constructor.
45
        (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement): ditto
46
        (WebCore::DateTimeMinuteFieldElement::DateTimeMinuteFieldElement): ditto
47
        (WebCore::DateTimeMonthFieldElement::DateTimeMonthFieldElement): Added.
48
        (WebCore::DateTimeMonthFieldElement::create): Added.
49
        (WebCore::DateTimeMonthFieldElement::populateDateTimeFieldsState): Added.
50
        (WebCore::DateTimeMonthFieldElement::setValueAsDate): Added.
51
        (WebCore::DateTimeMonthFieldElement::setValueAsDateTimeFieldsState): Added.
52
        (WebCore::DateTimeSecondFieldElement::DateTimeSecondFieldElement): Changed to pass placeholder to base class constructor.
53
        (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement): Added.
54
        (WebCore::DateTimeYearFieldElement::create): Added.
55
        (WebCore::DateTimeYearFieldElement::defaultValueForStepDown): Added.
56
        (WebCore::DateTimeYearFieldElement::defaultValueForStepUp): Added.
57
        (WebCore::DateTimeYearFieldElement::populateDateTimeFieldsState): Added.
58
        (WebCore::DateTimeYearFieldElement::setValueAsDate): Added.
59
        (WebCore::DateTimeYearFieldElement::setValueAsDateTimeFieldsState): Added.
60
        * html/shadow/DateTimeFieldElements.h:
61
        (DateTimeMonthFieldElement): Added.
62
        (DateTimeYearFieldElement): Added.
63
        * html/shadow/DateTimeNumericFieldElement.cpp:
64
        (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): Changed to add new parameter for placeholder.
65
        (WebCore::DateTimeNumericFieldElement::defaultValueForStepDown): Added.
66
        (WebCore::DateTimeNumericFieldElement::defaultValueForStepUp): Added.
67
        (WebCore::DateTimeNumericFieldElement::stepDown): Changed to use defaultValueForStepDown() when field doesn't have value.
68
        (WebCore::DateTimeNumericFieldElement::stepUp): Changed to use defaultValueForStepUp() when field doesn't have value.
69
        (WebCore::DateTimeNumericFieldElement::value): Changed to use format "%04d" if maximum value is greater than 999.
70
        (WebCore::DateTimeNumericFieldElement::visibleValue): Changed to use m_placeholder instead of calculating sequence of dash.
71
        * html/shadow/DateTimeNumericFieldElement.h:
72
        (DateTimeNumericFieldElement): Changed for new parameter, placeholder, in constructor.
73
1
2012-09-26  Yoshifumi Inoue  <yosin@chromium.org>
74
2012-09-26  Yoshifumi Inoue  <yosin@chromium.org>
2
75
3
        [Forms] Move multiple fields related functions to BaseDateAndTimeInputType from TimeInputType
76
        [Forms] Move multiple fields related functions to BaseDateAndTimeInputType from TimeInputType
- a/Source/WebCore/css/html.css -2 / +23 lines
Lines 477-483 datalist { a/Source/WebCore/css/html.css_sec1
477
#endif
477
#endif
478
478
479
#if defined(ENABLE_INPUT_MULTIPLE_FIELDS_UI) && ENABLE_INPUT_MULTIPLE_FIELDS_UI
479
#if defined(ENABLE_INPUT_MULTIPLE_FIELDS_UI) && ENABLE_INPUT_MULTIPLE_FIELDS_UI
480
input[type="time"] {
480
input[type="month"],
481
input[type="time"],
482
input[type="year"] {
481
    font-family: monospace;
483
    font-family: monospace;
482
}
484
}
483
485
Lines 519-524 input::-webkit-datetime-edit-minute-field { a/Source/WebCore/css/html.css_sec2
519
    padding: 0.15em;
521
    padding: 0.15em;
520
}
522
}
521
523
524
input::-webkit-datetime-edit-month-field {
525
    -webkit-user-modify: read-only !important;
526
    display: inline-block;
527
    border: none;
528
    text-align: center;
529
    padding: 0.15em;
530
}
531
522
/* This selector is used when step >= 3600 second but format contains minute field. */
532
/* This selector is used when step >= 3600 second but format contains minute field. */
523
input::-webkit-datetime-edit-minute-field[readonly] {
533
input::-webkit-datetime-edit-minute-field[readonly] {
524
    color: GrayText;
534
    color: GrayText;
Lines 532-543 input::-webkit-datetime-edit-second-field { a/Source/WebCore/css/html.css_sec3
532
    padding: 0.15em;
542
    padding: 0.15em;
533
}
543
}
534
544
545
input::-webkit-datetime-edit-year-field {
546
    -webkit-user-modify: read-only !important;
547
    display: inline-block;
548
    border: none;
549
    text-align: center;
550
    padding: 0.15em;
551
}
552
535
/* Remove focus ring from fields and use highlight color */
553
/* Remove focus ring from fields and use highlight color */
536
input::-webkit-datetime-edit-ampm-field:focus,
554
input::-webkit-datetime-edit-ampm-field:focus,
537
input::-webkit-datetime-edit-hour-field:focus,
555
input::-webkit-datetime-edit-hour-field:focus,
538
input::-webkit-datetime-edit-millisecond-field:focus,
556
input::-webkit-datetime-edit-millisecond-field:focus,
539
input::-webkit-datetime-edit-minute-field:focus,
557
input::-webkit-datetime-edit-minute-field:focus,
540
input::-webkit-datetime-edit-second-field:focus {
558
input::-webkit-datetime-edit-month-field:focus,
559
input::-webkit-datetime-edit-second-field:focus,
560
input::-webkit-datetime-edit-year-field:focus {
541
  background-color: highlight;
561
  background-color: highlight;
542
  color: highlighttext;
562
  color: highlighttext;
543
  outline: none;
563
  outline: none;
Lines 548-553 input::-webkit-datetime-edit-second-field[readonly] { a/Source/WebCore/css/html.css_sec4
548
    color: GrayText;
568
    color: GrayText;
549
}
569
}
550
570
571
input[type="month"]::-webkit-inner-spin-button,
551
input[type="time"]::-webkit-inner-spin-button {
572
input[type="time"]::-webkit-inner-spin-button {
552
    margin-left: 0.2em;
573
    margin-left: 0.2em;
553
}
574
}
- a/Source/WebCore/html/MonthInputType.cpp +23 lines
Lines 42-47 a/Source/WebCore/html/MonthInputType.cpp_sec1
42
42
43
#if ENABLE(INPUT_TYPE_MONTH)
43
#if ENABLE(INPUT_TYPE_MONTH)
44
44
45
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
46
#include "DateTimeFieldsState.h"
47
#include "LocalizedStrings.h"
48
#include "Localizer.h"
49
#include <wtf/text/WTFString.h>
50
#endif
51
45
namespace WebCore {
52
namespace WebCore {
46
53
47
using namespace HTMLNames;
54
using namespace HTMLNames;
Lines 137-142 bool MonthInputType::isMonthField() const a/Source/WebCore/html/MonthInputType.cpp_sec2
137
    return true;
144
    return true;
138
}
145
}
139
146
147
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
148
String MonthInputType::formatDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState) const
149
{
150
    if (!dateTimeFieldsState.hasMonth() || !dateTimeFieldsState.hasYear())
151
        return emptyString();
152
    return String::format("%u-%02u", dateTimeFieldsState.year(), dateTimeFieldsState.month());
153
}
154
155
void MonthInputType::setupLayoutParameters(DateTimeEditElement::LayoutParameters& layoutParameters, const DateComponents& date) const
156
{
157
    layoutParameters.dateTimeFormat = monthFormatInLDML();
158
    layoutParameters.fallbackDateTimeFormat = "MM/yyyy";
159
    layoutParameters.placeholderForMonth = "--";
160
    layoutParameters.placeholderForYear = "----";
161
}
162
#endif
140
} // namespace WebCore
163
} // namespace WebCore
141
164
142
#endif
165
#endif
- a/Source/WebCore/html/MonthInputType.h -4 / +19 lines
Lines 31-48 a/Source/WebCore/html/MonthInputType.h_sec1
31
#ifndef MonthInputType_h
31
#ifndef MonthInputType_h
32
#define MonthInputType_h
32
#define MonthInputType_h
33
33
34
#include "BaseDateAndTimeInputType.h"
35
36
#if ENABLE(INPUT_TYPE_MONTH)
34
#if ENABLE(INPUT_TYPE_MONTH)
35
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
36
#include "BaseMultipleFieldsDateAndTimeInputType.h"
37
#else
38
#include "BaseDateAndTimeInputType.h"
39
#endif
37
40
38
namespace WebCore {
41
namespace WebCore {
39
42
40
class MonthInputType : public BaseDateAndTimeInputType {
43
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
44
typedef BaseMultipleFieldsDateAndTimeInputType BaseMonthInputType;
45
#else
46
typedef BaseDateAndTimeInputType BaseMonthInputType;
47
#endif
48
49
class MonthInputType : public BaseMonthInputType {
41
public:
50
public:
42
    static PassOwnPtr<InputType> create(HTMLInputElement*);
51
    static PassOwnPtr<InputType> create(HTMLInputElement*);
43
52
44
private:
53
private:
45
    MonthInputType(HTMLInputElement* element) : BaseDateAndTimeInputType(element) { }
54
    MonthInputType(HTMLInputElement* element) : BaseMonthInputType(element) { }
46
    virtual const AtomicString& formControlType() const OVERRIDE;
55
    virtual const AtomicString& formControlType() const OVERRIDE;
47
    virtual DateComponents::Type dateType() const OVERRIDE;
56
    virtual DateComponents::Type dateType() const OVERRIDE;
48
    virtual double valueAsDate() const OVERRIDE;
57
    virtual double valueAsDate() const OVERRIDE;
Lines 53-58 private: a/Source/WebCore/html/MonthInputType.h_sec2
53
    virtual bool parseToDateComponentsInternal(const UChar*, unsigned length, DateComponents*) const OVERRIDE;
62
    virtual bool parseToDateComponentsInternal(const UChar*, unsigned length, DateComponents*) const OVERRIDE;
54
    virtual bool setMillisecondToDateComponents(double, DateComponents*) const OVERRIDE;
63
    virtual bool setMillisecondToDateComponents(double, DateComponents*) const OVERRIDE;
55
    virtual bool isMonthField() const OVERRIDE;
64
    virtual bool isMonthField() const OVERRIDE;
65
66
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
67
    // BaseMultipleFieldsDateAndTimeInputType functions
68
    virtual String formatDateTimeFieldsState(const DateTimeFieldsState&) const OVERRIDE FINAL;
69
    virtual void setupLayoutParameters(DateTimeEditElement::LayoutParameters&, const DateComponents&) const OVERRIDE FINAL;
70
#endif
56
};
71
};
57
72
58
} // namespace WebCore
73
} // namespace WebCore
- a/Source/WebCore/html/shadow/DateTimeEditElement.cpp +12 lines
Lines 67-72 private: a/Source/WebCore/html/shadow/DateTimeEditElement.cpp_sec1
67
    const DateComponents& m_dateValue;
67
    const DateComponents& m_dateValue;
68
    const StepRange& m_stepRange;
68
    const StepRange& m_stepRange;
69
    Localizer& m_localizer;
69
    Localizer& m_localizer;
70
    const String& m_placeholderForMonth;
71
    const String& m_placeholderForYear;
70
};
72
};
71
73
72
DateTimeEditBuilder::DateTimeEditBuilder(DateTimeEditElement& elemnt, const DateTimeEditElement::LayoutParameters& layoutParameters, const DateComponents& dateValue)
74
DateTimeEditBuilder::DateTimeEditBuilder(DateTimeEditElement& elemnt, const DateTimeEditElement::LayoutParameters& layoutParameters, const DateComponents& dateValue)
Lines 74-79 DateTimeEditBuilder::DateTimeEditBuilder(DateTimeEditElement& elemnt, const Date a/Source/WebCore/html/shadow/DateTimeEditElement.cpp_sec2
74
    , m_dateValue(dateValue)
76
    , m_dateValue(dateValue)
75
    , m_stepRange(layoutParameters.stepRange)
77
    , m_stepRange(layoutParameters.stepRange)
76
    , m_localizer(layoutParameters.localizer)
78
    , m_localizer(layoutParameters.localizer)
79
    , m_placeholderForMonth(layoutParameters.placeholderForMonth)
80
    , m_placeholderForYear(layoutParameters.placeholderForYear)
77
{
81
{
78
}
82
}
79
83
Lines 119-124 void DateTimeEditBuilder::visitField(DateTimeFormat::FieldType fieldType, int) a/Source/WebCore/html/shadow/DateTimeEditElement.cpp_sec3
119
        return;
123
        return;
120
    }
124
    }
121
125
126
    case DateTimeFormat::FieldTypeMonth:
127
        m_editElement.addField(DateTimeMonthFieldElement::create(document, m_editElement, m_placeholderForMonth));
128
        return;
129
122
    case DateTimeFormat::FieldTypePeriod:
130
    case DateTimeFormat::FieldTypePeriod:
123
        m_editElement.addField(DateTimeAMPMFieldElement::create(document, m_editElement, m_localizer.timeAMPMLabels()));
131
        m_editElement.addField(DateTimeAMPMFieldElement::create(document, m_editElement, m_localizer.timeAMPMLabels()));
124
        return;
132
        return;
Lines 144-149 void DateTimeEditBuilder::visitField(DateTimeFormat::FieldType fieldType, int) a/Source/WebCore/html/shadow/DateTimeEditElement.cpp_sec4
144
        return;
152
        return;
145
    }
153
    }
146
154
155
    case DateTimeFormat::FieldTypeYear:
156
        m_editElement.addField(DateTimeYearFieldElement::create(document, m_editElement, m_placeholderForYear));
157
        return;
158
147
    default:
159
    default:
148
        return;
160
        return;
149
    }
161
    }
- a/Source/WebCore/html/shadow/DateTimeEditElement.h +2 lines
Lines 65-70 public: a/Source/WebCore/html/shadow/DateTimeEditElement.h_sec1
65
        String fallbackDateTimeFormat;
65
        String fallbackDateTimeFormat;
66
        Localizer& localizer;
66
        Localizer& localizer;
67
        const StepRange& stepRange;
67
        const StepRange& stepRange;
68
        String placeholderForMonth;
69
        String placeholderForYear;
68
70
69
        LayoutParameters(Localizer& localizer, const StepRange& stepRange)
71
        LayoutParameters(Localizer& localizer, const StepRange& stepRange)
70
            : localizer(localizer)
72
            : localizer(localizer)
- a/Source/WebCore/html/shadow/DateTimeFieldElements.cpp -4 / +113 lines
Lines 30-35 a/Source/WebCore/html/shadow/DateTimeFieldElements.cpp_sec1
30
#include "DateComponents.h"
30
#include "DateComponents.h"
31
#include "DateTimeFieldsState.h"
31
#include "DateTimeFieldsState.h"
32
#include "LocalizedStrings.h"
32
#include "LocalizedStrings.h"
33
#include <wtf/CurrentTime.h>
34
#include <wtf/DateMath.h>
33
35
34
namespace WebCore {
36
namespace WebCore {
35
37
Lines 70-76 void DateTimeAMPMFieldElement::setValueAsDateTimeFieldsState(const DateTimeField a/Source/WebCore/html/shadow/DateTimeFieldElements.cpp_sec2
70
// ----------------------------
72
// ----------------------------
71
73
72
DateTimeHourFieldElement::DateTimeHourFieldElement(Document* document, FieldOwner& fieldOwner, int minimum, int maximum)
74
DateTimeHourFieldElement::DateTimeHourFieldElement(Document* document, FieldOwner& fieldOwner, int minimum, int maximum)
73
    : DateTimeNumericFieldElement(document, fieldOwner, minimum, maximum)
75
    : DateTimeNumericFieldElement(document, fieldOwner, minimum, maximum, "--")
74
    , m_alignment(maximum + maximum % 2)
76
    , m_alignment(maximum + maximum % 2)
75
{
77
{
76
    ASSERT((!minimum && (maximum == 11 || maximum == 23)) || (minimum == 1 && (maximum == 12 || maximum == 24)));
78
    ASSERT((!minimum && (maximum == 11 || maximum == 23)) || (minimum == 1 && (maximum == 12 || maximum == 24)));
Lines 175-181 int DateTimeHourFieldElement::valueAsInteger() const a/Source/WebCore/html/shadow/DateTimeFieldElements.cpp_sec3
175
// ----------------------------
177
// ----------------------------
176
178
177
DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement(Document* document, FieldOwner& fieldOwner)
179
DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement(Document* document, FieldOwner& fieldOwner)
178
    : DateTimeNumericFieldElement(document, fieldOwner, 0, 999)
180
    : DateTimeNumericFieldElement(document, fieldOwner, 0, 999, "---")
179
{
181
{
180
}
182
}
181
183
Lines 216-222 void DateTimeMillisecondFieldElement::setValueAsDateTimeFieldsState(const DateTi a/Source/WebCore/html/shadow/DateTimeFieldElements.cpp_sec4
216
// ----------------------------
218
// ----------------------------
217
219
218
DateTimeMinuteFieldElement::DateTimeMinuteFieldElement(Document* document, FieldOwner& fieldOwner)
220
DateTimeMinuteFieldElement::DateTimeMinuteFieldElement(Document* document, FieldOwner& fieldOwner)
219
    : DateTimeNumericFieldElement(document, fieldOwner, 0, 59)
221
    : DateTimeNumericFieldElement(document, fieldOwner, 0, 59, "--")
220
{
222
{
221
}
223
}
222
224
Lines 256-263 void DateTimeMinuteFieldElement::setValueAsDateTimeFieldsState(const DateTimeFie a/Source/WebCore/html/shadow/DateTimeFieldElements.cpp_sec5
256
258
257
// ----------------------------
259
// ----------------------------
258
260
261
DateTimeMonthFieldElement::DateTimeMonthFieldElement(Document* document, FieldOwner& fieldOwner, const String& placeholder)
262
    : DateTimeNumericFieldElement(document, fieldOwner, 1, 12, placeholder)
263
{
264
}
265
266
PassRefPtr<DateTimeMonthFieldElement> DateTimeMonthFieldElement::create(Document* document, FieldOwner& fieldOwner, const String& placeholder)
267
{
268
    DEFINE_STATIC_LOCAL(AtomicString, monthPsuedoId, ("-webkit-datetime-edit-month-field"));
269
    RefPtr<DateTimeMonthFieldElement> field = adoptRef(new DateTimeMonthFieldElement(document, fieldOwner, placeholder));
270
    field->initialize(monthPsuedoId, AXMonthFieldText());
271
    return field.release();
272
}
273
274
void DateTimeMonthFieldElement::populateDateTimeFieldsState(DateTimeFieldsState& dateTimeFieldsState)
275
{
276
    dateTimeFieldsState.setMonth(hasValue() ? valueAsInteger() : DateTimeFieldsState::emptyValue);
277
}
278
279
void DateTimeMonthFieldElement::setValueAsDate(const DateComponents& date)
280
{
281
    setValueAsInteger(date.month() + 1);
282
}
283
284
void DateTimeMonthFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
285
{
286
    if (!dateTimeFieldsState.hasMonth()) {
287
        setEmptyValue(dateForReadOnlyField);
288
        return;
289
    }
290
291
    const unsigned value = dateTimeFieldsState.month();
292
    if (value > static_cast<unsigned>(maximum())) {
293
        setEmptyValue(dateForReadOnlyField);
294
        return;
295
    }
296
297
    setValueAsInteger(value);
298
}
299
300
// ----------------------------
301
259
DateTimeSecondFieldElement::DateTimeSecondFieldElement(Document* document, FieldOwner& fieldOwner)
302
DateTimeSecondFieldElement::DateTimeSecondFieldElement(Document* document, FieldOwner& fieldOwner)
260
    : DateTimeNumericFieldElement(document, fieldOwner, 0, 59)
303
    : DateTimeNumericFieldElement(document, fieldOwner, 0, 59, "--")
261
{
304
{
262
}
305
}
263
306
Lines 295-300 void DateTimeSecondFieldElement::setValueAsDateTimeFieldsState(const DateTimeFie a/Source/WebCore/html/shadow/DateTimeFieldElements.cpp_sec6
295
    setValueAsInteger(value);
338
    setValueAsInteger(value);
296
}
339
}
297
340
341
// ----------------------------
342
343
// HTML5 uses ISO-8601 format with year >= 1. Gregorian calendar started in
344
// 1582. However, we need to support 0001-01-01 in Gregorian calendar rule.
345
static const int minimumYear = 1;
346
// Date in ECMAScript can't represent dates later than 275760-09-13T00:00Z.
347
// So, we have the same upper limit in HTML5 dates.
348
static const int maximumYear = 275760;
349
350
DateTimeYearFieldElement::DateTimeYearFieldElement(Document* document, FieldOwner& fieldOwner, const String& placeholder)
351
    : DateTimeNumericFieldElement(document, fieldOwner, minimumYear, maximumYear, placeholder)
352
{
353
}
354
355
PassRefPtr<DateTimeYearFieldElement> DateTimeYearFieldElement::create(Document* document, FieldOwner& fieldOwner, const String& placeholder)
356
{
357
    DEFINE_STATIC_LOCAL(AtomicString, yearPsuedoId, ("-webkit-datetime-edit-year-field"));
358
    RefPtr<DateTimeYearFieldElement> field = adoptRef(new DateTimeYearFieldElement(document, fieldOwner, placeholder));
359
    field->initialize(yearPsuedoId, AXYearFieldText());
360
    return field.release();
361
}
362
363
int DateTimeYearFieldElement::defaultValueForStepDown() const
364
{
365
    double current = currentTimeMS();
366
    double utcOffset = calculateUTCOffset();
367
    double dstOffset = calculateDSTOffset(current, utcOffset);
368
    int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
369
    current += offset * msPerMinute;
370
371
    DateComponents date;
372
    date.setMillisecondsSinceEpochForMonth(current);
373
    return date.fullYear();
374
}
375
376
int DateTimeYearFieldElement::defaultValueForStepUp() const
377
{
378
    return defaultValueForStepDown();
379
}
380
381
void DateTimeYearFieldElement::populateDateTimeFieldsState(DateTimeFieldsState& dateTimeFieldsState)
382
{
383
    dateTimeFieldsState.setYear(hasValue() ? valueAsInteger() : DateTimeFieldsState::emptyValue);
384
}
385
386
void DateTimeYearFieldElement::setValueAsDate(const DateComponents& date)
387
{
388
    setValueAsInteger(date.fullYear());
389
}
390
391
void DateTimeYearFieldElement::setValueAsDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState, const DateComponents& dateForReadOnlyField)
392
{
393
    if (!dateTimeFieldsState.hasYear()) {
394
        setEmptyValue(dateForReadOnlyField);
395
        return;
396
    }
397
398
    const unsigned value = dateTimeFieldsState.year();
399
    if (value > static_cast<unsigned>(maximum())) {
400
        setEmptyValue(dateForReadOnlyField);
401
        return;
402
    }
403
404
    setValueAsInteger(value);
405
}
406
298
} // namespace WebCore
407
} // namespace WebCore
299
408
300
#endif
409
#endif
- a/Source/WebCore/html/shadow/DateTimeFieldElements.h +34 lines
Lines 103-108 private: a/Source/WebCore/html/shadow/DateTimeFieldElements.h_sec1
103
    virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&, const DateComponents& dateForReadOnlyField) OVERRIDE FINAL;
103
    virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&, const DateComponents& dateForReadOnlyField) OVERRIDE FINAL;
104
};
104
};
105
105
106
class DateTimeMonthFieldElement : public DateTimeNumericFieldElement {
107
    WTF_MAKE_NONCOPYABLE(DateTimeMonthFieldElement);
108
109
public:
110
    static PassRefPtr<DateTimeMonthFieldElement> create(Document*, FieldOwner&, const String& placeholder);
111
112
private:
113
    DateTimeMonthFieldElement(Document*, FieldOwner&, const String& placeholder);
114
115
    // DateTimeFieldElement functions.
116
    virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINAL;
117
    virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL;
118
    virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&, const DateComponents& dateForReadOnlyField) OVERRIDE FINAL;
119
};
120
106
class DateTimeSecondFieldElement : public DateTimeNumericFieldElement {
121
class DateTimeSecondFieldElement : public DateTimeNumericFieldElement {
107
    WTF_MAKE_NONCOPYABLE(DateTimeSecondFieldElement);
122
    WTF_MAKE_NONCOPYABLE(DateTimeSecondFieldElement);
108
123
Lines 118-123 private: a/Source/WebCore/html/shadow/DateTimeFieldElements.h_sec2
118
    virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&, const DateComponents& dateForReadOnlyField) OVERRIDE FINAL;
133
    virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&, const DateComponents& dateForReadOnlyField) OVERRIDE FINAL;
119
};
134
};
120
135
136
class DateTimeYearFieldElement : public DateTimeNumericFieldElement {
137
    WTF_MAKE_NONCOPYABLE(DateTimeYearFieldElement);
138
139
public:
140
    static PassRefPtr<DateTimeYearFieldElement> create(Document*, FieldOwner&, const String& placeholder);
141
142
private:
143
    DateTimeYearFieldElement(Document*, FieldOwner&, const String& placeholder);
144
145
    // DateTimeFieldElement functions.
146
    virtual void populateDateTimeFieldsState(DateTimeFieldsState&) OVERRIDE FINAL;
147
    virtual void setValueAsDate(const DateComponents&) OVERRIDE FINAL;
148
    virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&, const DateComponents& dateForReadOnlyField) OVERRIDE FINAL;
149
150
    // DateTimeNumericFieldElement functions.
151
    virtual int defaultValueForStepDown() const OVERRIDE FINAL;
152
    virtual int defaultValueForStepUp() const OVERRIDE FINAL;
153
};
154
121
} // namespace WebCore
155
} // namespace WebCore
122
156
123
#endif
157
#endif
- a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp -11 / +16 lines
Lines 63-77 int DateTimeNumericFieldElement::Range::clampValue(int value) const a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp_sec1
63
    return std::min(std::max(value, minimum), maximum);
63
    return std::min(std::max(value, minimum), maximum);
64
}
64
}
65
65
66
DateTimeNumericFieldElement::DateTimeNumericFieldElement(Document* document, FieldOwner& fieldOwner, int minimum, int maximum)
66
DateTimeNumericFieldElement::DateTimeNumericFieldElement(Document* document, FieldOwner& fieldOwner, int minimum, int maximum, const String& placeholder)
67
    : DateTimeFieldElement(document, fieldOwner)
67
    : DateTimeFieldElement(document, fieldOwner)
68
    , m_lastDigitCharTime(0)
68
    , m_lastDigitCharTime(0)
69
    , m_placeholder(placeholder)
69
    , m_range(minimum, maximum)
70
    , m_range(minimum, maximum)
70
    , m_value(0)
71
    , m_value(0)
71
    , m_hasValue(false)
72
    , m_hasValue(false)
72
{
73
{
73
}
74
}
74
75
76
int DateTimeNumericFieldElement::defaultValueForStepDown() const
77
{
78
    return m_range.maximum;
79
}
80
81
int DateTimeNumericFieldElement::defaultValueForStepUp() const
82
{
83
    return m_range.minimum;
84
}
85
75
void DateTimeNumericFieldElement::didBlur()
86
void DateTimeNumericFieldElement::didBlur()
76
{
87
{
77
    m_lastDigitCharTime = 0;
88
    m_lastDigitCharTime = 0;
Lines 148-154 void DateTimeNumericFieldElement::stepDown() a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp_sec2
148
    if (m_hasValue)
159
    if (m_hasValue)
149
        setValueAsInteger(m_value == m_range.minimum ? m_range.maximum : clampValue(m_value - 1), DispatchEvent);
160
        setValueAsInteger(m_value == m_range.minimum ? m_range.maximum : clampValue(m_value - 1), DispatchEvent);
150
    else
161
    else
151
        setValueAsInteger(m_range.maximum, DispatchEvent);
162
        setValueAsInteger(defaultValueForStepDown(), DispatchEvent);
152
}
163
}
153
164
154
void DateTimeNumericFieldElement::stepUp()
165
void DateTimeNumericFieldElement::stepUp()
Lines 156-162 void DateTimeNumericFieldElement::stepUp() a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp_sec3
156
    if (m_hasValue)
167
    if (m_hasValue)
157
        setValueAsInteger(m_value == m_range.maximum ? m_range.minimum : clampValue(m_value + 1), DispatchEvent);
168
        setValueAsInteger(m_value == m_range.maximum ? m_range.minimum : clampValue(m_value + 1), DispatchEvent);
158
    else
169
    else
159
        setValueAsInteger(m_range.minimum, DispatchEvent);
170
        setValueAsInteger(defaultValueForStepUp(), DispatchEvent);
160
}
171
}
161
172
162
String DateTimeNumericFieldElement::value() const
173
String DateTimeNumericFieldElement::value() const
Lines 165-171 String DateTimeNumericFieldElement::value() const a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp_sec4
165
        return emptyString();
176
        return emptyString();
166
177
167
    if (m_range.maximum > 999)
178
    if (m_range.maximum > 999)
168
        return convertToLocalizedNumber(String::number(m_value));
179
        return convertToLocalizedNumber(String::format("%04d", m_value));
169
180
170
    if (m_range.maximum > 99)
181
    if (m_range.maximum > 99)
171
        return convertToLocalizedNumber(String::format("%03d", m_value));
182
        return convertToLocalizedNumber(String::format("%03d", m_value));
Lines 180-192 int DateTimeNumericFieldElement::valueAsInteger() const a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp_sec5
180
191
181
String DateTimeNumericFieldElement::visibleValue() const
192
String DateTimeNumericFieldElement::visibleValue() const
182
{
193
{
183
    if (m_hasValue)
194
    return m_hasValue ? value() : m_placeholder;
184
        return value();
185
186
    StringBuilder builder;
187
    for (int numberOfDashs = std::max(displaySizeOfNumber(m_range.maximum), displaySizeOfNumber(m_range.minimum)); numberOfDashs; --numberOfDashs)
188
        builder.append('-');
189
    return builder.toString();
190
}
195
}
191
196
192
} // namespace WebCore
197
} // namespace WebCore
- a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.h -1 / +4 lines
Lines 50-58 protected: a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.h_sec1
50
        int minimum;
50
        int minimum;
51
    };
51
    };
52
52
53
    DateTimeNumericFieldElement(Document*, FieldOwner&, int minimum, int maximum);
53
    DateTimeNumericFieldElement(Document*, FieldOwner&, int minimum, int maximum, const String& placeholder);
54
54
55
    int clampValue(int value) const { return m_range.clampValue(value); }
55
    int clampValue(int value) const { return m_range.clampValue(value); }
56
    virtual int defaultValueForStepDown() const;
57
    virtual int defaultValueForStepUp() const;
56
    const Range& range() const { return m_range; }
58
    const Range& range() const { return m_range; }
57
59
58
    // DateTimeFieldElement functions.
60
    // DateTimeFieldElement functions.
Lines 73-78 private: a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.h_sec2
73
    virtual String value() const OVERRIDE FINAL;
75
    virtual String value() const OVERRIDE FINAL;
74
76
75
    DOMTimeStamp m_lastDigitCharTime;
77
    DOMTimeStamp m_lastDigitCharTime;
78
    const String m_placeholder;
76
    const Range m_range;
79
    const Range m_range;
77
    int m_value;
80
    int m_value;
78
    bool m_hasValue;
81
    bool m_hasValue;
- a/LayoutTests/ChangeLog +36 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2012-09-27  Yoshifumi Inoue  <yosin@chromium.org>
2
3
        [Forms] Multiple fields month input UI
4
        https://bugs.webkit.org/show_bug.cgi?id=97299
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        This patch adds tests for multiple fields month input UI and disabling
9
        these tests on ports which don't enable both ENABLE_INPUT_TYPE_MONTH
10
        and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
11
12
        Note: We need to do rebaseline tests to update images for Chromium-Mac
13
        and Chromium-Win.
14
15
        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic-expected.txt: Added.
16
        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic.html: Added for checking basic appearance.
17
        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes-expected.txt: Added.
18
        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes.html: Added for checking appearance of applying CSS pseudo classes, e.g. :enabled, :invalid, and so on.
19
        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.txt: Added.
20
        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html: Added for checking appearance of applying CSS pseudo elements, e.g. :after, :before, and so on.
21
        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-style-expected.txt: Added.
22
        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-style.html: Added for checking appearance of applying CSS styles.
23
        * platform/chromium-android/TestExpectations:
24
        * platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic-expected.png: Added.
25
        * platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes-expected.png: Added.
26
        * platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Added.
27
        * platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-style-expected.png: Added.
28
        * platform/chromium/TestExpectations: Changed to disable tests for multiple fields month input UI of Mac and Win for rebaseline.
29
        * platform/chromium/fast/forms/month/month-input-visible-string-expected.txt: Added. Multiple fields month input UI doesn't have selection.
30
        * platform/chromium/fast/forms/month/month-stepup-stepdown-from-renderer-expected.txt: Added. Step up/Step down changes value of one field rather than whole value.
31
        * platform/efl/TestExpectations: Changed to disable tests for multiple fields month input UI.
32
        * platform/mac/Skipped: ditto
33
        * platform/qt/Skipped: ditto
34
        * platform/win/Skipped: ditto
35
        * platform/wincairo/Skipped: ditto
36
1
2012-09-26  Keishi Hattori  <keishi@webkit.org>
37
2012-09-26  Keishi Hattori  <keishi@webkit.org>
2
38
3
        Add tests for datalist UI for input type date
39
        Add tests for datalist UI for input type date
- a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic-expected.txt +5 lines
Line 0 a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic-expected.txt_sec1
1
basic  
2
focus  
3
disabled  
4
readonly  
5
RTL  
- a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic.html +15 lines
Line 0 a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic.html_sec1
1
<html>
2
<body>
3
<ul>
4
    <li>basic <input type="month"> <input type="month" value="1982-11"></li>
5
    <li>focus <input autofocus type="month"> <input type="month" value="1982-11"></li>
6
    <li>disabled <input type="month" disabled> <input type="month" value="1982-11" disabled></li>
7
    <li>readonly <input type="month" readonly> <input type="month" value="1982-11" readonly></li>
8
    <li>RTL <input type="month" dir="rtl"> <input type="month" value="1982-11" dir="rtl"></li>
9
</ul>
10
</body>
11
<script>
12
if (window.testRunner)
13
    testRunner.dumpAsText(true);
14
</script>
15
</html>
- a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes-expected.txt +10 lines
Line 0 a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes-expected.txt_sec1
1
Input Type "month"
2
3
Pseudo Classes
4
5
:enabled, :valid	
6
:disabled	
7
:invalid	
8
:in-range	
9
:out-of-range	
10
:read-only	
- a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes.html +29 lines
Line 0 a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes.html_sec1
1
<html>
2
<head>
3
<style type="text/css">
4
:disabled { color: gray; }
5
:enabled { color: blue; }
6
:invalid { color: pink; }
7
:in-range { font-weight: bold; }
8
:out-of-range { color: red; }
9
:read-only { color: yellow; }
10
:valid { color: green; }
11
</style>
12
</head>
13
<body>
14
<h1>Input Type "month"</h1>
15
<h2>Pseudo Classes</h2>
16
<table>
17
<tr><th>:enabled, :valid</th><td><input type="month" value="1982-11"></td></tr>
18
<tr><th>:disabled</th><td><input type="month" value="1982-11" disabled></td></tr>
19
<tr><th>:invalid</th><td><input type="month" value="1982-11" min="1982-10" step="2"></td></tr>
20
<tr><th>:in-range</th><td><input type="month" value="1982-11" min="1982-01" max="1982-12"></td></tr>
21
<tr><th>:out-of-range</th><td><input type="month" value="1982-11" min="1981-01" max="1981-12"></td></tr>
22
<tr><th>:read-only</th><td><input type="month" value="1982-11" readonly></td></tr>
23
</table>
24
</body>
25
<script>
26
if (window.testRunner)
27
    testRunner.dumpAsText(true);
28
</script>
29
</html>
- a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.txt +3 lines
Line 0 a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.txt_sec1
1
2
3
- a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html +20 lines
Line 0 a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html_sec1
1
<html>
2
<head>
3
<style type="text/css">
4
.after:after { content: "[after]"; }
5
.before:before { content: "[before]"; }
6
.first-letter:first-letter { color: green; font-size: 200%; }
7
</style>
8
</head>
9
<body>
10
<ul>
11
    <li><input type="month" value="1982-11" class="after"></li>
12
    <li><input type="month" value="1982-11" class="before"></li>
13
    <li><input type="month" value="1982-11" class="first-letter"></li>
14
</ul>
15
</body>
16
<script>
17
if (window.testRunner)
18
    testRunner.dumpAsText(true);
19
</script>
20
</html>
- a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-style-expected.txt +5 lines
Line 0 a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-style-expected.txt_sec1
1
text-align: 
2
text-transform: 
3
background, color: 
4
font-size: 
5
font-size with fixed input width: 
- a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-style.html +15 lines
Line 0 a/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-style.html_sec1
1
<html>
2
<body>
3
<ul>
4
    <li>text-align: <input type="month" value="1982-11" style="text-align: left"></li>
5
    <li>text-transform: <input type="month" value="1982-11" style="text-transform: lowercase"></li>
6
    <li>background, color: <input type="month" value="1982-11" style="border: 0px; background: green; color: yellow"></li>
7
    <li>font-size: <input type="month" value="1982-11" style="font-size: 20pt"></li>
8
    <li>font-size with fixed input width: <input type="month" value="1982-11" style="font-size: 20pt; width: 10em;"></li>
9
</ul>
10
</body>
11
<script>
12
if (window.testRunner)
13
    testRunner.dumpAsText(true);
14
</script>
15
</html>
- a/LayoutTests/platform/chromium-android/TestExpectations +1 lines
Lines 47-52 crbug.com/145338 platform/chromium/inspector a/LayoutTests/platform/chromium-android/TestExpectations_sec1
47
crbug.com/145338 accessibility
47
crbug.com/145338 accessibility
48
crbug.com/145338 platform/chromium/accessibility
48
crbug.com/145338 platform/chromium/accessibility
49
49
50
crbug.com/145338 fast/forms/month-multiple-fields
50
crbug.com/145338 fast/forms/time-multiple-fields
51
crbug.com/145338 fast/forms/time-multiple-fields
51
crbug.com/145338 fast/forms/color
52
crbug.com/145338 fast/forms/color
52
crbug.com/145338 fast/forms/datalist
53
crbug.com/145338 fast/forms/datalist
- a/LayoutTests/platform/chromium/TestExpectations +4 lines
Lines 3546-3551 webkit.org/b/96834 platform/chromium/virtual/threaded/compositing/visibility/vis a/LayoutTests/platform/chromium/TestExpectations_sec1
3546
webkit.org/b/96833 svg/carto.net/selectionlist.svg [ ImageOnlyFailure Pass ]
3546
webkit.org/b/96833 svg/carto.net/selectionlist.svg [ ImageOnlyFailure Pass ]
3547
webkit.org/b/96833 svg/carto.net/combobox.svg [ ImageOnlyFailure Pass ]
3547
webkit.org/b/96833 svg/carto.net/combobox.svg [ ImageOnlyFailure Pass ]
3548
3548
3549
webkit.org/b/97299 [ Mac Win ] fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic.html [ ImageOnlyFailure Pass ]
3550
webkit.org/b/97299 [ Mac Win ] fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes.html [ ImageOnlyFailure Pass ]
3551
webkit.org/b/97299 [ Mac Win ] fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html [ ImageOnlyFailure Pass ]
3552
webkit.org/b/97299 [ Mac Win ] fast/forms/month-multiple-fields/month-multiple-fields-appearance-style.html [ ImageOnlyFailure Pass ]
3549
webkit.org/b/96720 [ Mac Win ] fast/forms/time-multiple-fields/time-multiple-fields-preserve-value-after-history-back.html [ Pass Timeout ]
3553
webkit.org/b/96720 [ Mac Win ] fast/forms/time-multiple-fields/time-multiple-fields-preserve-value-after-history-back.html [ Pass Timeout ]
3550
webkit.org/b/96549 [ Mac ] platform/chromium/virtual/gpu/fast/hidpi/focus-rings.html [ ImageOnlyFailure ]
3554
webkit.org/b/96549 [ Mac ] platform/chromium/virtual/gpu/fast/hidpi/focus-rings.html [ ImageOnlyFailure ]
3551
webkit.org/b/96549 [ Mac ] platform/chromium/virtual/gpu/fast/hidpi/video-controls-in-hidpi.html [ ImageOnlyFailure ]
3555
webkit.org/b/96549 [ Mac ] platform/chromium/virtual/gpu/fast/hidpi/video-controls-in-hidpi.html [ ImageOnlyFailure ]
- a/LayoutTests/platform/chromium/fast/forms/month/month-input-visible-string-expected.txt +9 lines
Line 0 a/LayoutTests/platform/chromium/fast/forms/month/month-input-visible-string-expected.txt_sec1
1
The user-visible values of month input fields should be localized if the platform has a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.
2
3
month: value='2011-04' visible='The user-visible values of month input fields should be localized if the platform has a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.
4
5
'
6
PASS successfullyParsed is true
7
8
TEST COMPLETE
9
- a/LayoutTests/platform/chromium/fast/forms/month/month-stepup-stepdown-from-renderer-expected.txt +29 lines
Line 0 a/LayoutTests/platform/chromium/fast/forms/month/month-stepup-stepdown-from-renderer-expected.txt_sec1
1
Check stepping-up and -down for month input fields from renderer. No cases of empty initial values.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
Function arguments are (value, step, {min or max}, [stepCount]).
7
Normal cases
8
FAIL stepUp("2010-02", null, null) should be 2010-03. Was 2010-02.
9
FAIL stepDown("2010-02", null, null) should be 2010-01. Was 2010-02.
10
FAIL stepUp("2010-02", null, null, 10) should be 2010-12. Was 2010-02.
11
FAIL stepDown("2010-02", null, null, 11) should be 2009-03. Was 2010-02.
12
FAIL stepUp("1970-01", "4", null, 2) should be 1970-09. Was 1970-01.
13
FAIL stepDown("1970-01", "4", null, 3) should be 1969-01. Was 1970-01.
14
Step=any
15
FAIL stepUp("2010-02", "any", null) should be 2010-03. Was 2010-02.
16
FAIL stepDown("2010-02", "any", null) should be 2010-01. Was 2010-02.
17
Overflow/underflow
18
FAIL stepUp("2010-02", "3.40282346e+38", null) should be 275760-09. Was 2010-02.
19
FAIL stepDown("2010-02", "3.40282346e+38", null) should be 1970-01. Was 2010-02.
20
PASS stepUp("2010-02", "1", "2010-02") is "2010-02"
21
PASS stepDown("2010-02", "1", "2010-02") is "2010-02"
22
stepDown()/stepUp() for stepMismatch values
23
FAIL stepDown("2010-02", "3", "2009-10") should be 2010-01. Was 2010-02.
24
FAIL stepUp("1970-02", "4", "") should be 1970-05. Was 1970-02.
25
26
PASS successfullyParsed is true
27
28
TEST COMPLETE
29
- a/LayoutTests/platform/efl/TestExpectations +1 lines
Lines 995-1000 webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-sorting.html [ Skip a/LayoutTests/platform/efl/TestExpectations_sec1
995
webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-sorting-instances.html [ Skip ]
995
webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-sorting-instances.html [ Skip ]
996
996
997
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
997
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
998
webkit.org/b/97299 fast/forms/time-multiple-fields
998
webkit.org/b/94186 fast/forms/time-multiple-fields
999
webkit.org/b/94186 fast/forms/time-multiple-fields
999
1000
1000
webkit.org/b/93976 fast/css-generated-content/quotes-lang.html [ ImageOnlyFailure ]
1001
webkit.org/b/93976 fast/css-generated-content/quotes-lang.html [ ImageOnlyFailure ]
- a/LayoutTests/platform/mac/Skipped +1 lines
Lines 836-841 platform/mac/plugins/root-object-premature-delete-crash.html a/LayoutTests/platform/mac/Skipped_sec1
836
css3/flexbox/flex-rounding.html
836
css3/flexbox/flex-rounding.html
837
837
838
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
838
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
839
fast/forms/month-multiple-fields
839
fast/forms/time-multiple-fields
840
fast/forms/time-multiple-fields
840
841
841
# <rdar://problem/11224160> Focus not transferring properly in DumpRenderTree in Mountain Lion
842
# <rdar://problem/11224160> Focus not transferring properly in DumpRenderTree in Mountain Lion
- a/LayoutTests/platform/qt/Skipped +1 lines
Lines 2729-2734 svg/custom/use-instanceRoot-as-event-target.xhtml a/LayoutTests/platform/qt/Skipped_sec1
2729
fast/events/autoscroll-in-textarea.html
2729
fast/events/autoscroll-in-textarea.html
2730
2730
2731
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
2731
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
2732
fast/forms/month-multiple-fields
2732
fast/forms/time-multiple-fields
2733
fast/forms/time-multiple-fields
2733
2734
2734
# [Qt] New inspector/timeline/timeline-decode-resize.html introduced in r125790 fails
2735
# [Qt] New inspector/timeline/timeline-decode-resize.html introduced in r125790 fails
- a/LayoutTests/platform/win/Skipped +1 lines
Lines 1983-1988 plugins/nested-plugin-objects.html a/LayoutTests/platform/win/Skipped_sec1
1983
fast/css/word-space-extra.html
1983
fast/css/word-space-extra.html
1984
1984
1985
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
1985
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
1986
fast/forms/month-multiple-fields
1986
fast/forms/time-multiple-fields
1987
fast/forms/time-multiple-fields
1987
1988
1988
# Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=84286
1989
# Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=84286
- a/LayoutTests/platform/wincairo/Skipped +1 lines
Lines 2514-2519 plugins/nested-plugin-objects.html a/LayoutTests/platform/wincairo/Skipped_sec1
2514
fast/css/word-space-extra.html
2514
fast/css/word-space-extra.html
2515
2515
2516
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
2516
# ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
2517
fast/forms/month-multiple-fields
2517
fast/forms/time-multiple-fields
2518
fast/forms/time-multiple-fields
2518
2519
2519
# Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=84286
2520
# Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=84286

Return to Bug 97299