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

Unified Diff: third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.cpp b/third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.cpp
index 791b0c8ef4911905fa5eae52720cf55403469689..195adf34c9b063621ece835ca60fb8d3517224a5 100644
--- a/third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGFEDiffuseLightingElement.cpp
@@ -126,12 +126,11 @@ PassRefPtrWillBeRawPtr<FilterEffect> SVGFEDiffuseLightingElement::build(SVGFilte
if (!input1)
return nullptr;
- LayoutObject* layoutObject = this->layoutObject();
- if (!layoutObject)
- return nullptr;
-
- ASSERT(layoutObject->style());
- Color color = layoutObject->style()->svgStyle().lightingColor();
+ Color color = Color::white;
+ if (LayoutObject* layoutObject = this->layoutObject()) {
+ ASSERT(layoutObject->style());
+ color = layoutObject->styleRef().svgStyle().lightingColor();
+ }
const SVGFELightElement* lightNode = SVGFELightElement::findLightElement(*this);
RefPtr<LightSource> lightSource = lightNode ? lightNode->lightSource(filter) : nullptr;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698