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

Unified Diff: third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.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 | « third_party/WebKit/Source/core/svg/SVGFEFloodElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.cpp b/third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.cpp
index 09f2cc530576208c59ab9401c2cb3f218c6daf29..92c59c327dec8885321f05d079d1111a9a061efd 100644
--- a/third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.cpp
@@ -132,12 +132,11 @@ PassRefPtrWillBeRawPtr<FilterEffect> SVGFESpecularLightingElement::build(SVGFilt
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 | « third_party/WebKit/Source/core/svg/SVGFEFloodElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698