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

Side by Side Diff: Source/WebCore/html/DateTimeFieldsState.h

Issue 11421028: Merge 135131 - input.value="" should clear date/time input elements with partial values (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.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) 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 bool hasAMPM() const { return m_ampm != AMPMValueEmpty; } 68 bool hasAMPM() const { return m_ampm != AMPMValueEmpty; }
69 bool hasDayOfMonth() const { return m_dayOfMonth != emptyValue; } 69 bool hasDayOfMonth() const { return m_dayOfMonth != emptyValue; }
70 bool hasHour() const { return m_hour != emptyValue; } 70 bool hasHour() const { return m_hour != emptyValue; }
71 bool hasMillisecond() const { return m_millisecond != emptyValue; } 71 bool hasMillisecond() const { return m_millisecond != emptyValue; }
72 bool hasMinute() const { return m_minute != emptyValue; } 72 bool hasMinute() const { return m_minute != emptyValue; }
73 bool hasMonth() const { return m_month != emptyValue; } 73 bool hasMonth() const { return m_month != emptyValue; }
74 bool hasSecond() const { return m_second != emptyValue; } 74 bool hasSecond() const { return m_second != emptyValue; }
75 bool hasWeekOfYear() const { return m_weekOfYear != emptyValue; } 75 bool hasWeekOfYear() const { return m_weekOfYear != emptyValue; }
76 bool hasYear() const { return m_year != emptyValue; } 76 bool hasYear() const { return m_year != emptyValue; }
77 bool hasAnyValue() const { return hasAMPM() || hasDayOfMonth() || hasHour() || hasMillisecond() || hasMinute() || hasMonth() || hasSecond() || hasWeekOfYear () || hasYear(); }
77 78
78 void setAMPM(AMPMValue ampm) { m_ampm = ampm; } 79 void setAMPM(AMPMValue ampm) { m_ampm = ampm; }
79 void setDayOfMonth(unsigned dayOfMonth) { m_dayOfMonth = dayOfMonth; } 80 void setDayOfMonth(unsigned dayOfMonth) { m_dayOfMonth = dayOfMonth; }
80 void setHour(unsigned hour12) { m_hour = hour12; } 81 void setHour(unsigned hour12) { m_hour = hour12; }
81 void setMillisecond(unsigned millisecond) { m_millisecond = millisecond; } 82 void setMillisecond(unsigned millisecond) { m_millisecond = millisecond; }
82 void setMinute(unsigned minute) { m_minute = minute; } 83 void setMinute(unsigned minute) { m_minute = minute; }
83 void setMonth(unsigned month) { m_month = month; } 84 void setMonth(unsigned month) { m_month = month; }
84 void setSecond(unsigned second) { m_second = second; } 85 void setSecond(unsigned second) { m_second = second; }
85 void setWeekOfYear(unsigned weekOfYear) { m_weekOfYear = weekOfYear; } 86 void setWeekOfYear(unsigned weekOfYear) { m_weekOfYear = weekOfYear; }
86 void setYear(unsigned year) { m_year = year; } 87 void setYear(unsigned year) { m_year = year; }
87 88
88 private: 89 private:
89 unsigned m_year; 90 unsigned m_year;
90 unsigned m_month; // 1 to 12. 91 unsigned m_month; // 1 to 12.
91 unsigned m_dayOfMonth; 92 unsigned m_dayOfMonth;
92 unsigned m_hour; // 1 to 12. 93 unsigned m_hour; // 1 to 12.
93 unsigned m_minute; 94 unsigned m_minute;
94 unsigned m_second; 95 unsigned m_second;
95 unsigned m_millisecond; 96 unsigned m_millisecond;
96 unsigned m_weekOfYear; 97 unsigned m_weekOfYear;
97 AMPMValue m_ampm; 98 AMPMValue m_ampm;
98 }; 99 };
99 100
100 } // namespace WebCore 101 } // namespace WebCore
101 102
102 #endif 103 #endif
103 #endif 104 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698