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

Side by Side Diff: Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp

Issue 12045062: Merge 140385 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 bool BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrRea dOnly() const 135 bool BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrRea dOnly() const
136 { 136 {
137 return element()->isDisabledOrReadOnly(); 137 return element()->isDisabledOrReadOnly();
138 } 138 }
139 139
140 void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(const St ring& value) 140 void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(const St ring& value)
141 { 141 {
142 if (element()->isValidValue(value)) { 142 if (element()->isValidValue(value)) {
143 element()->setValue(value, DispatchChangeEvent); 143 element()->setValue(value, DispatchInputAndChangeEvent);
144 return; 144 return;
145 } 145 }
146 146
147 if (!m_dateTimeEditElement) 147 if (!m_dateTimeEditElement)
148 return; 148 return;
149 DateComponents date; 149 DateComponents date;
150 unsigned end; 150 unsigned end;
151 if (date.parseDate(value.characters(), value.length(), 0, end) && end == val ue.length()) 151 if (date.parseDate(value.characters(), value.length(), 0, end) && end == val ue.length())
152 m_dateTimeEditElement->setOnlyYearMonthDay(date); 152 m_dateTimeEditElement->setOnlyYearMonthDay(date);
153 } 153 }
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 { 441 {
442 StepRange stepRange = createStepRange(AnyIsDefaultStep); 442 StepRange stepRange = createStepRange(AnyIsDefaultStep);
443 return date.second() || date.millisecond() 443 return date.second() || date.millisecond()
444 || !stepRange.minimum().remainder(static_cast<int>(msPerMinute)).isZero( ) 444 || !stepRange.minimum().remainder(static_cast<int>(msPerMinute)).isZero( )
445 || !stepRange.step().remainder(static_cast<int>(msPerMinute)).isZero(); 445 || !stepRange.step().remainder(static_cast<int>(msPerMinute)).isZero();
446 } 446 }
447 447
448 } // namespace WebCore 448 } // namespace WebCore
449 449
450 #endif 450 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp ('k') | Source/WebCore/html/InputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698