[Webkit-unassigned] [Bug 139179] HTMLSelectElement add() should support index as second argument

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 18 16:30:51 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=139179

--- Comment #22 from Shivakumar J M <shiva.jm at samsung.com> ---
(In reply to comment #21)
> Comment on attachment 243480 [details]
> Patch-Updated-Review3
> 
> So we are now going to behave differently from Chrome and Firefox when
> calling add(x, null)? That does not sound good.


Yes right, the call to add(x, null) is now going to new add() api, which takes index as argument, so it looks 'null' is going as 0 in "options()->item(beforeIndex)", so it gives first element as before element. so x is getting added to beginning of the list. 
Before adding new add() api, the call to add(x, null) was going to old add() api, which takes HTMLElement as second argument, in the insertBefore() call, if before is null, x will be appended to end of list, so x was getting added to the end of list. so in new api, we need to treat null differently, when add(x,null) is called, will try using other datatypes for index argument.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141219/eb466616/attachment-0002.html>


More information about the webkit-unassigned mailing list