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

Unified Diff: Source/core/svg/properties/SVGListPropertyTearOffHelper.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/properties/SVGListPropertyHelper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/properties/SVGListPropertyTearOffHelper.h
diff --git a/Source/core/svg/properties/SVGListPropertyTearOffHelper.h b/Source/core/svg/properties/SVGListPropertyTearOffHelper.h
index 08e46005a932fc9d9889d49543ebca9dc56f56df..d2cd09b2cc03e25085c529efe9084504038fb602 100644
--- a/Source/core/svg/properties/SVGListPropertyTearOffHelper.h
+++ b/Source/core/svg/properties/SVGListPropertyTearOffHelper.h
@@ -51,8 +51,9 @@ public:
// |newItem| is immutable, OR
// |newItem| belongs to a SVGElement, but it does not belong to an animated list
// (for example: "textElement.x.baseVal.appendItem(rectElement.width.baseVal)")
- if (newItem->isImmutable()
- || (newItem->contextElement() && !newItem->target()->ownerList())) {
+ // Spec: If newItem is already in a list, then a new 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->isImmutable() || newItem->target()->ownerList() || newItem->contextElement()) {
// We have to copy the incoming |newItem|,
// Otherwise we'll end up having two tearoffs that operate on the same SVGProperty. Consider the example below:
// SVGRectElements SVGAnimatedLength 'width' property baseVal points to the same tear off object
« no previous file with comments | « Source/core/svg/properties/SVGListPropertyHelper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698