Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: Source/core/html/forms/BaseDateAndTimeInputType.h

Issue 27746003: Have InputType factories take an HTMLInputElement reference in parameter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/forms/BaseClickableWithKeyInputType.cpp ('k') | Source/core/html/forms/BaseDateAndTimeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698