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

Issue 564963002: New FormData methods: get, getAll, has, set, delete and iterable (Closed)

Created:
6 years, 3 months ago by jsbell
Modified:
5 years, 11 months ago
CC:
arv+blink, blink-reviews, blink-reviews-html_chromium.org, Inactive, dglazkov+blink
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

New FormData methods: get, getAll, has, set, delete and iterable Previously, FormData was write-only via append(). This fleshes out the object with other ways to manipulate and inspect the data. Also adds ES6 iterator support and the implied keys(), entries() and values() methods. All the new functionality is hidden behind the experimental features flag per the "intent to implement" discussion. Spec: http://xhr.spec.whatwg.org/#interface-formdata Intent: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/ksXEB6uB7RY/ZwtCdZGyIVgJ BUG=412991 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188863

Patch Set 1 #

Patch Set 2 : Implement getAll(), fix get() with no matches #

Total comments: 16

Patch Set 3 : Incorporate review feedback #

Patch Set 4 : 'explicit' sprinkles #

Patch Set 5 : Implement filename override #

Patch Set 6 : Add timestamp test - and fix off-by-1000x bug #

Patch Set 7 : Comments #

Patch Set 8 : Encoding tests #

Patch Set 9 : Add Iterator impl/test #

Patch Set 10 : fooItem() -> fooEntry() #

Patch Set 11 : Add entries()/keys()/values() #

Patch Set 12 : Stuff new methods behind a flag #

Total comments: 13

Patch Set 13 : Tidying #

Patch Set 14 : Rebased #

Patch Set 15 : Rebased on http://crrev.com/848673002 #

Patch Set 16 : Rebased #

Total comments: 7

Patch Set 17 : Use IDL unions #

Patch Set 18 : Remove some unnecessary includes/redundant assertion #

Total comments: 2

Patch Set 19 : Remove stray comma #

Total comments: 10

Patch Set 20 : Review feedback #

Patch Set 21 : webexposed/global-interface-listing updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+754 lines, -8 lines) Patch
A LayoutTests/http/tests/local/formdata/formdata-methods.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +399 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/fileapi/File.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/fileapi/File.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +21 lines, -0 lines 0 comments Download
M Source/core/html/DOMFormData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +15 lines, -1 line 0 comments Download
M Source/core/html/DOMFormData.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +82 lines, -0 lines 0 comments Download
M Source/core/html/FormData.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +13 lines, -3 lines 0 comments Download
M Source/core/html/FormDataList.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +41 lines, -1 line 0 comments Download
M Source/core/html/FormDataList.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +155 lines, -3 lines 0 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 44 (9 generated)
jsbell
Added getAll() support. The File-with-filename case is outstanding.
6 years, 3 months ago (2014-09-11 23:53:04 UTC) #2
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/564963002/diff/20001/Source/core/html/FormDataList.cpp File Source/core/html/FormDataList.cpp (right): https://codereview.chromium.org/564963002/diff/20001/Source/core/html/FormDataList.cpp#newcode117 Source/core/html/FormDataList.cpp:117: return EntryValue(File::create(filename, currentTimeMS(), value.blob()->blobDataHandle())); this looks equivalent to what's ...
6 years, 3 months ago (2014-09-12 07:29:32 UTC) #3
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/564963002/diff/20001/LayoutTests/http/tests/local/formdata/formdata-methods.html File LayoutTests/http/tests/local/formdata/formdata-methods.html (right): https://codereview.chromium.org/564963002/diff/20001/LayoutTests/http/tests/local/formdata/formdata-methods.html#newcode48 LayoutTests/http/tests/local/formdata/formdata-methods.html:48: message = message || 'Blob daata should match'; daata ...
6 years, 3 months ago (2014-09-12 07:52:54 UTC) #4
sof
https://codereview.chromium.org/564963002/diff/20001/Source/core/html/DOMFormData.h File Source/core/html/DOMFormData.h (right): https://codereview.chromium.org/564963002/diff/20001/Source/core/html/DOMFormData.h#newcode65 Source/core/html/DOMFormData.h:65: void deleteFunction(const String& name); nit: some precedence for using ...
6 years, 3 months ago (2014-09-12 15:21:26 UTC) #5
jsbell
Thanks, for the reviews! FYI, I'm just doing this "for fun" since it looked pretty ...
6 years, 3 months ago (2014-09-12 16:30:10 UTC) #6
jsbell
Added encoding tests and timestamp tests (which found a bug, wheee!) So far as I ...
6 years, 3 months ago (2014-09-12 22:48:16 UTC) #7
jsbell
Looks like FF hasn't implemented this yet. I'll ping Moz folks and see if they ...
6 years, 3 months ago (2014-09-12 23:37:39 UTC) #8
jsbell
On 2014/09/12 23:37:39, jsbell wrote: > Looks like FF hasn't implemented this yet. I'll ping ...
6 years, 3 months ago (2014-09-15 18:22:55 UTC) #9
sof
On 2014/09/12 22:48:16, jsbell wrote: > Added encoding tests and timestamp tests (which found a ...
6 years, 3 months ago (2014-09-16 05:21:18 UTC) #10
jsbell
I added the [Symbol.iterator()], entries(), keys() and values() methods, and dropped everything behind a RuntimeEnabled ...
6 years, 3 months ago (2014-09-16 19:18:42 UTC) #12
jsbell
On 2014/09/16 19:18:42, jsbell wrote: > I added the [Symbol.iterator()], entries(), keys() and values() methods, ...
6 years, 3 months ago (2014-09-16 19:39:40 UTC) #13
arv (Not doing code reviews)
https://codereview.chromium.org/564963002/diff/220001/Source/core/html/DOMFormData.cpp File Source/core/html/DOMFormData.cpp (right): https://codereview.chromium.org/564963002/diff/220001/Source/core/html/DOMFormData.cpp#newcode68 Source/core/html/DOMFormData.cpp:68: // entries being skipped. That is pretty unfortunate. Can ...
6 years, 3 months ago (2014-09-17 19:49:38 UTC) #14
jsbell
Thanks for taking a look. https://codereview.chromium.org/564963002/diff/220001/Source/core/html/DOMFormData.cpp File Source/core/html/DOMFormData.cpp (right): https://codereview.chromium.org/564963002/diff/220001/Source/core/html/DOMFormData.cpp#newcode68 Source/core/html/DOMFormData.cpp:68: // entries being skipped. ...
6 years, 3 months ago (2014-09-18 16:18:59 UTC) #15
arv (Not doing code reviews)
https://codereview.chromium.org/564963002/diff/220001/Source/core/html/DOMFormData.cpp File Source/core/html/DOMFormData.cpp (right): https://codereview.chromium.org/564963002/diff/220001/Source/core/html/DOMFormData.cpp#newcode101 Source/core/html/DOMFormData.cpp:101: // FIXME: Implement the "bring your own payload object" ...
6 years, 3 months ago (2014-09-18 17:33:45 UTC) #16
jsbell
Given that this and URLSearchParams have similar interfaces (they're multimaps) perhaps we can try and ...
6 years, 3 months ago (2014-09-18 23:56:29 UTC) #17
arv (Not doing code reviews)
On 2014/09/18 at 23:56:29, jsbell wrote: > Given that this and URLSearchParams have similar interfaces ...
6 years, 3 months ago (2014-09-19 14:22:13 UTC) #18
jsbell
Quick update - Web IDL now has: * IDL syntax: `iterable<value-type>;` or `iterable<key-type, value-type>;` * ...
6 years, 2 months ago (2014-10-23 18:15:41 UTC) #19
jsbell
I believe this is ready for a peek again. New functionality should all be behind ...
5 years, 11 months ago (2015-01-15 01:34:15 UTC) #21
Jens Widell
Iterable stuff looks good to me. https://codereview.chromium.org/564963002/diff/300001/Source/core/html/DOMFormData.cpp File Source/core/html/DOMFormData.cpp (right): https://codereview.chromium.org/564963002/diff/300001/Source/core/html/DOMFormData.cpp#newcode36 Source/core/html/DOMFormData.cpp:36: #include "core/dom/Iterator.h" You ...
5 years, 11 months ago (2015-01-15 07:35:06 UTC) #22
jsbell
https://codereview.chromium.org/564963002/diff/300001/Source/core/html/DOMFormData.cpp File Source/core/html/DOMFormData.cpp (right): https://codereview.chromium.org/564963002/diff/300001/Source/core/html/DOMFormData.cpp#newcode36 Source/core/html/DOMFormData.cpp:36: #include "core/dom/Iterator.h" On 2015/01/15 07:35:06, Jens Widell wrote: > ...
5 years, 11 months ago (2015-01-15 18:57:13 UTC) #23
Jens Widell
https://codereview.chromium.org/564963002/diff/300001/Source/core/html/FormData.idl File Source/core/html/FormData.idl (right): https://codereview.chromium.org/564963002/diff/300001/Source/core/html/FormData.idl#newcode33 Source/core/html/FormData.idl:33: // FIXME: Replace 'any' with union type, per spec. ...
5 years, 11 months ago (2015-01-15 19:20:25 UTC) #24
jsbell
https://codereview.chromium.org/564963002/diff/340001/Source/core/html/FormData.idl File Source/core/html/FormData.idl (right): https://codereview.chromium.org/564963002/diff/340001/Source/core/html/FormData.idl#newcode47 Source/core/html/FormData.idl:47: [RuntimeEnabled=FormDataNewMethods, ImplementedAs=hasEntry, ] boolean has(USVString name); On 2015/01/15 19:20:25, ...
5 years, 11 months ago (2015-01-15 19:29:47 UTC) #25
Jens Widell
LGTM
5 years, 11 months ago (2015-01-15 20:03:28 UTC) #26
jsbell
tyoshino@, sof@, arv@ - any comments before I sent this off for OWNERS review?
5 years, 11 months ago (2015-01-22 00:37:31 UTC) #27
sof
lgtm https://codereview.chromium.org/564963002/diff/360001/Source/core/html/DOMFormData.h File Source/core/html/DOMFormData.h (right): https://codereview.chromium.org/564963002/diff/360001/Source/core/html/DOMFormData.h#newcode51 Source/core/html/DOMFormData.h:51: class Iterator; Not used in what follows. IterationSource ...
5 years, 11 months ago (2015-01-22 07:33:40 UTC) #28
tyoshino (SeeGerritForStatus)
lgtm! https://codereview.chromium.org/564963002/diff/360001/Source/core/html/DOMFormData.cpp File Source/core/html/DOMFormData.cpp (right): https://codereview.chromium.org/564963002/diff/360001/Source/core/html/DOMFormData.cpp#newcode48 Source/core/html/DOMFormData.cpp:48: virtual bool next(ScriptState* scriptState, String& key, FormDataEntryValue& value, ...
5 years, 11 months ago (2015-01-22 12:53:10 UTC) #29
jsbell
Thanks, all! https://codereview.chromium.org/564963002/diff/360001/Source/core/html/DOMFormData.cpp File Source/core/html/DOMFormData.cpp (right): https://codereview.chromium.org/564963002/diff/360001/Source/core/html/DOMFormData.cpp#newcode48 Source/core/html/DOMFormData.cpp:48: virtual bool next(ScriptState* scriptState, String& key, FormDataEntryValue& ...
5 years, 11 months ago (2015-01-22 19:05:39 UTC) #30
jsbell
dglazkov: OWNERS lgtm for Source/platform ?
5 years, 11 months ago (2015-01-22 19:11:01 UTC) #32
dglazkov
lgtm
5 years, 11 months ago (2015-01-22 19:12:28 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/564963002/380001
5 years, 11 months ago (2015-01-22 19:42:20 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/43249)
5 years, 11 months ago (2015-01-22 21:14:56 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/564963002/400001
5 years, 11 months ago (2015-01-22 22:07:15 UTC) #39
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
5 years, 11 months ago (2015-01-23 00:12:46 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/564963002/400001
5 years, 11 months ago (2015-01-23 05:52:31 UTC) #43
commit-bot: I haz the power
5 years, 11 months ago (2015-01-23 06:50:38 UTC) #44
Message was sent while issue was closed.
Committed patchset #21 (id:400001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=188863

Powered by Google App Engine
This is Rietveld 408576698