diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-18 13:59:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-18 13:59:28 +0200 |
commit | 4d6084feccab99c0a7b3ecef26bb49c41dd50201 (patch) | |
tree | fd1195897f551eee6d5a15d07ff5733b15aa2a5c /Source/WebCore/svg/SVGStopElement.cpp | |
parent | ae901828d4689ab9e89113f6b6ea8042b37a9fda (diff) | |
download | qtwebkit-4d6084feccab99c0a7b3ecef26bb49c41dd50201.tar.gz |
Imported WebKit commit ff52235a78888e5cb8e286a828a8698042200e67 (http://svn.webkit.org/repository/webkit/trunk@122948)
New snapshot that should fix the rendering issues recently introduced
Diffstat (limited to 'Source/WebCore/svg/SVGStopElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGStopElement.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/WebCore/svg/SVGStopElement.cpp b/Source/WebCore/svg/SVGStopElement.cpp index 87143ee62..5b0e69de3 100644 --- a/Source/WebCore/svg/SVGStopElement.cpp +++ b/Source/WebCore/svg/SVGStopElement.cpp @@ -113,10 +113,14 @@ bool SVGStopElement::rendererIsNeeded(const NodeRenderingContext&) Color SVGStopElement::stopColorIncludingOpacity() const { - ASSERT(renderer()); - ASSERT(renderer()->style()); - - const SVGRenderStyle* svgStyle = renderer()->style()->svgStyle(); + RenderStyle* style = renderer() ? renderer()->style() : 0; + // FIXME: This check for null style exists to address Bug WK 90814, a rare crash condition in + // which the renderer or style is null. This entire class is scheduled for removal (Bug WK 86941) + // and we will tolerate this null check until then. + if (!style || !style->svgStyle()) + return Color(Color::transparent, true); // Transparent black. + + const SVGRenderStyle* svgStyle = style->svgStyle(); return colorWithOverrideAlpha(svgStyle->stopColor().rgb(), svgStyle->stopOpacity()); } |