| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/html/forms/InputType.h" | 34 #include "core/html/forms/InputType.h" |
| 35 #include "platform/DateComponents.h" | 35 #include "platform/DateComponents.h" |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 class ExceptionState; | 39 class ExceptionState; |
| 40 | 40 |
| 41 // A super class of date, datetime, datetime-local, month, time, and week types. | 41 // A super class of date, datetime, datetime-local, month, time, and week types. |
| 42 class BaseDateAndTimeInputType : public InputType { | 42 class BaseDateAndTimeInputType : public InputType { |
| 43 protected: | 43 protected: |
| 44 BaseDateAndTimeInputType(HTMLInputElement* element) : InputType(element) { } | 44 BaseDateAndTimeInputType(HTMLInputElement& element) : InputType(element) { } |
| 45 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE; | 45 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE; |
| 46 virtual bool parseToDateComponents(const String&, DateComponents*) const OVE
RRIDE; | 46 virtual bool parseToDateComponents(const String&, DateComponents*) const OVE
RRIDE; |
| 47 virtual String sanitizeValue(const String&) const OVERRIDE; | 47 virtual String sanitizeValue(const String&) const OVERRIDE; |
| 48 virtual String serialize(const Decimal&) const OVERRIDE; | 48 virtual String serialize(const Decimal&) const OVERRIDE; |
| 49 String serializeWithComponents(const DateComponents&) const; | 49 String serializeWithComponents(const DateComponents&) const; |
| 50 virtual bool setMillisecondToDateComponents(double, DateComponents*) const =
0; | 50 virtual bool setMillisecondToDateComponents(double, DateComponents*) const =
0; |
| 51 virtual String visibleValue() const OVERRIDE; | 51 virtual String visibleValue() const OVERRIDE; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 virtual bool parseToDateComponentsInternal(const String&, DateComponents*) c
onst = 0; | 54 virtual bool parseToDateComponentsInternal(const String&, DateComponents*) c
onst = 0; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 66 virtual bool isSteppable() const OVERRIDE; | 66 virtual bool isSteppable() const OVERRIDE; |
| 67 virtual String serializeWithMilliseconds(double) const; | 67 virtual String serializeWithMilliseconds(double) const; |
| 68 virtual String localizeValue(const String&) const OVERRIDE; | 68 virtual String localizeValue(const String&) const OVERRIDE; |
| 69 virtual bool supportsReadOnly() const OVERRIDE; | 69 virtual bool supportsReadOnly() const OVERRIDE; |
| 70 virtual bool shouldRespectListAttribute() OVERRIDE; | 70 virtual bool shouldRespectListAttribute() OVERRIDE; |
| 71 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; | 71 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace WebCore | 74 } // namespace WebCore |
| 75 #endif // BaseDateAndTimeInputType_h | 75 #endif // BaseDateAndTimeInputType_h |
| OLD | NEW |