| 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 26 matching lines...) Expand all Loading... |
| 37 SVGElement::trace(visitor); | 37 SVGElement::trace(visitor); |
| 38 } | 38 } |
| 39 | 39 |
| 40 DEFINE_NODE_FACTORY(SVGStopElement) | 40 DEFINE_NODE_FACTORY(SVGStopElement) |
| 41 | 41 |
| 42 void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName) | 42 void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName) |
| 43 { | 43 { |
| 44 if (attrName == SVGNames::offsetAttr) { | 44 if (attrName == SVGNames::offsetAttr) { |
| 45 SVGElement::InvalidationGuard invalidationGuard(this); | 45 SVGElement::InvalidationGuard invalidationGuard(this); |
| 46 | 46 |
| 47 if (layoutObject()) | 47 if (hasLayoutObject()) |
| 48 markForLayoutAndParentResourceInvalidation(layoutObject()); | 48 markForLayoutAndParentResourceInvalidation(layoutObject()); |
| 49 return; | 49 return; |
| 50 } | 50 } |
| 51 | 51 |
| 52 SVGElement::svgAttributeChanged(attrName); | 52 SVGElement::svgAttributeChanged(attrName); |
| 53 } | 53 } |
| 54 | 54 |
| 55 LayoutObject* SVGStopElement::createLayoutObject(const ComputedStyle&) | 55 LayoutObject* SVGStopElement::createLayoutObject(const ComputedStyle&) |
| 56 { | 56 { |
| 57 return new LayoutSVGGradientStop(this); | 57 return new LayoutSVGGradientStop(this); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 69 // which the layoutObject or style is null. This entire class is scheduled f
or removal (Bug WK 86941) | 69 // which the layoutObject or style is null. This entire class is scheduled f
or removal (Bug WK 86941) |
| 70 // and we will tolerate this null check until then. | 70 // and we will tolerate this null check until then. |
| 71 if (!style) | 71 if (!style) |
| 72 return Color(Color::transparent); // Transparent black. | 72 return Color(Color::transparent); // Transparent black. |
| 73 | 73 |
| 74 const SVGComputedStyle& svgStyle = style->svgStyle(); | 74 const SVGComputedStyle& svgStyle = style->svgStyle(); |
| 75 return svgStyle.stopColor().combineWithAlpha(svgStyle.stopOpacity()); | 75 return svgStyle.stopColor().combineWithAlpha(svgStyle.stopOpacity()); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace blink | 78 } // namespace blink |
| OLD | NEW |