Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp

Issue 460343004: Fix update of validity cache value, so that it reflects the correct state of any FormControlElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 if (DateTimeEditElement* edit = dateTimeEditElement()) 487 if (DateTimeEditElement* edit = dateTimeEditElement())
488 return edit->valueAsDateTimeFieldsState().saveFormControlState(); 488 return edit->valueAsDateTimeFieldsState().saveFormControlState();
489 return FormControlState(); 489 return FormControlState();
490 } 490 }
491 491
492 void BaseMultipleFieldsDateAndTimeInputType::setValue(const String& sanitizedVal ue, bool valueChanged, TextFieldEventBehavior eventBehavior) 492 void BaseMultipleFieldsDateAndTimeInputType::setValue(const String& sanitizedVal ue, bool valueChanged, TextFieldEventBehavior eventBehavior)
493 { 493 {
494 InputType::setValue(sanitizedValue, valueChanged, eventBehavior); 494 InputType::setValue(sanitizedValue, valueChanged, eventBehavior);
495 DateTimeEditElement* edit = dateTimeEditElement(); 495 DateTimeEditElement* edit = dateTimeEditElement();
496 if (valueChanged || (sanitizedValue.isEmpty() && edit && edit->anyEditableFi eldsHaveValues())) { 496 if (valueChanged || (sanitizedValue.isEmpty() && edit && edit->anyEditableFi eldsHaveValues())) {
497 element().setNeedsValidityCheck();
497 element().updateView(); 498 element().updateView();
498 element().setNeedsValidityCheck();
499 } 499 }
500 } 500 }
501 501
502 void BaseMultipleFieldsDateAndTimeInputType::stepAttributeChanged() 502 void BaseMultipleFieldsDateAndTimeInputType::stepAttributeChanged()
503 { 503 {
504 updateView(); 504 updateView();
505 } 505 }
506 506
507 void BaseMultipleFieldsDateAndTimeInputType::updateView() 507 void BaseMultipleFieldsDateAndTimeInputType::updateView()
508 { 508 {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject() 628 AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject()
629 { 629 {
630 if (PickerIndicatorElement* picker = pickerIndicatorElement()) 630 if (PickerIndicatorElement* picker = pickerIndicatorElement())
631 return picker->popupRootAXObject(); 631 return picker->popupRootAXObject();
632 return 0; 632 return 0;
633 } 633 }
634 634
635 } // namespace blink 635 } // namespace blink
636 636
637 #endif 637 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698