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

Issue 143313002: Implement URLSearchParams. (Closed)

Created:
6 years, 11 months ago by sof
Modified:
4 years, 8 months ago
CC:
blink-reviews, arv+blink, eae+blinkwatch, dglazkov+blink, adamk+blink_chromium.org, watchdog-blink-watchlist_google.com, Inactive, haraken, Nils Barth (inactive)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Implement URLSearchParams. Provide an implementation of the URLUtils' query object, URLSearchParams: http://url.spec.whatwg.org/#interface-urlsearchparams It providing a more structured view of the URLUtils.search attribute, allowing its name-value pairs to be separately manipulated and updated. The URLSearchParams object can be separately constructed also. The implementation depends on Oilpan to conveniently express the dependencies between a URL query object and its URL objects (i.e., objects implementing the URLUtils interface.) R=arv@chromium.org,ch.dumez@samsung.com,abarth@chromium.org BUG=303152

Patch Set 1 #

Patch Set 2 : Update expected test outputs #

Total comments: 10

Patch Set 3 : Handle dependency between URLUtils interfaces and URLSearchParams #

Total comments: 21

Patch Set 4 : Handle constructor overloading + smaller improvements #

Patch Set 5 : More tests + ref count unattached URLSearchParams objects #

Total comments: 16

Patch Set 6 : Avoid custom constructor + test updates #

Total comments: 3

Patch Set 7 : Rebase #

Patch Set 8 : Added URLSearchParams setter test #

Patch Set 9 : Rebased #

Patch Set 10 : Switch to Oilpan #

Patch Set 11 : Adjust position of HTMLAnchorElement's update() call #

Total comments: 11

Patch Set 12 : Shortened names of methods implementing the interface methods #

Patch Set 13 : Rebased + convert URLSearchParams to use ScalarValueString #

Patch Set 14 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1161 lines, -38 lines) Patch
A LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-searchParams.js View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-searchParams.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-searchParams-expected.txt View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/resources/testharness-extras.js View 1 2 3 4 5 6 7 8 9 1 chunk +25 lines, -0 lines 0 comments Download
M LayoutTests/fast/domurl/url-constructor.html View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -26 lines 0 comments Download
M LayoutTests/fast/domurl/url-search.html View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -4 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams.html View 1 2 3 4 5 6 7 8 9 1 chunk +147 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams-append.html View 1 2 3 4 5 6 7 8 9 1 chunk +45 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams-constructor.html View 1 2 3 4 5 6 7 8 9 1 chunk +132 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams-delete.html View 1 2 3 4 5 6 7 8 9 1 chunk +36 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams-get.html View 1 2 3 4 5 6 7 8 9 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams-getAll.html View 1 2 3 4 5 6 7 8 9 1 chunk +31 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams-has.html View 1 2 3 4 5 6 7 8 9 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams-set.html View 1 2 3 4 5 6 7 8 9 1 chunk +28 lines, -0 lines 0 comments Download
A LayoutTests/fast/domurl/url-searchparams-toString.html View 1 2 3 4 5 6 7 8 9 1 chunk +118 lines, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-constructors-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/webexposed/global-constructors-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/dom/DOMURL.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/dom/DOMURL.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +13 lines, -2 lines 0 comments Download
A Source/core/dom/DOMURLSearchParams.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +65 lines, -0 lines 0 comments Download
A Source/core/dom/DOMURLSearchParams.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +212 lines, -0 lines 0 comments Download
M Source/core/dom/DOMURLUtils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +38 lines, -2 lines 0 comments Download
M Source/core/dom/DOMURLUtils.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +87 lines, -0 lines 0 comments Download
A Source/core/dom/URLSearchParams.idl View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +25 lines, -0 lines 0 comments Download
M Source/core/dom/URLUtils.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/html/HTMLAnchorElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLAnchorElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (1 generated)
sof
Please take a look when you next have a spare moment. I'm looking for some ...
6 years, 11 months ago (2014-01-20 14:59:14 UTC) #1
abarth-chromium
The way I would do this is as follow: 1) Make DOMURLUtils own DOMURLSearchParams with ...
6 years, 11 months ago (2014-01-20 19:19:28 UTC) #2
sof
On 2014/01/20 19:19:28, abarth wrote: > The way I would do this is as follow: ...
6 years, 11 months ago (2014-01-20 20:03:48 UTC) #3
abarth-chromium
On 2014/01/20 20:03:48, sof wrote: > On 2014/01/20 19:19:28, abarth wrote: > > To be ...
6 years, 11 months ago (2014-01-20 21:23:56 UTC) #4
Inactive
https://codereview.chromium.org/143313002/diff/30001/Source/core/dom/DOMURLSearchParams.cpp File Source/core/dom/DOMURLSearchParams.cpp (right): https://codereview.chromium.org/143313002/diff/30001/Source/core/dom/DOMURLSearchParams.cpp#newcode114 Source/core/dom/DOMURLSearchParams.cpp:114: return searchParams; .release() https://codereview.chromium.org/143313002/diff/30001/Source/core/dom/DOMURLSearchParams.cpp#newcode121 Source/core/dom/DOMURLSearchParams.cpp:121: return searchParams; .release() https://codereview.chromium.org/143313002/diff/30001/Source/core/dom/DOMURLSearchParams.cpp#newcode124 ...
6 years, 11 months ago (2014-01-20 22:06:12 UTC) #5
sof
Thanks Christophe, now hopefully addressed. https://codereview.chromium.org/143313002/diff/30001/Source/core/dom/DOMURLSearchParams.cpp File Source/core/dom/DOMURLSearchParams.cpp (right): https://codereview.chromium.org/143313002/diff/30001/Source/core/dom/DOMURLSearchParams.cpp#newcode114 Source/core/dom/DOMURLSearchParams.cpp:114: return searchParams; On 2014/01/20 ...
6 years, 11 months ago (2014-01-21 13:20:10 UTC) #6
sof
On 2014/01/20 21:23:56, abarth wrote: > On 2014/01/20 20:03:48, sof wrote: > > On 2014/01/20 ...
6 years, 11 months ago (2014-01-21 13:34:29 UTC) #7
sof
FTR, the FF tests for URLSearchParams are "ok", https://bugzilla.mozilla.org/show_bug.cgi?id=887836 i.e., it expectedly fails on 'size' ...
6 years, 11 months ago (2014-01-21 13:42:05 UTC) #8
arv (Not doing code reviews)
Thanks for picking this up. I started this when I initially implement the URL interface ...
6 years, 11 months ago (2014-01-21 14:40:32 UTC) #9
arv (Not doing code reviews)
On 2014/01/21 14:40:32, arv wrote: > Thanks for picking this up. I started this when ...
6 years, 11 months ago (2014-01-21 14:41:10 UTC) #10
Inactive
https://codereview.chromium.org/143313002/diff/140001/Source/core/dom/DOMURL.h File Source/core/dom/DOMURL.h (right): https://codereview.chromium.org/143313002/diff/140001/Source/core/dom/DOMURL.h#newcode73 Source/core/dom/DOMURL.h:73: virtual ImplementedBy implementedBy() const OVERRIDE FINAL { return DOMURLUtils::DomURL; ...
6 years, 11 months ago (2014-01-21 15:25:58 UTC) #11
sof
On 2014/01/21 14:41:10, arv wrote: > On 2014/01/21 14:40:32, arv wrote: > > Thanks for ...
6 years, 11 months ago (2014-01-21 15:28:49 UTC) #12
sof
Good feedback and comments, thanks. Two issues I've yet to address: - unattached URLSearchParams quite ...
6 years, 11 months ago (2014-01-21 21:16:46 UTC) #13
sof
On 2014/01/21 21:16:46, sof wrote: > Good feedback and comments, thanks. > > Two issues ...
6 years, 11 months ago (2014-01-22 13:49:16 UTC) #14
arv (Not doing code reviews)
A few nits. I would also prefer if abarth could verify that the ref counting ...
6 years, 11 months ago (2014-01-22 16:12:05 UTC) #15
sof
Some comments for now, will follow up later tonight. https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html File LayoutTests/fast/domurl/url-searchparams.html (right): https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html#newcode55 LayoutTests/fast/domurl/url-searchparams.html:55: ...
6 years, 11 months ago (2014-01-22 17:15:46 UTC) #16
sof
https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html File LayoutTests/fast/domurl/url-searchparams.html (right): https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html#newcode55 LayoutTests/fast/domurl/url-searchparams.html:55: }, "URLSearchParams GC handling"); On 2014/01/22 17:15:47, sof wrote: ...
6 years, 11 months ago (2014-01-22 17:24:54 UTC) #17
arv (Not doing code reviews)
On 2014/01/22 17:24:54, sof wrote: > https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html > File LayoutTests/fast/domurl/url-searchparams.html (right): > > https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html#newcode55 > ...
6 years, 11 months ago (2014-01-22 18:31:43 UTC) #18
sof
On 2014/01/22 18:31:43, arv wrote: > On 2014/01/22 17:24:54, sof wrote: > > > https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html ...
6 years, 11 months ago (2014-01-22 18:37:31 UTC) #19
arv (Not doing code reviews)
On 2014/01/22 18:37:31, sof wrote: > On 2014/01/22 18:31:43, arv wrote: > > On 2014/01/22 ...
6 years, 11 months ago (2014-01-22 18:48:27 UTC) #20
sof
On 2014/01/22 18:48:27, arv wrote: > On 2014/01/22 18:37:31, sof wrote: > > On 2014/01/22 ...
6 years, 11 months ago (2014-01-22 19:25:25 UTC) #21
sof
https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-search-expected.txt File LayoutTests/fast/domurl/url-search-expected.txt (right): https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-search-expected.txt#newcode1 LayoutTests/fast/domurl/url-search-expected.txt:1: This is a testharness.js-based test. On 2014/01/22 16:12:05, arv ...
6 years, 11 months ago (2014-01-22 19:27:08 UTC) #22
abarth-chromium
https://codereview.chromium.org/143313002/diff/600001/Source/bindings/v8/custom/V8URLSearchParamsCustom.cpp File Source/bindings/v8/custom/V8URLSearchParamsCustom.cpp (right): https://codereview.chromium.org/143313002/diff/600001/Source/bindings/v8/custom/V8URLSearchParamsCustom.cpp#newcode45 Source/bindings/v8/custom/V8URLSearchParamsCustom.cpp:45: void V8URLSearchParams::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate) Can ...
6 years, 11 months ago (2014-01-22 20:52:38 UTC) #23
sof
https://codereview.chromium.org/143313002/diff/600001/Source/bindings/v8/custom/V8URLSearchParamsCustom.cpp File Source/bindings/v8/custom/V8URLSearchParamsCustom.cpp (right): https://codereview.chromium.org/143313002/diff/600001/Source/bindings/v8/custom/V8URLSearchParamsCustom.cpp#newcode45 Source/bindings/v8/custom/V8URLSearchParamsCustom.cpp:45: void V8URLSearchParams::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate) On ...
6 years, 11 months ago (2014-01-22 21:07:28 UTC) #24
sof
(+harakan, nbarth as a FYI.) Re: https://codereview.chromium.org/143313002/#msg23 and why a custom visitDOMWrapper() is needed -- ...
6 years, 11 months ago (2014-01-23 08:34:27 UTC) #25
sof
On 2014/01/22 20:52:38, abarth wrote: ... > > https://codereview.chromium.org/143313002/diff/600001/Source/core/dom/DOMURLSearchParams.h > File Source/core/dom/DOMURLSearchParams.h (right): > > ...
6 years, 11 months ago (2014-01-23 09:03:48 UTC) #26
sof
https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html File LayoutTests/fast/domurl/url-searchparams.html (right): https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html#newcode55 LayoutTests/fast/domurl/url-searchparams.html:55: }, "URLSearchParams GC handling"); On 2014/01/22 16:12:05, arv wrote: ...
6 years, 11 months ago (2014-01-24 07:11:36 UTC) #27
sof
The evolving version of the XHR spec supports URLSearchParams over send(), http://xhr.spec.whatwg.org/#the-send()-method That will be ...
6 years, 10 months ago (2014-01-29 11:12:54 UTC) #28
sof
On 2014/01/24 07:11:36, sof wrote: > https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html > File LayoutTests/fast/domurl/url-searchparams.html (right): > > https://codereview.chromium.org/143313002/diff/90003/LayoutTests/fast/domurl/url-searchparams.html#newcode55 > ...
6 years, 10 months ago (2014-01-31 14:15:51 UTC) #29
sof
Reviving(*) this CL, using Oilpan to express the needed object dependencies, as was previously agreed ...
6 years, 6 months ago (2014-06-15 20:34:11 UTC) #30
haraken
In terms of oilpan, looks good. https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl File Source/core/dom/URLSearchParams.idl (right): https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl#newcode19 Source/core/dom/URLSearchParams.idl:19: [ImplementedAs=setNameValue] void set(DOMString ...
6 years, 6 months ago (2014-06-16 01:00:56 UTC) #31
sof
https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl File Source/core/dom/URLSearchParams.idl (right): https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl#newcode19 Source/core/dom/URLSearchParams.idl:19: [ImplementedAs=setNameValue] void set(DOMString name, DOMString value); On 2014/06/16 01:00:56, ...
6 years, 6 months ago (2014-06-16 11:27:43 UTC) #32
Nils Barth (inactive)
https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl File Source/core/dom/URLSearchParams.idl (right): https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl#newcode19 Source/core/dom/URLSearchParams.idl:19: [ImplementedAs=setNameValue] void set(DOMString name, DOMString value); On 2014/06/16 11:27:43, ...
6 years, 6 months ago (2014-06-17 01:19:28 UTC) #33
Nils Barth (inactive)
Documentation + IDL nits. https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl File Source/core/dom/URLSearchParams.idl (right): https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl#newcode5 Source/core/dom/URLSearchParams.idl:5: [ Could you link to ...
6 years, 6 months ago (2014-06-17 01:24:12 UTC) #34
sof
https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl File Source/core/dom/URLSearchParams.idl (right): https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl#newcode6 Source/core/dom/URLSearchParams.idl:6: Constructor(), On 2014/06/17 01:24:12, Nils Barth wrote: > Could ...
6 years, 6 months ago (2014-06-17 14:24:24 UTC) #35
Nils Barth (inactive)
thanks, LGTM IDL-wise!
6 years, 6 months ago (2014-06-18 03:01:44 UTC) #36
sof
https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl File Source/core/dom/URLSearchParams.idl (right): https://codereview.chromium.org/143313002/diff/1180001/Source/core/dom/URLSearchParams.idl#newcode8 Source/core/dom/URLSearchParams.idl:8: Constructor(DOMString queryString), On 2014/06/17 14:24:24, sof wrote: > On ...
6 years, 6 months ago (2014-06-23 21:54:03 UTC) #37
PhistucK
What else is needed in order to move forward with this?
6 years, 3 months ago (2014-09-13 14:58:21 UTC) #38
PhistucK
6 years, 3 months ago (2014-09-13 15:08:40 UTC) #40
sof
On 2014/09/13 14:58:21, PhistucK wrote: > What else is needed in order to move forward ...
6 years, 3 months ago (2014-09-13 17:54:33 UTC) #41
PhistucK
On 2014/09/13 17:54:33, sof wrote: > On 2014/09/13 14:58:21, PhistucK wrote: > > What else ...
6 years, 3 months ago (2014-09-13 18:00:22 UTC) #42
jjpeters67
5 years, 1 month ago (2015-11-13 18:58:15 UTC) #43
sof
4 years, 8 months ago (2016-04-19 08:12:11 UTC) #44
Closing, URLSearchParams support (as it is now spec'ed; simpler than the initial
design) landed as:

 https://codereview.chromium.org/1456553002
 https://codereview.chromium.org/1860623002

Powered by Google App Engine
This is Rietveld 408576698