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

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

Issue 966923003: Make SVGLengthMode an enum class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/SVGPatternElement.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 13 matching lines...) Expand all
24 #include "config.h" 24 #include "config.h"
25 #include "core/svg/SVGRadialGradientElement.h" 25 #include "core/svg/SVGRadialGradientElement.h"
26 26
27 #include "core/layout/svg/LayoutSVGResourceRadialGradient.h" 27 #include "core/layout/svg/LayoutSVGResourceRadialGradient.h"
28 #include "core/svg/RadialGradientAttributes.h" 28 #include "core/svg/RadialGradientAttributes.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 inline SVGRadialGradientElement::SVGRadialGradientElement(Document& document) 32 inline SVGRadialGradientElement::SVGRadialGradientElement(Document& document)
33 : SVGGradientElement(SVGNames::radialGradientTag, document) 33 : SVGGradientElement(SVGNames::radialGradientTag, document)
34 , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(L engthModeWidth), AllowNegativeLengths)) 34 , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(S VGLengthMode::Width), AllowNegativeLengths))
35 , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(L engthModeHeight), AllowNegativeLengths)) 35 , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(S VGLengthMode::Height), AllowNegativeLengths))
36 , m_r(SVGAnimatedLength::create(this, SVGNames::rAttr, SVGLength::create(Len gthModeOther), ForbidNegativeLengths)) 36 , m_r(SVGAnimatedLength::create(this, SVGNames::rAttr, SVGLength::create(SVG LengthMode::Other), ForbidNegativeLengths))
37 , m_fx(SVGAnimatedLength::create(this, SVGNames::fxAttr, SVGLength::create(L engthModeWidth), AllowNegativeLengths)) 37 , m_fx(SVGAnimatedLength::create(this, SVGNames::fxAttr, SVGLength::create(S VGLengthMode::Width), AllowNegativeLengths))
38 , m_fy(SVGAnimatedLength::create(this, SVGNames::fyAttr, SVGLength::create(L engthModeHeight), AllowNegativeLengths)) 38 , m_fy(SVGAnimatedLength::create(this, SVGNames::fyAttr, SVGLength::create(S VGLengthMode::Height), AllowNegativeLengths))
39 , m_fr(SVGAnimatedLength::create(this, SVGNames::frAttr, SVGLength::create(L engthModeOther), ForbidNegativeLengths)) 39 , m_fr(SVGAnimatedLength::create(this, SVGNames::frAttr, SVGLength::create(S VGLengthMode::Other), ForbidNegativeLengths))
40 { 40 {
41 // Spec: If the cx/cy/r attribute is not specified, the effect is as if a va lue of "50%" were specified. 41 // Spec: If the cx/cy/r attribute is not specified, the effect is as if a va lue of "50%" were specified.
42 m_cx->setDefaultValueAsString("50%"); 42 m_cx->setDefaultValueAsString("50%");
43 m_cy->setDefaultValueAsString("50%"); 43 m_cy->setDefaultValueAsString("50%");
44 m_r->setDefaultValueAsString("50%"); 44 m_r->setDefaultValueAsString("50%");
45 45
46 // SVG2-Draft Spec: If the fr attributed is not specified, the effect is as if a value of "0%" were specified. 46 // SVG2-Draft Spec: If the fr attributed is not specified, the effect is as if a value of "0%" were specified.
47 m_fr->setDefaultValueAsString("0%"); 47 m_fr->setDefaultValueAsString("0%");
48 48
49 addToPropertyMap(m_cx); 49 addToPropertyMap(m_cx);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 { 195 {
196 return m_cx->currentValue()->isRelative() 196 return m_cx->currentValue()->isRelative()
197 || m_cy->currentValue()->isRelative() 197 || m_cy->currentValue()->isRelative()
198 || m_r->currentValue()->isRelative() 198 || m_r->currentValue()->isRelative()
199 || m_fx->currentValue()->isRelative() 199 || m_fx->currentValue()->isRelative()
200 || m_fy->currentValue()->isRelative() 200 || m_fy->currentValue()->isRelative()
201 || m_fr->currentValue()->isRelative(); 201 || m_fr->currentValue()->isRelative();
202 } 202 }
203 203
204 } // namespace blink 204 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPatternElement.cpp ('k') | Source/core/svg/SVGRectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698