| Index: Source/core/svg/SVGTransformList.cpp
|
| diff --git a/Source/core/svg/SVGTransformList.cpp b/Source/core/svg/SVGTransformList.cpp
|
| index 652fa55f04f36a2bd0c0d6af9d1951d37fdcd6a6..6e17b4f599995bb274759304ab0c9bc5e0c94f44 100644
|
| --- a/Source/core/svg/SVGTransformList.cpp
|
| +++ b/Source/core/svg/SVGTransformList.cpp
|
| @@ -351,4 +351,52 @@ float SVGTransformList::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase
|
| return SVGTransformDistance(at(0), toList->at(0)).distance();
|
| }
|
|
|
| +PassRefPtrWillBeRawPtr<SVGTransform>SVGTransformList::initialize(PassRefPtrWillBeRawPtr<SVGTransform> passNewItem)
|
| +{
|
| + RefPtrWillBeRawPtr<SVGTransform> newItem = passNewItem;
|
| +
|
| + // SVG2-Draft Spec: If newItem is already in a list, then a new SVGTransform object is created with the same values as newItem and this item is inserted into the list.
|
| + // Otherwise, newItem itself is inserted into the list.
|
| + if (newItem->ownerList())
|
| + return Base::initialize(newItem->clone());
|
| +
|
| + return Base::initialize(newItem);
|
| +}
|
| +
|
| +PassRefPtrWillBeRawPtr<SVGTransform> SVGTransformList::appendItem(PassRefPtrWillBeRawPtr<SVGTransform> passNewItem)
|
| +{
|
| + RefPtrWillBeRawPtr<SVGTransform> newItem = passNewItem;
|
| +
|
| + // SVG2-Draft Spec: If newItem is already in a list, then a new SVGTransform object is created with the same values as newItem and this item is inserted into the list.
|
| + // Otherwise, newItem itself is inserted into the list.
|
| + if (newItem->ownerList())
|
| + return Base::appendItem(newItem->clone());
|
| +
|
| + return Base::appendItem(newItem);
|
| +}
|
| +
|
| +PassRefPtrWillBeRawPtr<SVGTransform> SVGTransformList::insertItemBefore(PassRefPtrWillBeRawPtr<SVGTransform> passNewItem, size_t index)
|
| +{
|
| + RefPtrWillBeRawPtr<SVGTransform> newItem = passNewItem;
|
| +
|
| + // SVG2-Draft Spec: If newItem is already in a list, then a new SVGTransform object is created with the same values as newItem and this item is inserted into the list.
|
| + // Otherwise, newItem itself is inserted into the list.
|
| + if (newItem->ownerList())
|
| + return Base::insertItemBefore(newItem->clone(), index);
|
| +
|
| + return Base::insertItemBefore(newItem, index);
|
| +}
|
| +
|
| +PassRefPtrWillBeRawPtr<SVGTransform> SVGTransformList::replaceItem(PassRefPtrWillBeRawPtr<SVGTransform> passNewItem, size_t index, ExceptionState& exceptionState)
|
| +{
|
| + RefPtrWillBeRawPtr<SVGTransform> newItem = passNewItem;
|
| +
|
| + // SVG2-Draft Spec: If newItem is already in a list, then a new SVGTransform object is created with the same values as newItem and this item is inserted into the list.
|
| + // Otherwise, newItem itself is inserted into the list.
|
| + if (newItem->ownerList())
|
| + return Base::replaceItem(newItem->clone(), index, exceptionState);
|
| +
|
| + return Base::replaceItem(newItem, index, exceptionState);
|
| +}
|
| +
|
| }
|
|
|