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

Side by Side Diff: public/web/WebDateTimeChooserParams.h

Issue 23623017: Prepare for date/time input datalist support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed Created 7 years 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/web/web.gypi ('k') | public/web/WebDateTimeSuggestion.h » ('j') | 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 12 matching lines...) Expand all
23 * SUCH DAMAGE. 23 * SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef WebDateTimeChooserParams_h 26 #ifndef WebDateTimeChooserParams_h
27 #define WebDateTimeChooserParams_h 27 #define WebDateTimeChooserParams_h
28 28
29 #include "../platform/WebRect.h" 29 #include "../platform/WebRect.h"
30 #include "../platform/WebString.h" 30 #include "../platform/WebString.h"
31 #include "../platform/WebVector.h" 31 #include "../platform/WebVector.h"
32 #include "WebDateTimeInputType.h" 32 #include "WebDateTimeInputType.h"
33 #include "WebDateTimeSuggestion.h"
33 34
34 namespace blink { 35 namespace blink {
35 36
36 // This class conveys various information to make date/time chooser UI. 37 // This class conveys various information to make date/time chooser UI.
37 // See WebViewClient::openDateTimeChooser. 38 // See WebViewClient::openDateTimeChooser.
38 struct WebDateTimeChooserParams { 39 struct WebDateTimeChooserParams {
39 // The type of chooser to show. 40 // The type of chooser to show.
40 WebDateTimeInputType type; 41 WebDateTimeInputType type;
41 // Bounding rectangle of the requester element. 42 // Bounding rectangle of the requester element.
42 WebRect anchorRectInScreen; 43 WebRect anchorRectInScreen;
43 // The current value of the requester element. 44 // The current value of the requester element.
44 // FIXME: Remove. Deprecated in favor of doubleValue. 45 // FIXME: Remove. Deprecated in favor of doubleValue.
45 WebString currentValue; 46 WebString currentValue;
46 // The current value of the requester element as a double. 47 // The current value of the requester element as a double.
47 // NaN means empty value. Should not be infinity. 48 // NaN means empty value. Should not be infinity.
48 double doubleValue; 49 double doubleValue;
49 // <datalist> option values associated to the requester element. These 50 // <datalist> option suggestions associated to the requester element. The
50 // values should not be shown to users. The vector size might be 0. 51 // vector size might be 0.
51 WebVector<WebString> suggestionValues; 52 WebVector<WebDateTimeSuggestion> suggestions;
52 // Localized values of <datalist> options associated to the requester
53 // element. These values should be shown to users. The vector size must be
54 // same as suggestionValues size.
55 WebVector<WebString> localizedSuggestionValues;
56 // <datalist> option labels associated to the requester element. These
57 // values should be shown to users. The vector size must be same as
58 // suggestionValues size.
59 WebVector<WebString> suggestionLabels;
60 // HTMLInputElement::min attribute value parsed in the valusAsNumber rule, 53 // HTMLInputElement::min attribute value parsed in the valusAsNumber rule,
61 // that is to say, milliseconds from the epoch for non-month types and 54 // that is to say, milliseconds from the epoch for non-month types and
62 // months from the epoch for month type. If the min attribute is missing, 55 // months from the epoch for month type. If the min attribute is missing,
63 // this field has the hard minimum limit. 56 // this field has the hard minimum limit.
64 double minimum; 57 double minimum;
65 // Similar to minimum. 58 // Similar to minimum.
66 double maximum; 59 double maximum;
67 // Step value represented in milliseconds for non-month types, and 60 // Step value represented in milliseconds for non-month types, and
68 // represetnted in months for month type. 61 // represetnted in months for month type.
69 double step; 62 double step;
(...skipping 11 matching lines...) Expand all
81 , stepBase(0) 74 , stepBase(0)
82 , isRequired(false) 75 , isRequired(false)
83 , isAnchorElementRTL(false) 76 , isAnchorElementRTL(false)
84 { 77 {
85 } 78 }
86 }; 79 };
87 80
88 } // namespace blink 81 } // namespace blink
89 82
90 #endif 83 #endif
OLDNEW
« no previous file with comments | « Source/web/web.gypi ('k') | public/web/WebDateTimeSuggestion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698