Following the change made in bug #139179 (http://trac.webkit.org/changeset/178097), calling HTMLSelectElement.add(O, undefined) prepends O to the list of options where O is either an HTML option element or an HTML optgroup element. But it should append O to the end of the list of options.
Created attachment 256056 [details]
which points to:
which says in this case to call the DOM insertBefore() method on the parent node, with element as the first argument and null (in our case) as the second argument.
For each newNode in nodes, in tree order, run these substeps:
1. Insert newNode into parent before child or at the end of parent if child is null.
2. Run the insertion steps with newNode.
Ok, so even though it is hard to follow, the spec does say to insert "at the end of parent if child is null".
Created attachment 256114 [details]
Created attachment 256120 [details]
Comment on attachment 256120 [details]
Attachment 256120 [details] did not pass mac-ews (mac):
New failing tests:
Created attachment 256122 [details]
Archive of layout-test-results from ews102 for mac-mavericks
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102 Port: mac-mavericks Platform: Mac OS X 10.9.5
Created attachment 256123 [details]
Comment on attachment 256123 [details]
Clearing flags on attachment: 256123
Committed r186275: <http://trac.webkit.org/changeset/186275>
All reviewed patches have been landed. Closing bug.