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

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

Issue 1177303004: Updated SVGListPropertyHelper as per SVG2 Spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixed presubmit error Created 5 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
« no previous file with comments | « Source/core/svg/SVGPathSegLinetoVerticalRel.h ('k') | Source/core/svg/SVGPathSegMovetoAbs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPathSegListTearOff.h
diff --git a/Source/core/svg/SVGPathSegListTearOff.h b/Source/core/svg/SVGPathSegListTearOff.h
index b95e6b20a6657d40b87fad6d2deaf47eeff7c76b..52400e355f3f850945382eb549ddc54d94e19b41 100644
--- a/Source/core/svg/SVGPathSegListTearOff.h
+++ b/Source/core/svg/SVGPathSegListTearOff.h
@@ -48,6 +48,13 @@ public:
{
ASSERT(attributeName == SVGNames::dAttr);
RefPtrWillBeRawPtr<ItemTearOffType> newItem = passNewItem;
+
+ // Spec: If newItem is already in a list, then a new SVGPathSeg 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.
+ // https://svgwg.org/svg2-draft/paths.html#InterfaceSVGPathSegList
+ if (newItem->ownerList())
+ newItem = newItem->clone();
+
newItem->setContextElement(contextElement);
return newItem.release();
}
« no previous file with comments | « Source/core/svg/SVGPathSegLinetoVerticalRel.h ('k') | Source/core/svg/SVGPathSegMovetoAbs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698