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

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

Issue 177703004: [SVG] Remove SVGAnimatedPropertyMacros.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove ws Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGGradientElement.h ('k') | Source/core/svg/SVGGraphicsElement.h » ('j') | 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 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 29 matching lines...) Expand all
40 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); 40 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ());
41 if (entries.isEmpty()) { 41 if (entries.isEmpty()) {
42 entries.append(std::make_pair(SVGSpreadMethodUnknown, emptyString())); 42 entries.append(std::make_pair(SVGSpreadMethodUnknown, emptyString()));
43 entries.append(std::make_pair(SVGSpreadMethodPad, "pad")); 43 entries.append(std::make_pair(SVGSpreadMethodPad, "pad"));
44 entries.append(std::make_pair(SVGSpreadMethodReflect, "reflect")); 44 entries.append(std::make_pair(SVGSpreadMethodReflect, "reflect"));
45 entries.append(std::make_pair(SVGSpreadMethodRepeat, "repeat")); 45 entries.append(std::make_pair(SVGSpreadMethodRepeat, "repeat"));
46 } 46 }
47 return entries; 47 return entries;
48 } 48 }
49 49
50 // Animated property definitions
51 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGradientElement)
52 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
53 END_REGISTER_ANIMATED_PROPERTIES
54
55 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d ocument) 50 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d ocument)
56 : SVGElement(tagName, document) 51 : SVGElement(tagName, document)
57 , SVGURIReference(this) 52 , SVGURIReference(this)
58 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi entTransformAttr, SVGTransformList::create())) 53 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi entTransformAttr, SVGTransformList::create()))
59 , m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, S VGNames::spreadMethodAttr, SVGSpreadMethodPad)) 54 , m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, S VGNames::spreadMethodAttr, SVGSpreadMethodPad))
60 , m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create( this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX )) 55 , m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create( this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX ))
61 { 56 {
62 ScriptWrappable::init(this); 57 ScriptWrappable::init(this);
63 addToPropertyMap(m_gradientTransform); 58 addToPropertyMap(m_gradientTransform);
64 addToPropertyMap(m_spreadMethod); 59 addToPropertyMap(m_spreadMethod);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 float r, g, b, a; 142 float r, g, b, a;
148 color.getRGBA(r, g, b, a); 143 color.getRGBA(r, g, b, a);
149 144
150 stops.append(Gradient::ColorStop(offset, r, g, b, a)); 145 stops.append(Gradient::ColorStop(offset, r, g, b, a));
151 } 146 }
152 147
153 return stops; 148 return stops;
154 } 149 }
155 150
156 } 151 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGradientElement.h ('k') | Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698