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

Issue 267713006: node.cloneNode() should clone the value of file upload elements (Closed)

Created:
6 years, 7 months ago by gnana
Modified:
6 years, 7 months ago
Reviewers:
tkent, keishi, Inactive
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org, ojan
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

node.cloneNode() should clone the value of file selected when input element of type file with a selected file is cloned, the cloned node should also have the same file as selected. HTML specification states: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html "The cloning steps for input elements must propagate the value, dirty value flag, checkedness, and dirty checkedness flag from the node being cloned to the copy." The value for the input element of type fileupload is the filename. Behaviours in major Browser: Firefox- clones filename Safari, IE & Opera- do not Clone filename BUG=71536 TEST=fast/forms/file/input-file-element-clone.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173626

Patch Set 1 : #

Total comments: 6

Patch Set 2 : incorporated review comments #

Total comments: 8

Patch Set 3 : incorporated review comments #

Total comments: 6

Patch Set 4 : incorporated review comments #

Total comments: 1

Patch Set 5 : incorporated review comments #

Total comments: 2

Patch Set 6 : incorporated review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -2 lines) Patch
A LayoutTests/fast/forms/file/input-file-element-clone.html View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/file/input-file-element-clone-expected.txt View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/html/HTMLInputElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/html/forms/FileInputType.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/FileInputType.cpp View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M Source/core/html/forms/InputType.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/InputType.cpp View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
gnana
Please have a look
6 years, 7 months ago (2014-05-02 11:28:04 UTC) #1
gnana
Please have a look
6 years, 7 months ago (2014-05-02 11:30:49 UTC) #2
Inactive
Please update your CL description to mention the corresponding specification (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html) and the behavior of ...
6 years, 7 months ago (2014-05-06 13:26:31 UTC) #3
Inactive
https://codereview.chromium.org/267713006/diff/40001/Source/core/html/HTMLInputElement.cpp File Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/267713006/diff/40001/Source/core/html/HTMLInputElement.cpp#newcode913 Source/core/html/HTMLInputElement.cpp:913: setFiles(sourceElement.files()); Isn't it a problem that we are not ...
6 years, 7 months ago (2014-05-06 13:33:57 UTC) #4
Inactive
https://codereview.chromium.org/267713006/diff/40001/LayoutTests/fast/forms/file/input-file-element-clone-expected.txt File LayoutTests/fast/forms/file/input-file-element-clone-expected.txt (right): https://codereview.chromium.org/267713006/diff/40001/LayoutTests/fast/forms/file/input-file-element-clone-expected.txt#newcode9 LayoutTests/fast/forms/file/input-file-element-clone-expected.txt:9: PASS file2.value is "C:\\fakepath\\input-file-element-clone.html" This is a bad sign ...
6 years, 7 months ago (2014-05-06 13:40:29 UTC) #5
gnana
Thanks Chris! for reviewing. I have updated the description and applied other review comments. Please ...
6 years, 7 months ago (2014-05-07 12:39:46 UTC) #6
Inactive
Here are a few more comments from me. I'd like tkent to review this as ...
6 years, 7 months ago (2014-05-07 13:28:00 UTC) #7
gnana
Thanks Chris! tkent@, please have a look. https://codereview.chromium.org/267713006/diff/60001/LayoutTests/fast/forms/file/input-file-element-clone.html File LayoutTests/fast/forms/file/input-file-element-clone.html (right): https://codereview.chromium.org/267713006/diff/60001/LayoutTests/fast/forms/file/input-file-element-clone.html#newcode18 LayoutTests/fast/forms/file/input-file-element-clone.html:18: shouldBeEqualToString("file2.value", "C:\\fakepath\\input-file-element-clone.html"); ...
6 years, 7 months ago (2014-05-07 14:22:37 UTC) #8
Inactive
https://codereview.chromium.org/267713006/diff/100001/LayoutTests/fast/forms/file/input-file-element-clone.html File LayoutTests/fast/forms/file/input-file-element-clone.html (right): https://codereview.chromium.org/267713006/diff/100001/LayoutTests/fast/forms/file/input-file-element-clone.html#newcode12 LayoutTests/fast/forms/file/input-file-element-clone.html:12: window.onload = function() Is the onload really needed? If ...
6 years, 7 months ago (2014-05-07 14:26:46 UTC) #9
gnana
Applied review comments.
6 years, 7 months ago (2014-05-07 14:49:00 UTC) #10
gnana
Applied review comments. https://codereview.chromium.org/267713006/diff/100001/LayoutTests/fast/forms/file/input-file-element-clone.html File LayoutTests/fast/forms/file/input-file-element-clone.html (right): https://codereview.chromium.org/267713006/diff/100001/LayoutTests/fast/forms/file/input-file-element-clone.html#newcode12 LayoutTests/fast/forms/file/input-file-element-clone.html:12: window.onload = function() On 2014/05/07 14:26:47, ...
6 years, 7 months ago (2014-05-07 14:50:08 UTC) #11
tkent
https://codereview.chromium.org/267713006/diff/120001/Source/core/html/HTMLInputElement.cpp File Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/267713006/diff/120001/Source/core/html/HTMLInputElement.cpp#newcode912 Source/core/html/HTMLInputElement.cpp:912: if (isFileUpload()) { Please do not add input-type-specific code ...
6 years, 7 months ago (2014-05-07 23:37:08 UTC) #12
gnana
Applied the review comments. Please have a look.
6 years, 7 months ago (2014-05-08 06:23:41 UTC) #13
tkent
https://codereview.chromium.org/267713006/diff/140001/Source/core/html/HTMLInputElement.cpp File Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/267713006/diff/140001/Source/core/html/HTMLInputElement.cpp#newcode912 Source/core/html/HTMLInputElement.cpp:912: if (isFileUpload()) Please do not add type checks to ...
6 years, 7 months ago (2014-05-08 07:57:20 UTC) #14
gnana
Please have a look. https://codereview.chromium.org/267713006/diff/140001/Source/core/html/HTMLInputElement.cpp File Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/267713006/diff/140001/Source/core/html/HTMLInputElement.cpp#newcode912 Source/core/html/HTMLInputElement.cpp:912: if (isFileUpload()) On 2014/05/08 07:57:20, ...
6 years, 7 months ago (2014-05-08 08:19:17 UTC) #15
tkent
lgtm
6 years, 7 months ago (2014-05-08 08:22:24 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gnanasekar.s@samsung.com/267713006/160001
6 years, 7 months ago (2014-05-08 08:23:07 UTC) #17
commit-bot: I haz the power
Change committed as 173626
6 years, 7 months ago (2014-05-08 09:31:29 UTC) #18
tkent
6 years, 5 months ago (2014-06-30 23:39:21 UTC) #19
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/364503002/ by tkent@chromium.org.

The reason for reverting is: Caused a serious regression, crbug.com/388795.
.

Powered by Google App Engine
This is Rietveld 408576698