| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 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 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 namespace blink { | 26 namespace blink { |
| 27 | 27 |
| 28 inline SVGStopElement::SVGStopElement(Document& document) | 28 inline SVGStopElement::SVGStopElement(Document& document) |
| 29 : SVGElement(SVGNames::stopTag, document) | 29 : SVGElement(SVGNames::stopTag, document) |
| 30 , m_offset(SVGAnimatedNumber::create(this, SVGNames::offsetAttr, SVGNumberAc
ceptPercentage::create())) | 30 , m_offset(SVGAnimatedNumber::create(this, SVGNames::offsetAttr, SVGNumberAc
ceptPercentage::create())) |
| 31 { | 31 { |
| 32 addToPropertyMap(m_offset); | 32 addToPropertyMap(m_offset); |
| 33 } | 33 } |
| 34 | 34 |
| 35 void SVGStopElement::trace(Visitor* visitor) |
| 36 { |
| 37 visitor->trace(m_offset); |
| 38 SVGElement::trace(visitor); |
| 39 } |
| 40 |
| 35 DEFINE_NODE_FACTORY(SVGStopElement) | 41 DEFINE_NODE_FACTORY(SVGStopElement) |
| 36 | 42 |
| 37 void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) | 43 void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) |
| 38 { | 44 { |
| 39 parseAttributeNew(name, value); | 45 parseAttributeNew(name, value); |
| 40 } | 46 } |
| 41 | 47 |
| 42 void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName) | 48 void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName) |
| 43 { | 49 { |
| 44 if (attrName == SVGNames::offsetAttr) { | 50 if (attrName == SVGNames::offsetAttr) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 69 // which the renderer or style is null. This entire class is scheduled for r
emoval (Bug WK 86941) | 75 // which the renderer or style is null. This entire class is scheduled for r
emoval (Bug WK 86941) |
| 70 // and we will tolerate this null check until then. | 76 // and we will tolerate this null check until then. |
| 71 if (!style) | 77 if (!style) |
| 72 return Color(Color::transparent); // Transparent black. | 78 return Color(Color::transparent); // Transparent black. |
| 73 | 79 |
| 74 const SVGRenderStyle& svgStyle = style->svgStyle(); | 80 const SVGRenderStyle& svgStyle = style->svgStyle(); |
| 75 return svgStyle.stopColor().combineWithAlpha(svgStyle.stopOpacity()); | 81 return svgStyle.stopColor().combineWithAlpha(svgStyle.stopOpacity()); |
| 76 } | 82 } |
| 77 | 83 |
| 78 } // namespace blink | 84 } // namespace blink |
| OLD | NEW |