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

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

Issue 2359133003: Fix effect mapping computation for displacement-map w/ negative scale (Closed)
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/filters/feDisplacementMap-negative-scale-expected.html ('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/platform/graphics/filters/FEDisplacementMap.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FEDisplacementMap.cpp b/third_party/WebKit/Source/platform/graphics/filters/FEDisplacementMap.cpp
index 451ef102c1ef1d08828139d20148ca580a492924..71a5c331b26f56858c4d7a61362f05da3ef0f193 100644
--- a/third_party/WebKit/Source/platform/graphics/filters/FEDisplacementMap.cpp
+++ b/third_party/WebKit/Source/platform/graphics/filters/FEDisplacementMap.cpp
@@ -48,8 +48,8 @@ FEDisplacementMap* FEDisplacementMap::create(Filter* filter, ChannelSelectorType
FloatRect FEDisplacementMap::mapEffect(const FloatRect& rect) const
{
FloatRect result = rect;
- result.inflateX(getFilter()->applyHorizontalScale(m_scale / 2));
- result.inflateY(getFilter()->applyVerticalScale(m_scale / 2));
+ result.inflateX(getFilter()->applyHorizontalScale(std::abs(m_scale) / 2));
+ result.inflateY(getFilter()->applyVerticalScale(std::abs(m_scale) / 2));
return result;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/filters/feDisplacementMap-negative-scale-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698