| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 SVGElement::InvalidationGuard invalidationGuard(this); | 46 SVGElement::InvalidationGuard invalidationGuard(this); |
| 47 | 47 |
| 48 if (layoutObject()) | 48 if (layoutObject()) |
| 49 markForLayoutAndParentResourceInvalidation(layoutObject()); | 49 markForLayoutAndParentResourceInvalidation(layoutObject()); |
| 50 return; | 50 return; |
| 51 } | 51 } |
| 52 | 52 |
| 53 SVGElement::svgAttributeChanged(attrName); | 53 SVGElement::svgAttributeChanged(attrName); |
| 54 } | 54 } |
| 55 | 55 |
| 56 LayoutObject* SVGStopElement::createLayoutObject(const LayoutStyle&) | 56 LayoutObject* SVGStopElement::createLayoutObject(const ComputedStyle&) |
| 57 { | 57 { |
| 58 return new LayoutSVGGradientStop(this); | 58 return new LayoutSVGGradientStop(this); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool SVGStopElement::layoutObjectIsNeeded(const LayoutStyle&) | 61 bool SVGStopElement::layoutObjectIsNeeded(const ComputedStyle&) |
| 62 { | 62 { |
| 63 return true; | 63 return true; |
| 64 } | 64 } |
| 65 | 65 |
| 66 Color SVGStopElement::stopColorIncludingOpacity() const | 66 Color SVGStopElement::stopColorIncludingOpacity() const |
| 67 { | 67 { |
| 68 const LayoutStyle* style = layoutObject() ? layoutObject()->style() : nullpt
r; | 68 const ComputedStyle* style = layoutObject() ? layoutObject()->style() : null
ptr; |
| 69 // FIXME: This check for null style exists to address Bug WK 90814, a rare c
rash condition in | 69 // FIXME: This check for null style exists to address Bug WK 90814, a rare c
rash condition in |
| 70 // which the renderer or style is null. This entire class is scheduled for r
emoval (Bug WK 86941) | 70 // which the renderer or style is null. This entire class is scheduled for r
emoval (Bug WK 86941) |
| 71 // and we will tolerate this null check until then. | 71 // and we will tolerate this null check until then. |
| 72 if (!style) | 72 if (!style) |
| 73 return Color(Color::transparent); // Transparent black. | 73 return Color(Color::transparent); // Transparent black. |
| 74 | 74 |
| 75 const SVGLayoutStyle& svgStyle = style->svgStyle(); | 75 const SVGComputedStyle& svgStyle = style->svgStyle(); |
| 76 return svgStyle.stopColor().combineWithAlpha(svgStyle.stopOpacity()); | 76 return svgStyle.stopColor().combineWithAlpha(svgStyle.stopOpacity()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace blink | 79 } // namespace blink |
| OLD | NEW |