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

Issue 23549004: Fix the HTMLSelectElement.prototype.remove() method (Closed)

Created:
7 years, 3 months ago by do-not-use
Modified:
7 years, 3 months ago
CC:
blink-reviews, Nils Barth (inactive), kojih, jsbell+bindings_chromium.org, eae+blinkwatch, abarth-chromium, marja+watch_chromium.org, dglazkov+blink, adamk+blink_chromium.org, haraken, Nate Chapin, Stepien Nicolas
Visibility:
Public.

Description

Fix the HTMLSelectElement.prototype.remove() method Fix the HTMLSelectElement.prototype.remove() method so that it behaves like Element.remove() if no argument is passed (from ChildNode). This behavior is consistent with Firefox. Also get rid of custom code for HTMLSelectElement.remove() and HTMLOptionsCollection.remove() by leveraging operation overloading in Web IDL. BUG=277660 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156917

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -157 lines) Patch
M LayoutTests/fast/js/resources/select-options-remove.js View 3 chunks +30 lines, -17 lines 0 comments Download
M LayoutTests/fast/js/select-options-remove-expected.txt View 3 chunks +28 lines, -18 lines 0 comments Download
M Source/bindings/bindings.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp View 2 chunks +0 lines, -8 lines 0 comments Download
D Source/bindings/v8/custom/V8HTMLSelectElementCustom.h View 1 chunk +0 lines, -45 lines 0 comments Download
D Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp View 1 chunk +0 lines, -63 lines 0 comments Download
M Source/core/html/HTMLOptionsCollection.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLOptionsCollection.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLOptionsCollection.idl View 2 chunks +3 lines, -1 line 2 comments Download
M Source/core/html/HTMLSelectElement.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLSelectElement.idl View 2 chunks +4 lines, -3 lines 3 comments Download

Messages

Total messages: 12 (0 generated)
do-not-use
7 years, 3 months ago (2013-08-29 07:42:32 UTC) #1
haraken
Given that this is a non-standard feature and that the behavior aligns with Firefox, LGTM. ...
7 years, 3 months ago (2013-08-29 07:52:50 UTC) #2
do-not-use
https://codereview.chromium.org/23549004/diff/1/Source/core/html/HTMLSelectElement.idl File Source/core/html/HTMLSelectElement.idl (right): https://codereview.chromium.org/23549004/diff/1/Source/core/html/HTMLSelectElement.idl#newcode43 Source/core/html/HTMLSelectElement.idl:43: [RaisesException] void remove(); On 2013/08/29 07:52:50, haraken wrote: > ...
7 years, 3 months ago (2013-08-29 07:55:27 UTC) #3
tkent
lgtm
7 years, 3 months ago (2013-08-29 08:00:00 UTC) #4
haraken
https://codereview.chromium.org/23549004/diff/1/Source/core/html/HTMLSelectElement.idl File Source/core/html/HTMLSelectElement.idl (right): https://codereview.chromium.org/23549004/diff/1/Source/core/html/HTMLSelectElement.idl#newcode43 Source/core/html/HTMLSelectElement.idl:43: [RaisesException] void remove(); On 2013/08/29 07:55:27, Christophe Dumez wrote: ...
7 years, 3 months ago (2013-08-29 08:12:56 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@sisa.samsung.com/23549004/1
7 years, 3 months ago (2013-08-29 08:33:47 UTC) #6
commit-bot: I haz the power
Change committed as 156917
7 years, 3 months ago (2013-08-29 11:10:05 UTC) #7
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/23549004/diff/1/Source/core/html/HTMLOptionsCollection.idl File Source/core/html/HTMLOptionsCollection.idl (right): https://codereview.chromium.org/23549004/diff/1/Source/core/html/HTMLOptionsCollection.idl#newcode36 Source/core/html/HTMLOptionsCollection.idl:36: void remove([Default=Undefined] optional unsigned long index); We should ...
7 years, 3 months ago (2013-08-29 13:33:22 UTC) #8
do-not-use
https://codereview.chromium.org/23549004/diff/1/Source/core/html/HTMLOptionsCollection.idl File Source/core/html/HTMLOptionsCollection.idl (right): https://codereview.chromium.org/23549004/diff/1/Source/core/html/HTMLOptionsCollection.idl#newcode36 Source/core/html/HTMLOptionsCollection.idl:36: void remove([Default=Undefined] optional unsigned long index); HTMLOptionsCollection is not ...
7 years, 3 months ago (2013-08-29 14:27:23 UTC) #9
arv (Not doing code reviews)
I find it confusing because it is unclear which option to remove from the options ...
7 years, 3 months ago (2013-08-29 14:36:41 UTC) #10
do-not-use
On 2013/08/29 14:36:41, arv wrote: > I find it confusing because it is unclear which ...
7 years, 3 months ago (2013-08-29 14:42:16 UTC) #11
tkent
7 years, 3 months ago (2013-08-30 00:55:29 UTC) #12
Message was sent while issue was closed.
On 2013/08/29 14:42:16, Christophe Dumez wrote:
> In practice, we remove the first one because of [Default=Undefined] and the
> undefined gets converted into a 0.
> I don't like it either but Blink/WebKit has behaved this way "forever". I'd
love
> to fix this though if an API owner approves.

If the specification says the argument is mandatory and other browsers work so,
we should follow, of course.

Powered by Google App Engine
This is Rietveld 408576698