OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 void BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged() | 178 void BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged() |
179 { | 179 { |
180 RefPtr<HTMLInputElement> input(element()); | 180 RefPtr<HTMLInputElement> input(element()); |
181 String oldValue = input->value(); | 181 String oldValue = input->value(); |
182 String newValue = sanitizeValue(dateTimeEditElement()->value()); | 182 String newValue = sanitizeValue(dateTimeEditElement()->value()); |
183 // Even if oldValue is null and newValue is "", we should assume they are sa
me. | 183 // Even if oldValue is null and newValue is "", we should assume they are sa
me. |
184 if ((oldValue.isEmpty() && newValue.isEmpty()) || oldValue == newValue) { | 184 if ((oldValue.isEmpty() && newValue.isEmpty()) || oldValue == newValue) { |
185 input->setNeedsValidityCheck(); | 185 input->setNeedsValidityCheck(); |
186 } else { | 186 } else { |
187 input->setValueInternal(newValue, DispatchNoEvent); | 187 input->setValueInternal(newValue, DispatchNoEvent); |
188 input->setNeedsStyleRecalc(); | 188 input->setNeedsStyleRecalc(SubtreeStyleChange); |
189 input->dispatchFormControlInputEvent(); | 189 input->dispatchFormControlInputEvent(); |
190 } | 190 } |
191 input->notifyFormStateChanged(); | 191 input->notifyFormStateChanged(); |
192 input->updateClearButtonVisibility(); | 192 input->updateClearButtonVisibility(); |
193 } | 193 } |
194 | 194 |
195 bool BaseMultipleFieldsDateAndTimeInputType::hasCustomFocusLogic() const | 195 bool BaseMultipleFieldsDateAndTimeInputType::hasCustomFocusLogic() const |
196 { | 196 { |
197 return false; | 197 return false; |
198 } | 198 } |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 clearButton->setInlineStyleProperty(CSSPropertyPointerEvents, CSSValueNo
ne); | 612 clearButton->setInlineStyleProperty(CSSPropertyPointerEvents, CSSValueNo
ne); |
613 } else { | 613 } else { |
614 clearButton->removeInlineStyleProperty(CSSPropertyOpacity); | 614 clearButton->removeInlineStyleProperty(CSSPropertyOpacity); |
615 clearButton->removeInlineStyleProperty(CSSPropertyPointerEvents); | 615 clearButton->removeInlineStyleProperty(CSSPropertyPointerEvents); |
616 } | 616 } |
617 } | 617 } |
618 | 618 |
619 } // namespace WebCore | 619 } // namespace WebCore |
620 | 620 |
621 #endif | 621 #endif |
OLD | NEW |