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

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

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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/SVGPreserveAspectRatioTearOff.cpp ('k') | Source/core/svg/SVGRectElement.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) 2008 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 22 matching lines...) Expand all
33 33
34 inline SVGRadialGradientElement::SVGRadialGradientElement(Document& document) 34 inline SVGRadialGradientElement::SVGRadialGradientElement(Document& document)
35 : SVGGradientElement(SVGNames::radialGradientTag, document) 35 : SVGGradientElement(SVGNames::radialGradientTag, document)
36 , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(L engthModeWidth), AllowNegativeLengths)) 36 , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(L engthModeWidth), AllowNegativeLengths))
37 , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(L engthModeHeight), AllowNegativeLengths)) 37 , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(L engthModeHeight), AllowNegativeLengths))
38 , m_r(SVGAnimatedLength::create(this, SVGNames::rAttr, SVGLength::create(Len gthModeOther), ForbidNegativeLengths)) 38 , m_r(SVGAnimatedLength::create(this, SVGNames::rAttr, SVGLength::create(Len gthModeOther), ForbidNegativeLengths))
39 , m_fx(SVGAnimatedLength::create(this, SVGNames::fxAttr, SVGLength::create(L engthModeWidth), AllowNegativeLengths)) 39 , m_fx(SVGAnimatedLength::create(this, SVGNames::fxAttr, SVGLength::create(L engthModeWidth), AllowNegativeLengths))
40 , m_fy(SVGAnimatedLength::create(this, SVGNames::fyAttr, SVGLength::create(L engthModeHeight), AllowNegativeLengths)) 40 , m_fy(SVGAnimatedLength::create(this, SVGNames::fyAttr, SVGLength::create(L engthModeHeight), AllowNegativeLengths))
41 , m_fr(SVGAnimatedLength::create(this, SVGNames::frAttr, SVGLength::create(L engthModeOther), ForbidNegativeLengths)) 41 , m_fr(SVGAnimatedLength::create(this, SVGNames::frAttr, SVGLength::create(L engthModeOther), ForbidNegativeLengths))
42 { 42 {
43 ScriptWrappable::init(this);
44
45 // Spec: If the cx/cy/r attribute is not specified, the effect is as if a va lue of "50%" were specified. 43 // Spec: If the cx/cy/r attribute is not specified, the effect is as if a va lue of "50%" were specified.
46 m_cx->setDefaultValueAsString("50%"); 44 m_cx->setDefaultValueAsString("50%");
47 m_cy->setDefaultValueAsString("50%"); 45 m_cy->setDefaultValueAsString("50%");
48 m_r->setDefaultValueAsString("50%"); 46 m_r->setDefaultValueAsString("50%");
49 47
50 // SVG2-Draft Spec: If the fr attributed is not specified, the effect is as if a value of "0%" were specified. 48 // SVG2-Draft Spec: If the fr attributed is not specified, the effect is as if a value of "0%" were specified.
51 m_fr->setDefaultValueAsString("0%"); 49 m_fr->setDefaultValueAsString("0%");
52 50
53 addToPropertyMap(m_cx); 51 addToPropertyMap(m_cx);
54 addToPropertyMap(m_cy); 52 addToPropertyMap(m_cy);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 bool SVGRadialGradientElement::selfHasRelativeLengths() const 204 bool SVGRadialGradientElement::selfHasRelativeLengths() const
207 { 205 {
208 return m_cx->currentValue()->isRelative() 206 return m_cx->currentValue()->isRelative()
209 || m_cy->currentValue()->isRelative() 207 || m_cy->currentValue()->isRelative()
210 || m_r->currentValue()->isRelative() 208 || m_r->currentValue()->isRelative()
211 || m_fx->currentValue()->isRelative() 209 || m_fx->currentValue()->isRelative()
212 || m_fy->currentValue()->isRelative() 210 || m_fy->currentValue()->isRelative()
213 || m_fr->currentValue()->isRelative(); 211 || m_fr->currentValue()->isRelative();
214 } 212 }
215 213
216 } 214 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPreserveAspectRatioTearOff.cpp ('k') | Source/core/svg/SVGRectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698