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

Unified Diff: Source/WebCore/platform/graphics/filters/FilterEffect.cpp

Issue 6909014: Merge 84422 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 8 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 | « LayoutTests/svg/filters/svg-transform-blur-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/filters/FilterEffect.cpp
===================================================================
--- Source/WebCore/platform/graphics/filters/FilterEffect.cpp (revision 85546)
+++ Source/WebCore/platform/graphics/filters/FilterEffect.cpp (working copy)
@@ -118,10 +118,14 @@
inline void FilterEffect::copyImageBytes(ByteArray* source, ByteArray* destination, const IntRect& rect)
{
- // Copy the necessary lines.
- if (rect.x() < 0 || rect.y() < 0 || rect.maxY() > m_absolutePaintRect.width() || rect.maxY() > m_absolutePaintRect.height())
+ // Initialize the destination to transparent black, if not entirely covered by the source.
+ if (rect.x() < 0 || rect.y() < 0 || rect.maxX() > m_absolutePaintRect.width() || rect.maxY() > m_absolutePaintRect.height())
memset(destination->data(), 0, destination->length());
+ // Early return if the rect does not intersect with the source.
+ if (rect.maxX() <= 0 || rect.maxY() <= 0 || rect.x() >= m_absolutePaintRect.width() || rect.y() >= m_absolutePaintRect.height())
+ return;
+
int xOrigin = rect.x();
int xDest = 0;
if (xOrigin < 0) {
« no previous file with comments | « LayoutTests/svg/filters/svg-transform-blur-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698