| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 float DateTimeFieldElement::maximumWidth(const Font&) | 199 float DateTimeFieldElement::maximumWidth(const Font&) |
| 200 { | 200 { |
| 201 const float paddingLeftAndRight = 2; // This should match to html.css. | 201 const float paddingLeftAndRight = 2; // This should match to html.css. |
| 202 return paddingLeftAndRight; | 202 return paddingLeftAndRight; |
| 203 } | 203 } |
| 204 | 204 |
| 205 void DateTimeFieldElement::setDisabled() | 205 void DateTimeFieldElement::setDisabled() |
| 206 { | 206 { |
| 207 // Set HTML attribute disabled to change apperance. | 207 // Set HTML attribute disabled to change apperance. |
| 208 setBooleanAttribute(disabledAttr, true); | 208 setBooleanAttribute(disabledAttr, true); |
| 209 setNeedsStyleRecalc(); | 209 setNeedsStyleRecalc(SubtreeStyleChange); |
| 210 } | 210 } |
| 211 | 211 |
| 212 bool DateTimeFieldElement::supportsFocus() const | 212 bool DateTimeFieldElement::supportsFocus() const |
| 213 { | 213 { |
| 214 return !isDisabled() && !isFieldOwnerDisabled(); | 214 return !isDisabled() && !isFieldOwnerDisabled(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior) | 217 void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior) |
| 218 { | 218 { |
| 219 Text* const textNode = toText(firstChild()); | 219 Text* const textNode = toText(firstChild()); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 int DateTimeFieldElement::valueForARIAValueNow() const | 239 int DateTimeFieldElement::valueForARIAValueNow() const |
| 240 { | 240 { |
| 241 return valueAsInteger(); | 241 return valueAsInteger(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace WebCore | 244 } // namespace WebCore |
| 245 | 245 |
| 246 #endif | 246 #endif |
| OLD | NEW |