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

Side by Side Diff: Source/core/svg/SVGPolyElement.cpp

Issue 55893002: <animate> not working on SVG Polygons. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGPolyElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 28 matching lines...) Expand all
39 s_propertyInfo = new SVGPropertyInfo(AnimatedPoints, 39 s_propertyInfo = new SVGPropertyInfo(AnimatedPoints,
40 PropertyIsReadWrite, 40 PropertyIsReadWrite,
41 SVGNames::pointsAttr, 41 SVGNames::pointsAttr,
42 SVGNames::pointsAttr.localName(), 42 SVGNames::pointsAttr.localName(),
43 &SVGPolyElement::synchronizePoints, 43 &SVGPolyElement::synchronizePoints,
44 &SVGPolyElement::lookupOrCreatePoin tsWrapper); 44 &SVGPolyElement::lookupOrCreatePoin tsWrapper);
45 } 45 }
46 return s_propertyInfo; 46 return s_propertyInfo;
47 } 47 }
48 48
49 SVGPointList& SVGPolyElement::pointsCurrentValue()
50 {
51 SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SVGPolyEle ment, SVGAnimatedPointList>(this, pointsPropertyInfo());
52 if (wrapper && wrapper->isAnimating()) {
53 if (SVGListPropertyTearOff<SVGPointList>* ap = animatedPoints())
54 return ap->values();
55 }
56
57 return m_points.value;
58 }
59
49 // Animated property definitions 60 // Animated property definitions
50 DEFINE_ANIMATED_BOOLEAN(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 61 DEFINE_ANIMATED_BOOLEAN(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
51 62
52 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGPolyElement) 63 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGPolyElement)
53 REGISTER_LOCAL_ANIMATED_PROPERTY(points) 64 REGISTER_LOCAL_ANIMATED_PROPERTY(points)
54 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 65 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
55 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 66 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
56 END_REGISTER_ANIMATED_PROPERTIES 67 END_REGISTER_ANIMATED_PROPERTIES
57 68
58 SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document& document) 69 SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document& document)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cas t<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->baseVal()); 160 return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cas t<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->baseVal());
150 } 161 }
151 162
152 SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::animatedPoints() 163 SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::animatedPoints()
153 { 164 {
154 m_points.shouldSynchronize = true; 165 m_points.shouldSynchronize = true;
155 return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cas t<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->animVal()); 166 return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cas t<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->animVal());
156 } 167 }
157 168
158 } 169 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPolyElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698