Bug 139806 - HTMLSelectElement add() should support adding group of options element (HTMLOptGroupElement)
Summary: HTMLSelectElement add() should support adding group of options element (HTMLO...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-18 20:58 PST by Shivakumar J M
Modified: 2014-12-21 18:59 PST (History)
6 users (show)

See Also:


Attachments
Patch (9.33 KB, patch)
2014-12-18 21:33 PST, Shivakumar J M
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shivakumar J M 2014-12-18 20:58:38 PST
We can add an option to a SELECT via add(), i.e: select.add(new Option("0", "0", false, false), select.firstChild);

But we cannot add an group of options to HTMLOptGroupElement, i.e: elect.add(new Option("0", "0", false, false), optgroup);

so HTMLSelectElement add() should support adding group of options element (HTMLOptGroupElement);
Comment 1 Shivakumar J M 2014-12-18 21:33:24 PST
Created attachment 243539 [details]
Patch

HTMLSelectElement add() should support adding group of options (optgroup) element.
Comment 2 Shivakumar J M 2014-12-21 00:12:30 PST
These aligns to Spec as well:
http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element
Comment 3 Darin Adler 2014-12-21 17:26:48 PST
Comment on attachment 243539 [details]
Patch

I’m not sure that the other functions all handle optgroup elements properly.
Comment 4 WebKit Commit Bot 2014-12-21 18:00:09 PST
Comment on attachment 243539 [details]
Patch

Clearing flags on attachment: 243539

Committed r177629: <http://trac.webkit.org/changeset/177629>
Comment 5 WebKit Commit Bot 2014-12-21 18:00:14 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Shivakumar J M 2014-12-21 18:59:48 PST
(In reply to comment #3)
> Comment on attachment 243539 [details]
> Patch
> 
> I’m not sure that the other functions all handle optgroup elements properly.


Dear  Darin,

      I will check for the other fucntions, if they are not handling, will add suppourt for the same.

Thanks