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

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp

Issue 1375793003: Update error-handling for fe*Lighting and feTurbulence (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/platform/graphics/filters/FELighting.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp b/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp
index 6204756561597a72ea4424d998ba024b26666242..47afd5dc343bf9750fa2cd2b02f8b3e630ebab11 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FELighting.cpp
@@ -61,6 +61,9 @@ FloatRect FELighting::mapPaintRect(const FloatRect& rect, bool)
PassRefPtr<SkImageFilter> FELighting::createImageFilter(SkiaImageFilterBuilder* builder)
{
+ if (!m_lightSource)
+ return createTransparentBlack(builder);
+
SkImageFilter::CropRect rect = getCropRect(builder ? builder->cropOffset() : FloatSize());
Color lightColor = adaptColorToOperatingColorSpace(m_lightingColor);
RefPtr<SkImageFilter> input(builder ? builder->build(inputEffect(0), operatingColorSpace()) : nullptr);

Powered by Google App Engine
This is Rietveld 408576698