Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp

Issue 1378163003: Use initial values for flood/lighting-color/flood-opacity when detached Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp b/third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp
index 24775e128e36b86bfa9db5dbe66bbbbb282017b1..3a7817a54f44b465fad3802214e6aa21fac2cbb9 100644
--- a/third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp
@@ -76,15 +76,15 @@ void SVGFEDropShadowElement::svgAttributeChanged(const QualifiedName& attrName)
PassRefPtrWillBeRawPtr<FilterEffect> SVGFEDropShadowElement::build(SVGFilterBuilder* filterBuilder, Filter* filter)
{
- LayoutObject* layoutObject = this->layoutObject();
- if (!layoutObject)
- return nullptr;
-
- ASSERT(layoutObject->style());
- const SVGComputedStyle& svgStyle = layoutObject->style()->svgStyle();
+ Color color = Color::black;
+ float opacity = 1;
+ if (LayoutObject* layoutObject = this->layoutObject()) {
+ ASSERT(layoutObject->style());
+ const SVGComputedStyle& svgStyle = layoutObject->styleRef().svgStyle();
- Color color = svgStyle.floodColor();
- float opacity = svgStyle.floodOpacity();
+ color = svgStyle.floodColor();
+ opacity = svgStyle.floodOpacity();
+ }
FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->currentValue()->value()));
if (!input1)

Powered by Google App Engine
This is Rietveld 408576698