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

Issue 64913002: Transfer date/time value to chooser as double (Closed)

Created:
7 years, 1 month ago by keishi
Modified:
7 years ago
Reviewers:
Miguel Garcia
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@datetime3
Visibility:
Public.

Description

Transfer date/time value to chooser as double BUG=None

Patch Set 1 #

Total comments: 25

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -878 lines) Patch
M content/browser/android/date_time_chooser_android.h View 1 1 chunk +5 lines, -21 lines 0 comments Download
M content/browser/android/date_time_chooser_android.cc View 1 3 chunks +11 lines, -38 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 1 chunk +3 lines, -8 lines 0 comments Download
M content/common/view_messages.h View 1 3 chunks +7 lines, -12 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java View 1 2 3 3 chunks +17 lines, -25 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java View 1 10 chunks +58 lines, -99 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java View 1 3 chunks +9 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java View 1 chunk +0 lines, -9 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java View 1 4 chunks +16 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java View 1 2 chunks +8 lines, -4 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java View 1 5 chunks +9 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java View 1 chunk +0 lines, -9 lines 0 comments Download
M content/renderer/date_time_formatter.h View 1 1 chunk +0 lines, -81 lines 0 comments Download
M content/renderer/date_time_formatter.cc View 1 1 chunk +0 lines, -300 lines 0 comments Download
M content/renderer/date_time_formatter_unittest.cc View 1 1 chunk +0 lines, -225 lines 0 comments Download
M content/renderer/renderer_date_time_picker.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/renderer_date_time_picker.cc View 1 2 chunks +25 lines, -34 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
keishi
Blink side is here: https://codereview.chromium.org/62083004/
7 years, 1 month ago (2013-11-07 18:03:56 UTC) #1
miu
https://codereview.chromium.org/64913002/diff/1/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/64913002/diff/1/content/common/view_messages.h#newcode392 content/common/view_messages.h:392: IPC_STRUCT_MEMBER(double, current_value) Drive-by comment: "current_value" isn't very descriptive here. ...
7 years, 1 month ago (2013-11-08 01:48:02 UTC) #2
keishi
https://codereview.chromium.org/64913002/diff/1/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/64913002/diff/1/content/common/view_messages.h#newcode392 content/common/view_messages.h:392: IPC_STRUCT_MEMBER(double, current_value) On 2013/11/08 01:48:02, Yuri wrote: > Drive-by ...
7 years, 1 month ago (2013-11-08 02:13:07 UTC) #3
Miguel Garcia
https://codereview.chromium.org/64913002/diff/1/content/browser/android/date_time_chooser_android.h File content/browser/android/date_time_chooser_android.h (left): https://codereview.chromium.org/64913002/diff/1/content/browser/android/date_time_chooser_android.h#oldcode41 content/browser/android/date_time_chooser_android.h:41: void ReplaceDateTime(JNIEnv* env, nit: give names to the different ...
7 years, 1 month ago (2013-11-11 13:40:05 UTC) #4
keishi
https://codereview.chromium.org/64913002/diff/1/content/browser/android/date_time_chooser_android.h File content/browser/android/date_time_chooser_android.h (left): https://codereview.chromium.org/64913002/diff/1/content/browser/android/date_time_chooser_android.h#oldcode41 content/browser/android/date_time_chooser_android.h:41: void ReplaceDateTime(JNIEnv* env, On 2013/11/11 13:40:05, Miguel Garcia wrote: ...
7 years, 1 month ago (2013-11-19 12:51:20 UTC) #5
Miguel Garcia
https://codereview.chromium.org/64913002/diff/160001/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java File content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java (right): https://codereview.chromium.org/64913002/diff/160001/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java#newcode43 content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java:43: private void showDialog(int dialogType, double value, dialogValue https://codereview.chromium.org/64913002/diff/160001/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java#newcode75 content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java:75: ...
7 years, 1 month ago (2013-11-20 23:05:52 UTC) #6
keishi
https://codereview.chromium.org/64913002/diff/160001/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java File content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java (right): https://codereview.chromium.org/64913002/diff/160001/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java#newcode43 content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java:43: private void showDialog(int dialogType, double value, On 2013/11/20 23:05:53, ...
7 years, 1 month ago (2013-11-21 15:03:08 UTC) #7
keishi
7 years ago (2013-11-25 12:18:05 UTC) #8
On 2013/11/21 15:03:08, keishi1 wrote:
>
https://codereview.chromium.org/64913002/diff/160001/content/public/android/j...
> File
>
content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java
> (right):
> 
>
https://codereview.chromium.org/64913002/diff/160001/content/public/android/j...
>
content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java:43:
> private void showDialog(int dialogType, double value,
> On 2013/11/20 23:05:53, Miguel Garcia wrote:
> > dialogValue
> 
> Done.
> 
>
https://codereview.chromium.org/64913002/diff/160001/content/public/android/j...
>
content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java:75:
> double value);
> On 2013/11/20 23:05:53, Miguel Garcia wrote:
> > dialogValue
> 
> Done.
> 
>
https://codereview.chromium.org/64913002/diff/160001/content/renderer/rendere...
> File content/renderer/renderer_date_time_picker.cc (right):
> 
>
https://codereview.chromium.org/64913002/diff/160001/content/renderer/rendere...
> content/renderer/renderer_date_time_picker.cc:70: if (identifier !=
identifier_)
> On 2013/11/20 23:05:53, Miguel Garcia wrote:
> > what is this new identifier thing? It seems very fishy (and not thread safe)
> to
> > calculate the identifier should a static method.
> 
> RendererDateTimePicker::Open() is called by blink so it is always called from
> the main thread.
> The replaceDateTime and openDateTimeDialog IPC messages can pass each other
> during flight, causing the replaceDateTime to be received by a different input
> element than the one that opened the dialog. We need an identifier to match
them
> up.
> 
> For example we have an HTML like this. 
> This will open two date time dialogs when you tap the body.
> 
> <input type=date id=a>
> <input type=date id=b>
> <script>
> a=document.getElementById('a');
> b=document.getElementById('b');
> document.body.onclick = function() {a.click();b.click(); }
> </script>
> 
> If the IPC queue is busy something like this could happen.
> 1. OpenDateTimeDialog is sent for element "a"
> 2. OpenDateTimeDialog is sent for element "b"
> 3. OpenDateTimeDialog for element "a" is received by the browser. Dialog
opens.
> 4. User selects date. ReplaceDateTime is sent from the browser to the
renderer.
> 5. OpenDateTimeDialog for element "b" is received by the browser.
> 6. ReplaceDateTime is received by the renderer. value is set to element b
> 
> Therefore it is insufficient to check the type and we should be matching up
the
> object on the renderer side that triggered the dialog.
> 
>
https://codereview.chromium.org/64913002/diff/160001/content/renderer/rendere...
> File content/renderer/renderer_date_time_picker.h (right):
> 
>
https://codereview.chromium.org/64913002/diff/160001/content/renderer/rendere...
> content/renderer/renderer_date_time_picker.h:11: #include
> "ui/base/ime/text_input_type.h"
> On 2013/11/20 23:05:53, Miguel Garcia wrote:
> > why do you need this here?
> 
> Removed. It was left over.

migueal@ if you still don't like the identifier, how about something like this?
https://codereview.chromium.org/85643002
The RenderViewImpl ensures that there is only one date time picker open at a
time and the openDateTImeChooser call fails while one is already open.

Powered by Google App Engine
This is Rietveld 408576698