SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating...
authorsaid@apple.com <said@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2019 23:12:51 +0000 (23:12 +0000)
committersaid@apple.com <said@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2019 23:12:51 +0000 (23:12 +0000)
commite8218dba4e86400d1a533c2fb54c47f8d7d4b2a5
tree408257912e5c522cceb7df92e869c20caa573ac2
parent8d3f18e4b9247752cb13a8dbe6c208729f70404b
SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
https://bugs.webkit.org/show_bug.cgi?id=195333
<rdar://problem/48475802>

Reviewed by Simon Fraser.

Source/WebCore:

Because the SVG1.1 specs states that the newItem should be removed from
its original list before adding it to another list,
SVGPathSegList.insertItemBefore() should fail if the new item belongs to
an animating animPathSegList since it is read-only.

Test: svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg

* svg/SVGPathSegList.cpp:
(WebCore::SVGPathSegList::processIncomingListItemValue):

LayoutTests:

* svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt: Added.
* svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt [new file with mode: 0644]
LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGPathSegList.cpp