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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 if (DateTimeEditElement* edit = dateTimeEditElement()) | 482 if (DateTimeEditElement* edit = dateTimeEditElement()) |
483 return edit->valueAsDateTimeFieldsState().saveFormControlState(); | 483 return edit->valueAsDateTimeFieldsState().saveFormControlState(); |
484 return FormControlState(); | 484 return FormControlState(); |
485 } | 485 } |
486 | 486 |
487 void BaseMultipleFieldsDateAndTimeInputType::setValue(const String& sanitizedVal
ue, bool valueChanged, TextFieldEventBehavior eventBehavior) | 487 void BaseMultipleFieldsDateAndTimeInputType::setValue(const String& sanitizedVal
ue, bool valueChanged, TextFieldEventBehavior eventBehavior) |
488 { | 488 { |
489 InputType::setValue(sanitizedValue, valueChanged, eventBehavior); | 489 InputType::setValue(sanitizedValue, valueChanged, eventBehavior); |
490 DateTimeEditElement* edit = dateTimeEditElement(); | 490 DateTimeEditElement* edit = dateTimeEditElement(); |
491 if (valueChanged || (sanitizedValue.isEmpty() && edit && edit->anyEditableFi
eldsHaveValues())) { | 491 if (valueChanged || (sanitizedValue.isEmpty() && edit && edit->anyEditableFi
eldsHaveValues())) { |
| 492 element().setNeedsValidityCheck(); |
492 element().updateView(); | 493 element().updateView(); |
493 element().setNeedsValidityCheck(); | |
494 } | 494 } |
495 } | 495 } |
496 | 496 |
497 void BaseMultipleFieldsDateAndTimeInputType::stepAttributeChanged() | 497 void BaseMultipleFieldsDateAndTimeInputType::stepAttributeChanged() |
498 { | 498 { |
499 updateView(); | 499 updateView(); |
500 } | 500 } |
501 | 501 |
502 void BaseMultipleFieldsDateAndTimeInputType::updateView() | 502 void BaseMultipleFieldsDateAndTimeInputType::updateView() |
503 { | 503 { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 } | 616 } |
617 | 617 |
618 TextDirection BaseMultipleFieldsDateAndTimeInputType::computedTextDirection() | 618 TextDirection BaseMultipleFieldsDateAndTimeInputType::computedTextDirection() |
619 { | 619 { |
620 return element().locale().isRTL() ? RTL : LTR; | 620 return element().locale().isRTL() ? RTL : LTR; |
621 } | 621 } |
622 | 622 |
623 } // namespace blink | 623 } // namespace blink |
624 | 624 |
625 #endif | 625 #endif |
OLD | NEW |