| OLD | NEW |
| 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 Loading... |
| 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(S
VGLengthMode::Width), AllowNegativeLengths)) | 34 , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(S
VGLengthMode::Width))) |
| 35 , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(S
VGLengthMode::Height), AllowNegativeLengths)) | 35 , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(S
VGLengthMode::Height))) |
| 36 , m_r(SVGAnimatedLength::create(this, SVGNames::rAttr, SVGLength::create(SVG
LengthMode::Other), ForbidNegativeLengths)) | 36 , m_r(SVGAnimatedLength::create(this, SVGNames::rAttr, SVGLength::create(SVG
LengthMode::Other))) |
| 37 , m_fx(SVGAnimatedLength::create(this, SVGNames::fxAttr, SVGLength::create(S
VGLengthMode::Width), AllowNegativeLengths)) | 37 , m_fx(SVGAnimatedLength::create(this, SVGNames::fxAttr, SVGLength::create(S
VGLengthMode::Width))) |
| 38 , m_fy(SVGAnimatedLength::create(this, SVGNames::fyAttr, SVGLength::create(S
VGLengthMode::Height), AllowNegativeLengths)) | 38 , m_fy(SVGAnimatedLength::create(this, SVGNames::fyAttr, SVGLength::create(S
VGLengthMode::Height))) |
| 39 , m_fr(SVGAnimatedLength::create(this, SVGNames::frAttr, SVGLength::create(S
VGLengthMode::Other), ForbidNegativeLengths)) | 39 , m_fr(SVGAnimatedLength::create(this, SVGNames::frAttr, SVGLength::create(S
VGLengthMode::Other))) |
| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 { | 179 { |
| 180 return m_cx->currentValue()->isRelative() | 180 return m_cx->currentValue()->isRelative() |
| 181 || m_cy->currentValue()->isRelative() | 181 || m_cy->currentValue()->isRelative() |
| 182 || m_r->currentValue()->isRelative() | 182 || m_r->currentValue()->isRelative() |
| 183 || m_fx->currentValue()->isRelative() | 183 || m_fx->currentValue()->isRelative() |
| 184 || m_fy->currentValue()->isRelative() | 184 || m_fy->currentValue()->isRelative() |
| 185 || m_fr->currentValue()->isRelative(); | 185 || m_fr->currentValue()->isRelative(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace blink | 188 } // namespace blink |
| OLD | NEW |