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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
694 return m_editControlOwner ? m_editControlOwner->localeIdentifier() : nullAto m; | 694 return m_editControlOwner ? m_editControlOwner->localeIdentifier() : nullAto m; |
695 } | 695 } |
696 | 696 |
697 void DateTimeEditElement::readOnlyStateChanged() | 697 void DateTimeEditElement::readOnlyStateChanged() |
698 { | 698 { |
699 updateUIState(); | 699 updateUIState(); |
700 } | 700 } |
701 | 701 |
702 void DateTimeEditElement::resetFields() | 702 void DateTimeEditElement::resetFields() |
703 { | 703 { |
704 didBlurFromField(); | |
tkent
2014/03/11 04:41:58
I don't think this works fine. This looks we loos
| |
704 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) | 705 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) |
705 m_fields[fieldIndex]->removeEventHandler(); | 706 m_fields[fieldIndex]->removeEventHandler(); |
706 m_fields.shrink(0); | 707 m_fields.shrink(0); |
707 } | 708 } |
708 | 709 |
709 void DateTimeEditElement::defaultEventHandler(Event* event) | 710 void DateTimeEditElement::defaultEventHandler(Event* event) |
710 { | 711 { |
711 // In case of control owner forward event to control, e.g. DOM | 712 // In case of control owner forward event to control, e.g. DOM |
712 // dispatchEvent method. | 713 // dispatchEvent method. |
713 if (DateTimeFieldElement* field = focusedField()) { | 714 if (DateTimeFieldElement* field = focusedField()) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
790 { | 791 { |
791 DateTimeFieldsState dateTimeFieldsState; | 792 DateTimeFieldsState dateTimeFieldsState; |
792 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) | 793 for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) |
793 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState); | 794 m_fields[fieldIndex]->populateDateTimeFieldsState(dateTimeFieldsState); |
794 return dateTimeFieldsState; | 795 return dateTimeFieldsState; |
795 } | 796 } |
796 | 797 |
797 } // namespace WebCore | 798 } // namespace WebCore |
798 | 799 |
799 #endif | 800 #endif |
OLD | NEW |