| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 inline SVGLinearGradientElement::SVGLinearGradientElement(Document& document) | 35 inline SVGLinearGradientElement::SVGLinearGradientElement(Document& document) |
| 36 : SVGGradientElement(SVGNames::linearGradientTag, document) | 36 : SVGGradientElement(SVGNames::linearGradientTag, document) |
| 37 , m_x1(SVGAnimatedLength::create(this, SVGNames::x1Attr, SVGLength::create(L
engthModeWidth), AllowNegativeLengths)) | 37 , m_x1(SVGAnimatedLength::create(this, SVGNames::x1Attr, SVGLength::create(L
engthModeWidth), AllowNegativeLengths)) |
| 38 , m_y1(SVGAnimatedLength::create(this, SVGNames::y1Attr, SVGLength::create(L
engthModeHeight), AllowNegativeLengths)) | 38 , m_y1(SVGAnimatedLength::create(this, SVGNames::y1Attr, SVGLength::create(L
engthModeHeight), AllowNegativeLengths)) |
| 39 , m_x2(SVGAnimatedLength::create(this, SVGNames::x2Attr, SVGLength::create(L
engthModeWidth), AllowNegativeLengths)) | 39 , m_x2(SVGAnimatedLength::create(this, SVGNames::x2Attr, SVGLength::create(L
engthModeWidth), AllowNegativeLengths)) |
| 40 , m_y2(SVGAnimatedLength::create(this, SVGNames::y2Attr, SVGLength::create(L
engthModeHeight), AllowNegativeLengths)) | 40 , m_y2(SVGAnimatedLength::create(this, SVGNames::y2Attr, SVGLength::create(L
engthModeHeight), AllowNegativeLengths)) |
| 41 { | 41 { |
| 42 ScriptWrappable::init(this); | |
| 43 | |
| 44 // Spec: If the x2 attribute is not specified, the effect is as if a value o
f "100%" were specified. | 42 // Spec: If the x2 attribute is not specified, the effect is as if a value o
f "100%" were specified. |
| 45 m_x2->setDefaultValueAsString("100%"); | 43 m_x2->setDefaultValueAsString("100%"); |
| 46 | 44 |
| 47 addToPropertyMap(m_x1); | 45 addToPropertyMap(m_x1); |
| 48 addToPropertyMap(m_y1); | 46 addToPropertyMap(m_y1); |
| 49 addToPropertyMap(m_x2); | 47 addToPropertyMap(m_x2); |
| 50 addToPropertyMap(m_y2); | 48 addToPropertyMap(m_y2); |
| 51 } | 49 } |
| 52 | 50 |
| 53 DEFINE_NODE_FACTORY(SVGLinearGradientElement) | 51 DEFINE_NODE_FACTORY(SVGLinearGradientElement) |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 } | 176 } |
| 179 | 177 |
| 180 bool SVGLinearGradientElement::selfHasRelativeLengths() const | 178 bool SVGLinearGradientElement::selfHasRelativeLengths() const |
| 181 { | 179 { |
| 182 return m_x1->currentValue()->isRelative() | 180 return m_x1->currentValue()->isRelative() |
| 183 || m_y1->currentValue()->isRelative() | 181 || m_y1->currentValue()->isRelative() |
| 184 || m_x2->currentValue()->isRelative() | 182 || m_x2->currentValue()->isRelative() |
| 185 || m_y2->currentValue()->isRelative(); | 183 || m_y2->currentValue()->isRelative(); |
| 186 } | 184 } |
| 187 | 185 |
| 188 } | 186 } // namespace blink |
| OLD | NEW |