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 14 matching lines...) Expand all Loading... |
25 #include "core/svg/SVGLinearGradientElement.h" | 25 #include "core/svg/SVGLinearGradientElement.h" |
26 | 26 |
27 #include "core/layout/svg/LayoutSVGResourceLinearGradient.h" | 27 #include "core/layout/svg/LayoutSVGResourceLinearGradient.h" |
28 #include "core/svg/LinearGradientAttributes.h" | 28 #include "core/svg/LinearGradientAttributes.h" |
29 #include "core/svg/SVGLength.h" | 29 #include "core/svg/SVGLength.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 inline SVGLinearGradientElement::SVGLinearGradientElement(Document& document) | 33 inline SVGLinearGradientElement::SVGLinearGradientElement(Document& document) |
34 : SVGGradientElement(SVGNames::linearGradientTag, document) | 34 : SVGGradientElement(SVGNames::linearGradientTag, document) |
35 , m_x1(SVGAnimatedLength::create(this, SVGNames::x1Attr, SVGLength::create(L
engthModeWidth), AllowNegativeLengths)) | 35 , m_x1(SVGAnimatedLength::create(this, SVGNames::x1Attr, SVGLength::create(S
VGLengthMode::Width), AllowNegativeLengths)) |
36 , m_y1(SVGAnimatedLength::create(this, SVGNames::y1Attr, SVGLength::create(L
engthModeHeight), AllowNegativeLengths)) | 36 , m_y1(SVGAnimatedLength::create(this, SVGNames::y1Attr, SVGLength::create(S
VGLengthMode::Height), AllowNegativeLengths)) |
37 , m_x2(SVGAnimatedLength::create(this, SVGNames::x2Attr, SVGLength::create(L
engthModeWidth), AllowNegativeLengths)) | 37 , m_x2(SVGAnimatedLength::create(this, SVGNames::x2Attr, SVGLength::create(S
VGLengthMode::Width), AllowNegativeLengths)) |
38 , m_y2(SVGAnimatedLength::create(this, SVGNames::y2Attr, SVGLength::create(L
engthModeHeight), AllowNegativeLengths)) | 38 , m_y2(SVGAnimatedLength::create(this, SVGNames::y2Attr, SVGLength::create(S
VGLengthMode::Height), AllowNegativeLengths)) |
39 { | 39 { |
40 // Spec: If the x2 attribute is not specified, the effect is as if a value o
f "100%" were specified. | 40 // Spec: If the x2 attribute is not specified, the effect is as if a value o
f "100%" were specified. |
41 m_x2->setDefaultValueAsString("100%"); | 41 m_x2->setDefaultValueAsString("100%"); |
42 | 42 |
43 addToPropertyMap(m_x1); | 43 addToPropertyMap(m_x1); |
44 addToPropertyMap(m_y1); | 44 addToPropertyMap(m_y1); |
45 addToPropertyMap(m_x2); | 45 addToPropertyMap(m_x2); |
46 addToPropertyMap(m_y2); | 46 addToPropertyMap(m_y2); |
47 } | 47 } |
48 | 48 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 bool SVGLinearGradientElement::selfHasRelativeLengths() const | 170 bool SVGLinearGradientElement::selfHasRelativeLengths() const |
171 { | 171 { |
172 return m_x1->currentValue()->isRelative() | 172 return m_x1->currentValue()->isRelative() |
173 || m_y1->currentValue()->isRelative() | 173 || m_y1->currentValue()->isRelative() |
174 || m_x2->currentValue()->isRelative() | 174 || m_x2->currentValue()->isRelative() |
175 || m_y2->currentValue()->isRelative(); | 175 || m_y2->currentValue()->isRelative(); |
176 } | 176 } |
177 | 177 |
178 } // namespace blink | 178 } // namespace blink |
OLD | NEW |