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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 float DateTimeFieldElement::maximumWidth(const Font&) | 195 float DateTimeFieldElement::maximumWidth(const Font&) |
196 { | 196 { |
197 const float paddingLeftAndRight = 2; // This should match to html.css. | 197 const float paddingLeftAndRight = 2; // This should match to html.css. |
198 return paddingLeftAndRight; | 198 return paddingLeftAndRight; |
199 } | 199 } |
200 | 200 |
201 void DateTimeFieldElement::setDisabled() | 201 void DateTimeFieldElement::setDisabled() |
202 { | 202 { |
203 // Set HTML attribute disabled to change apperance. | 203 // Set HTML attribute disabled to change apperance. |
204 setBooleanAttribute(disabledAttr, true); | 204 setBooleanAttribute(disabledAttr, true); |
205 setNeedsStyleRecalc(SubtreeStyleChange); | 205 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::createW
ithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Disabled)); |
206 } | 206 } |
207 | 207 |
208 bool DateTimeFieldElement::supportsFocus() const | 208 bool DateTimeFieldElement::supportsFocus() const |
209 { | 209 { |
210 return !isDisabled() && !isFieldOwnerDisabled(); | 210 return !isDisabled() && !isFieldOwnerDisabled(); |
211 } | 211 } |
212 | 212 |
213 void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior) | 213 void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior) |
214 { | 214 { |
215 Text* const textNode = toText(firstChild()); | 215 Text* const textNode = toText(firstChild()); |
(...skipping 17 matching lines...) Expand all Loading... |
233 } | 233 } |
234 | 234 |
235 int DateTimeFieldElement::valueForARIAValueNow() const | 235 int DateTimeFieldElement::valueForARIAValueNow() const |
236 { | 236 { |
237 return valueAsInteger(); | 237 return valueAsInteger(); |
238 } | 238 } |
239 | 239 |
240 } // namespace blink | 240 } // namespace blink |
241 | 241 |
242 #endif | 242 #endif |
OLD | NEW |