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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 | 201 |
202 float DateTimeFieldElement::maximumWidth(const ComputedStyle&) | 202 float DateTimeFieldElement::maximumWidth(const ComputedStyle&) |
203 { | 203 { |
204 const float paddingLeftAndRight = 2; // This should match to html.css. | 204 const float paddingLeftAndRight = 2; // This should match to html.css. |
205 return paddingLeftAndRight; | 205 return paddingLeftAndRight; |
206 } | 206 } |
207 | 207 |
208 void DateTimeFieldElement::setDisabled() | 208 void DateTimeFieldElement::setDisabled() |
209 { | 209 { |
210 // Set HTML attribute disabled to change apperance. | 210 // Set HTML attribute disabled to change appearance. |
211 setBooleanAttribute(disabledAttr, true); | 211 setBooleanAttribute(disabledAttr, true); |
212 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::createW
ithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Disabled)); | 212 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::createW
ithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Disabled)); |
213 } | 213 } |
214 | 214 |
215 bool DateTimeFieldElement::supportsFocus() const | 215 bool DateTimeFieldElement::supportsFocus() const |
216 { | 216 { |
217 return !isDisabled() && !isFieldOwnerDisabled(); | 217 return !isDisabled() && !isFieldOwnerDisabled(); |
218 } | 218 } |
219 | 219 |
220 void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior) | 220 void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior) |
(...skipping 19 matching lines...) Expand all Loading... |
240 } | 240 } |
241 | 241 |
242 int DateTimeFieldElement::valueForARIAValueNow() const | 242 int DateTimeFieldElement::valueForARIAValueNow() const |
243 { | 243 { |
244 return valueAsInteger(); | 244 return valueAsInteger(); |
245 } | 245 } |
246 | 246 |
247 } // namespace blink | 247 } // namespace blink |
248 | 248 |
249 #endif | 249 #endif |
OLD | NEW |