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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 focusOnNextField(); | 155 focusOnNextField(); |
156 | 156 |
157 keyboardEvent->setDefaultHandled(); | 157 keyboardEvent->setDefaultHandled(); |
158 } | 158 } |
159 | 159 |
160 bool DateTimeNumericFieldElement::hasValue() const | 160 bool DateTimeNumericFieldElement::hasValue() const |
161 { | 161 { |
162 return m_hasValue; | 162 return m_hasValue; |
163 } | 163 } |
164 | 164 |
| 165 void DateTimeNumericFieldElement::initialize(const AtomicString& pseudo, const S
tring& axHelpText) |
| 166 { |
| 167 DateTimeFieldElement::initialize(pseudo, axHelpText, m_range.minimum, m_rang
e.maximum); |
| 168 } |
| 169 |
165 int DateTimeNumericFieldElement::maximum() const | 170 int DateTimeNumericFieldElement::maximum() const |
166 { | 171 { |
167 return m_range.maximum; | 172 return m_range.maximum; |
168 } | 173 } |
169 | 174 |
170 int DateTimeNumericFieldElement::minimum() const | |
171 { | |
172 return m_range.minimum; | |
173 } | |
174 | |
175 void DateTimeNumericFieldElement::setEmptyValue(EventBehavior eventBehavior) | 175 void DateTimeNumericFieldElement::setEmptyValue(EventBehavior eventBehavior) |
176 { | 176 { |
177 if (isReadOnly()) | 177 if (isReadOnly()) |
178 return; | 178 return; |
179 | 179 |
180 m_hasValue = false; | 180 m_hasValue = false; |
181 m_value = 0; | 181 m_value = 0; |
182 m_typeAheadBuffer.clear(); | 182 m_typeAheadBuffer.clear(); |
183 updateVisibleValue(eventBehavior); | 183 updateVisibleValue(eventBehavior); |
184 } | 184 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 if (n >= 0) | 248 if (n >= 0) |
249 n = (n + m_step - 1) / m_step * m_step; | 249 n = (n + m_step - 1) / m_step * m_step; |
250 else | 250 else |
251 n = -(-n / m_step * m_step); | 251 n = -(-n / m_step * m_step); |
252 return n + m_stepBase; | 252 return n + m_stepBase; |
253 } | 253 } |
254 | 254 |
255 } // namespace WebCore | 255 } // namespace WebCore |
256 | 256 |
257 #endif | 257 #endif |
OLD | NEW |