Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: Source/core/svg/SVGPathSegListTearOff.h

Issue 321403004: SVG: Items inserted into list should be made a tear-off. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add baseline for mac Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/SVGPathSegListTearOff.h
diff --git a/Source/core/svg/SVGPathSegListTearOff.h b/Source/core/svg/SVGPathSegListTearOff.h
index f360f34fca57a23e7a83fd95d0238573f0afad1c..da3046188e8292bbd3ca6be365b5af87aee5d7a9 100644
--- a/Source/core/svg/SVGPathSegListTearOff.h
+++ b/Source/core/svg/SVGPathSegListTearOff.h
@@ -31,6 +31,7 @@
#ifndef SVGPathSegListTearOff_h
#define SVGPathSegListTearOff_h
+#include "SVGNames.h"
#include "core/svg/SVGPathSegList.h"
#include "core/svg/properties/SVGListPropertyTearOffHelper.h"
@@ -43,9 +44,12 @@ public:
// FIXME: Currently SVGPathSegitself is a tear-off.
typedef SVGPathSeg ItemTearOffType;
- static PassRefPtr<ItemPropertyType> getValueForInsertionFromTearOff(PassRefPtr<ItemTearOffType> passNewItem)
+ static PassRefPtr<ItemPropertyType> getValueForInsertionFromTearOff(PassRefPtr<ItemTearOffType> passNewItem, SVGElement* contextElement, const QualifiedName& attributeName)
{
- return passNewItem;
+ ASSERT(attributeName == SVGNames::dAttr);
+ RefPtr<ItemTearOffType> newItem = passNewItem;
+ newItem->setContextElement(contextElement);
+ return newItem.release();
}
static PassRefPtr<ItemTearOffType> createTearOff(PassRefPtr<ItemPropertyType> passValue, SVGElement* contextElement, PropertyIsAnimValType, const QualifiedName&)

Powered by Google App Engine
This is Rietveld 408576698