| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 void DateTimeLocalInputType::countUsage() { | 55 void DateTimeLocalInputType::countUsage() { |
| 56 countUsageIfVisible(UseCounter::InputTypeDateTimeLocal); | 56 countUsageIfVisible(UseCounter::InputTypeDateTimeLocal); |
| 57 } | 57 } |
| 58 | 58 |
| 59 const AtomicString& DateTimeLocalInputType::formControlType() const { | 59 const AtomicString& DateTimeLocalInputType::formControlType() const { |
| 60 return InputTypeNames::datetime_local; | 60 return InputTypeNames::datetime_local; |
| 61 } | 61 } |
| 62 | 62 |
| 63 double DateTimeLocalInputType::valueAsDate() const { | 63 double DateTimeLocalInputType::valueAsDate() const { |
| 64 // valueAsDate doesn't work for the datetime-local type according to the stand
ard. | 64 // valueAsDate doesn't work for the datetime-local type according to the |
| 65 // standard. |
| 65 return DateComponents::invalidMilliseconds(); | 66 return DateComponents::invalidMilliseconds(); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void DateTimeLocalInputType::setValueAsDate( | 69 void DateTimeLocalInputType::setValueAsDate( |
| 69 double value, | 70 double value, |
| 70 ExceptionState& exceptionState) const { | 71 ExceptionState& exceptionState) const { |
| 71 // valueAsDate doesn't work for the datetime-local type according to the stand
ard. | 72 // valueAsDate doesn't work for the datetime-local type according to the |
| 73 // standard. |
| 72 InputType::setValueAsDate(value, exceptionState); | 74 InputType::setValueAsDate(value, exceptionState); |
| 73 } | 75 } |
| 74 | 76 |
| 75 StepRange DateTimeLocalInputType::createStepRange( | 77 StepRange DateTimeLocalInputType::createStepRange( |
| 76 AnyStepHandling anyStepHandling) const { | 78 AnyStepHandling anyStepHandling) const { |
| 77 DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, | 79 DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, |
| 78 (dateTimeLocalDefaultStep, dateTimeLocalDefaultStepBase, | 80 (dateTimeLocalDefaultStep, dateTimeLocalDefaultStepBase, |
| 79 dateTimeLocalStepScaleFactor, | 81 dateTimeLocalStepScaleFactor, |
| 80 StepRange::ScaledStepValueShouldBeInteger)); | 82 StepRange::ScaledStepValueShouldBeInteger)); |
| 81 | 83 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 bool hasWeek, | 186 bool hasWeek, |
| 185 bool hasDay, | 187 bool hasDay, |
| 186 bool hasAMPM, | 188 bool hasAMPM, |
| 187 bool hasHour, | 189 bool hasHour, |
| 188 bool hasMinute, | 190 bool hasMinute, |
| 189 bool hasSecond) const { | 191 bool hasSecond) const { |
| 190 return hasYear && hasMonth && hasDay && hasAMPM && hasHour && hasMinute; | 192 return hasYear && hasMonth && hasDay && hasAMPM && hasHour && hasMinute; |
| 191 } | 193 } |
| 192 | 194 |
| 193 } // namespace blink | 195 } // namespace blink |
| OLD | NEW |