Index: third_party/WebKit/Source/core/svg/SVGFEFloodElement.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGFEFloodElement.cpp b/third_party/WebKit/Source/core/svg/SVGFEFloodElement.cpp |
index 663a9807fa181a56a8e2a8479bd40289d5304bc2..3f2a25d9ad50e9e15abea316dc97ff526a0236d4 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGFEFloodElement.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGFEFloodElement.cpp |
@@ -53,16 +53,15 @@ bool SVGFEFloodElement::setFilterEffectAttribute(FilterEffect* effect, const Qua |
PassRefPtrWillBeRawPtr<FilterEffect> SVGFEFloodElement::build(SVGFilterBuilder*, Filter* filter) |
{ |
- LayoutObject* layoutObject = this->layoutObject(); |
- if (!layoutObject) |
- return nullptr; |
- |
- ASSERT(layoutObject->style()); |
- const SVGComputedStyle& svgStyle = layoutObject->style()->svgStyle(); |
- |
- Color color = svgStyle.floodColor(); |
- float opacity = svgStyle.floodOpacity(); |
+ Color color = Color::black; |
+ float opacity = 1; |
+ if (LayoutObject* layoutObject = this->layoutObject()) { |
+ ASSERT(layoutObject->style()); |
+ const SVGComputedStyle& svgStyle = layoutObject->styleRef().svgStyle(); |
+ color = svgStyle.floodColor(); |
+ opacity = svgStyle.floodOpacity(); |
+ } |
return FEFlood::create(filter, color, opacity); |
} |