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

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

Issue 177803003: [SVG] Make all C-macros used in the old property implementation NOOP. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: styles 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/SVGGlyphRefElement.cpp ('k') | Source/core/svg/SVGGraphicsElement.cpp » ('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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 : SVGElement(tagName, document) 56 : SVGElement(tagName, document)
57 , SVGURIReference(this) 57 , SVGURIReference(this)
58 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi entTransformAttr, SVGTransformList::create())) 58 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi entTransformAttr, SVGTransformList::create()))
59 , m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, S VGNames::spreadMethodAttr, SVGSpreadMethodPad)) 59 , 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 )) 60 , m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create( this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX ))
61 { 61 {
62 ScriptWrappable::init(this); 62 ScriptWrappable::init(this);
63 addToPropertyMap(m_gradientTransform); 63 addToPropertyMap(m_gradientTransform);
64 addToPropertyMap(m_spreadMethod); 64 addToPropertyMap(m_spreadMethod);
65 addToPropertyMap(m_gradientUnits); 65 addToPropertyMap(m_gradientUnits);
66 registerAnimatedPropertiesForSVGGradientElement();
67 } 66 }
68 67
69 bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName) 68 bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName)
70 { 69 {
71 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 70 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
72 if (supportedAttributes.isEmpty()) { 71 if (supportedAttributes.isEmpty()) {
73 SVGURIReference::addSupportedAttributes(supportedAttributes); 72 SVGURIReference::addSupportedAttributes(supportedAttributes);
74 supportedAttributes.add(SVGNames::gradientUnitsAttr); 73 supportedAttributes.add(SVGNames::gradientUnitsAttr);
75 supportedAttributes.add(SVGNames::gradientTransformAttr); 74 supportedAttributes.add(SVGNames::gradientTransformAttr);
76 supportedAttributes.add(SVGNames::spreadMethodAttr); 75 supportedAttributes.add(SVGNames::spreadMethodAttr);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 float r, g, b, a; 147 float r, g, b, a;
149 color.getRGBA(r, g, b, a); 148 color.getRGBA(r, g, b, a);
150 149
151 stops.append(Gradient::ColorStop(offset, r, g, b, a)); 150 stops.append(Gradient::ColorStop(offset, r, g, b, a));
152 } 151 }
153 152
154 return stops; 153 return stops;
155 } 154 }
156 155
157 } 156 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGlyphRefElement.cpp ('k') | Source/core/svg/SVGGraphicsElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698