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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 } | 655 } |
656 | 656 |
657 bool DateTimeEditElement::isReadOnly() const | 657 bool DateTimeEditElement::isReadOnly() const |
658 { | 658 { |
659 return m_editControlOwner && m_editControlOwner->isEditControlOwnerReadOnly(
); | 659 return m_editControlOwner && m_editControlOwner->isEditControlOwnerReadOnly(
); |
660 } | 660 } |
661 | 661 |
662 void DateTimeEditElement::layout(const LayoutParameters& layoutParameters, const
DateComponents& dateValue) | 662 void DateTimeEditElement::layout(const LayoutParameters& layoutParameters, const
DateComponents& dateValue) |
663 { | 663 { |
664 DEFINE_STATIC_LOCAL(AtomicString, fieldsWrapperPseudoId, ("-webkit-datetime-
edit-fields-wrapper", AtomicString::ConstructFromLiteral)); | 664 DEFINE_STATIC_LOCAL(AtomicString, fieldsWrapperPseudoId, ("-webkit-datetime-
edit-fields-wrapper", AtomicString::ConstructFromLiteral)); |
665 if (!firstChild()) { | 665 if (!hasChildren()) { |
666 RefPtrWillBeRawPtr<HTMLDivElement> element = HTMLDivElement::create(docu
ment()); | 666 RefPtrWillBeRawPtr<HTMLDivElement> element = HTMLDivElement::create(docu
ment()); |
667 element->setShadowPseudoId(fieldsWrapperPseudoId); | 667 element->setShadowPseudoId(fieldsWrapperPseudoId); |
668 appendChild(element.get()); | 668 appendChild(element.get()); |
669 } | 669 } |
670 Element* fieldsWrapper = fieldsWrapperElement(); | 670 Element* fieldsWrapper = fieldsWrapperElement(); |
671 | 671 |
672 size_t focusedFieldIndex = this->focusedFieldIndex(); | 672 size_t focusedFieldIndex = this->focusedFieldIndex(); |
673 DateTimeFieldElement* const focusedField = fieldAt(focusedFieldIndex); | 673 DateTimeFieldElement* const focusedField = fieldAt(focusedFieldIndex); |
674 const AtomicString focusedFieldId = focusedField ? focusedField->shadowPseud
oId() : nullAtom; | 674 const AtomicString focusedFieldId = focusedField ? focusedField->shadowPseud
oId() : nullAtom; |
675 | 675 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 { | 808 { |
809 DateTimeFieldsState dateTimeFieldsState; | 809 DateTimeFieldsState dateTimeFieldsState; |
810 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) | 810 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) |
811 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState); | 811 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState); |
812 return dateTimeFieldsState; | 812 return dateTimeFieldsState; |
813 } | 813 } |
814 | 814 |
815 } // namespace blink | 815 } // namespace blink |
816 | 816 |
817 #endif | 817 #endif |
OLD | NEW |