When we get an out-of-bound index here: http://trac.webkit.org/browser/trunk/WebCore/svg/SVGList.h#L99 we should append instead of throwing an error according to the spec: http://www.w3.org/TR/SVG/types.html
I have a patch that I can upload when I get home.
Created attachment 30262 [details] patch (no tests) Turns out unhorking my build was too much for Mac Mini to handle tonight. Here's the code part of the patch. I still need to update the tests.
Created attachment 30405 [details] patch patch!
Comment on attachment 30405 [details] patch No, that't not right.
Created attachment 30406 [details] better patch That's better.
Comment on attachment 30406 [details] better patch r=me, but i'd prefer it if the test were updated to actually confirm the correct insertion order
(In reply to comment #6) > (From update of attachment 30406 [details] [review]) > r=me, but i'd prefer it if the test were updated to actually confirm the > correct insertion order You mean add the shouldBes after each modification?
(In reply to comment #7) > (In reply to comment #6) > > (From update of attachment 30406 [details] [review] [review]) > > r=me, but i'd prefer it if the test were updated to actually confirm the > > correct insertion order > > You mean add the shouldBes after each modification? > Yeah -- i find myself wondering what inserting null is meant to do? (and we;ll probably want to insert distinguishable values)
Created attachment 30407 [details] even better patch? Like the new svglist-insertBeforeItem-appends test?
Comment on attachment 30407 [details] even better patch? r=me
Sending LayoutTests/ChangeLog Sending LayoutTests/svg/dom/svglist-exception-on-out-bounds-error-expected.txt Sending LayoutTests/svg/dom/svglist-exception-on-out-bounds-error.html Adding LayoutTests/svg/dom/svglist-insertItemBefore-appends-expected.txt Adding LayoutTests/svg/dom/svglist-insertItemBefore-appends.html Sending WebCore/ChangeLog Sending WebCore/svg/SVGList.h Transmitting file data ....... Committed revision 43795.