| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 } | 90 } |
| 91 | 91 |
| 92 LayoutObject* SVGLinearGradientElement::createLayoutObject( | 92 LayoutObject* SVGLinearGradientElement::createLayoutObject( |
| 93 const ComputedStyle&) { | 93 const ComputedStyle&) { |
| 94 return new LayoutSVGResourceLinearGradient(this); | 94 return new LayoutSVGResourceLinearGradient(this); |
| 95 } | 95 } |
| 96 | 96 |
| 97 static void setGradientAttributes(const SVGGradientElement& element, | 97 static void setGradientAttributes(const SVGGradientElement& element, |
| 98 LinearGradientAttributes& attributes, | 98 LinearGradientAttributes& attributes, |
| 99 bool isLinear) { | 99 bool isLinear) { |
| 100 element.synchronizeAnimatedSVGAttribute(anyQName()); |
| 100 element.collectCommonAttributes(attributes); | 101 element.collectCommonAttributes(attributes); |
| 101 | 102 |
| 102 if (!isLinear) | 103 if (!isLinear) |
| 103 return; | 104 return; |
| 104 const SVGLinearGradientElement& linear = toSVGLinearGradientElement(element); | 105 const SVGLinearGradientElement& linear = toSVGLinearGradientElement(element); |
| 105 | 106 |
| 106 if (!attributes.hasX1() && linear.x1()->isSpecified()) | 107 if (!attributes.hasX1() && linear.x1()->isSpecified()) |
| 107 attributes.setX1(linear.x1()->currentValue()); | 108 attributes.setX1(linear.x1()->currentValue()); |
| 108 | 109 |
| 109 if (!attributes.hasY1() && linear.y1()->isSpecified()) | 110 if (!attributes.hasY1() && linear.y1()->isSpecified()) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 138 } | 139 } |
| 139 | 140 |
| 140 bool SVGLinearGradientElement::selfHasRelativeLengths() const { | 141 bool SVGLinearGradientElement::selfHasRelativeLengths() const { |
| 141 return m_x1->currentValue()->isRelative() || | 142 return m_x1->currentValue()->isRelative() || |
| 142 m_y1->currentValue()->isRelative() || | 143 m_y1->currentValue()->isRelative() || |
| 143 m_x2->currentValue()->isRelative() || | 144 m_x2->currentValue()->isRelative() || |
| 144 m_y2->currentValue()->isRelative(); | 145 m_y2->currentValue()->isRelative(); |
| 145 } | 146 } |
| 146 | 147 |
| 147 } // namespace blink | 148 } // namespace blink |
| OLD | NEW |