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

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: LayoutTests 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);
Erik Dahlström (inactive) 2014/06/11 08:31:32 Doesn't this need to set attributeName too? Like i
kouhei (in TOK) 2014/06/12 04:25:28 I think this is correct. SVGAnimateMotionElement d
Erik Dahlström (inactive) 2014/06/12 08:47:04 Fair enough for pathseglist then, but the other li
+ return newItem.release();
}
static PassRefPtr<ItemTearOffType> createTearOff(PassRefPtr<ItemPropertyType> passValue, SVGElement* contextElement, PropertyIsAnimValType, const QualifiedName&)

Powered by Google App Engine
This is Rietveld 408576698