OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 Range(int minimum, int maximum) : minimum(minimum), maximum(maximum) { } | 55 Range(int minimum, int maximum) : minimum(minimum), maximum(maximum) { } |
56 int clampValue(int) const; | 56 int clampValue(int) const; |
57 bool isInRange(int) const; | 57 bool isInRange(int) const; |
58 bool isSingleton() const { return minimum == maximum; } | 58 bool isSingleton() const { return minimum == maximum; } |
59 | 59 |
60 int minimum; | 60 int minimum; |
61 int maximum; | 61 int maximum; |
62 }; | 62 }; |
63 | 63 |
64 protected: | 64 protected: |
65 DateTimeNumericFieldElement(Document*, FieldOwner&, const Range&, const Rang
e& hardLimits, const String& placeholder, const Step& = Step()); | 65 DateTimeNumericFieldElement(Document&, FieldOwner&, const Range&, const Rang
e& hardLimits, const String& placeholder, const Step& = Step()); |
66 | 66 |
67 int clampValue(int value) const { return m_range.clampValue(value); } | 67 int clampValue(int value) const { return m_range.clampValue(value); } |
68 virtual int defaultValueForStepDown() const; | 68 virtual int defaultValueForStepDown() const; |
69 virtual int defaultValueForStepUp() const; | 69 virtual int defaultValueForStepUp() const; |
70 const Range& range() const { return m_range; } | 70 const Range& range() const { return m_range; } |
71 | 71 |
72 // DateTimeFieldElement functions. | 72 // DateTimeFieldElement functions. |
73 virtual bool hasValue() const OVERRIDE FINAL; | 73 virtual bool hasValue() const OVERRIDE FINAL; |
74 void initialize(const AtomicString& pseudo, const String& axHelpText); | 74 void initialize(const AtomicString& pseudo, const String& axHelpText); |
75 int maximum() const; | 75 int maximum() const; |
(...skipping 23 matching lines...) Expand all Loading... |
99 const Step m_step; | 99 const Step m_step; |
100 int m_value; | 100 int m_value; |
101 bool m_hasValue; | 101 bool m_hasValue; |
102 mutable StringBuilder m_typeAheadBuffer; | 102 mutable StringBuilder m_typeAheadBuffer; |
103 }; | 103 }; |
104 | 104 |
105 } // namespace WebCore | 105 } // namespace WebCore |
106 | 106 |
107 #endif | 107 #endif |
108 #endif | 108 #endif |
OLD | NEW |