OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 | 134 |
135 bool BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrRea
dOnly() const | 135 bool BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrRea
dOnly() const |
136 { | 136 { |
137 return element()->isDisabledOrReadOnly(); | 137 return element()->isDisabledOrReadOnly(); |
138 } | 138 } |
139 | 139 |
140 void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(const St
ring& value) | 140 void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(const St
ring& value) |
141 { | 141 { |
142 if (element()->isValidValue(value)) { | 142 if (element()->isValidValue(value)) { |
143 element()->setValue(value, DispatchChangeEvent); | 143 element()->setValue(value, DispatchInputAndChangeEvent); |
144 return; | 144 return; |
145 } | 145 } |
146 | 146 |
147 if (!m_dateTimeEditElement) | 147 if (!m_dateTimeEditElement) |
148 return; | 148 return; |
149 DateComponents date; | 149 DateComponents date; |
150 unsigned end; | 150 unsigned end; |
151 if (date.parseDate(value.characters(), value.length(), 0, end) && end == val
ue.length()) | 151 if (date.parseDate(value.characters(), value.length(), 0, end) && end == val
ue.length()) |
152 m_dateTimeEditElement->setOnlyYearMonthDay(date); | 152 m_dateTimeEditElement->setOnlyYearMonthDay(date); |
153 } | 153 } |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 { | 441 { |
442 StepRange stepRange = createStepRange(AnyIsDefaultStep); | 442 StepRange stepRange = createStepRange(AnyIsDefaultStep); |
443 return date.second() || date.millisecond() | 443 return date.second() || date.millisecond() |
444 || !stepRange.minimum().remainder(static_cast<int>(msPerMinute)).isZero(
) | 444 || !stepRange.minimum().remainder(static_cast<int>(msPerMinute)).isZero(
) |
445 || !stepRange.step().remainder(static_cast<int>(msPerMinute)).isZero(); | 445 || !stepRange.step().remainder(static_cast<int>(msPerMinute)).isZero(); |
446 } | 446 } |
447 | 447 |
448 } // namespace WebCore | 448 } // namespace WebCore |
449 | 449 |
450 #endif | 450 #endif |
OLD | NEW |