From 9777b7565bd8c9e43e8af9203d794654c1f51589 Mon Sep 17 00:00:00 2001 From: "simon.fraser@apple.com" Date: Mon, 12 Nov 2018 17:58:56 +0000 Subject: [PATCH] feFlood with alpha color doesn't work correctly https://bugs.webkit.org/show_bug.cgi?id=163666 Reviewed by Zalan Bujtas. Source/WebCore: FEFlood::platformApplySoftware() erroneously used colorWithOverrideAlpha() rather than multiplying the flood color with the flood opacity as other browsers do. Test: svg/filters/feFlood-with-alpha-color.html * platform/graphics/Color.cpp: (WebCore::Color::colorWithAlpha const): I tried using colorWithAlphaMultipliedBy() elsewhere, and it triggered a behavior change, so add a comment. * platform/graphics/filters/FEFlood.cpp: (WebCore::FEFlood::platformApplySoftware): * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::stopColorIncludingOpacity const): LayoutTests: * svg/filters/feFlood-with-alpha-color-expected.html: Added. * svg/filters/feFlood-with-alpha-color.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238094 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 10 ++++++++++ .../filters/feFlood-with-alpha-color-expected.html | 10 ++++++++++ .../svg/filters/feFlood-with-alpha-color.html | 19 +++++++++++++++++++ Source/WebCore/ChangeLog | 20 ++++++++++++++++++++ Source/WebCore/platform/graphics/Color.cpp | 2 +- Source/WebCore/platform/graphics/filters/FEFlood.cpp | 4 +++- Source/WebCore/svg/SVGStopElement.cpp | 7 +++---- 7 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 LayoutTests/svg/filters/feFlood-with-alpha-color-expected.html create mode 100644 LayoutTests/svg/filters/feFlood-with-alpha-color.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 298fa83..cf70365 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,13 @@ +2018-11-12 Simon Fraser + + feFlood with alpha color doesn't work correctly + https://bugs.webkit.org/show_bug.cgi?id=163666 + + Reviewed by Zalan Bujtas. + + * svg/filters/feFlood-with-alpha-color-expected.html: Added. + * svg/filters/feFlood-with-alpha-color.html: Added. + 2018-11-12 Eric Carlson Require