| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 } | 329 } |
| 330 return false; | 330 return false; |
| 331 } | 331 } |
| 332 | 332 |
| 333 bool DateTimeEditElement::isDisabled() const | 333 bool DateTimeEditElement::isDisabled() const |
| 334 { | 334 { |
| 335 return m_editControlOwner && m_editControlOwner->isEditControlOwnerDisabled(
); | 335 return m_editControlOwner && m_editControlOwner->isEditControlOwnerDisabled(
); |
| 336 } | 336 } |
| 337 | 337 |
| 338 bool DateTimeEditElement::isFieldOwnerDisabledOrReadOnly() const |
| 339 { |
| 340 return isDisabled() || isReadOnly(); |
| 341 } |
| 342 |
| 338 bool DateTimeEditElement::isReadOnly() const | 343 bool DateTimeEditElement::isReadOnly() const |
| 339 { | 344 { |
| 340 return m_editControlOwner && m_editControlOwner->isEditControlOwnerReadOnly(
); | 345 return m_editControlOwner && m_editControlOwner->isEditControlOwnerReadOnly(
); |
| 341 } | 346 } |
| 342 | 347 |
| 343 void DateTimeEditElement::layout(const StepRange& stepRange, const DateComponent
s& dateValue, Localizer& localizer) | 348 void DateTimeEditElement::layout(const StepRange& stepRange, const DateComponent
s& dateValue, Localizer& localizer) |
| 344 { | 349 { |
| 345 size_t focusedFieldIndex = this->focusedFieldIndex(); | 350 size_t focusedFieldIndex = this->focusedFieldIndex(); |
| 346 DateTimeFieldElement* const focusedField = fieldAt(focusedFieldIndex); | 351 DateTimeFieldElement* const focusedField = fieldAt(focusedFieldIndex); |
| 347 const AtomicString focusedFieldId = focusedField ? focusedField->shadowPseud
oId() : nullAtom; | 352 const AtomicString focusedFieldId = focusedField ? focusedField->shadowPseud
oId() : nullAtom; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 return std::numeric_limits<double>::quiet_NaN(); | 484 return std::numeric_limits<double>::quiet_NaN(); |
| 480 value += field->valueAsDouble(); | 485 value += field->valueAsDouble(); |
| 481 } | 486 } |
| 482 | 487 |
| 483 return value; | 488 return value; |
| 484 } | 489 } |
| 485 | 490 |
| 486 } // namespace WebCore | 491 } // namespace WebCore |
| 487 | 492 |
| 488 #endif | 493 #endif |
| OLD | NEW |