Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
feComposite filter does not clip the paint rect to its effect rect wh…
…en the operator is 'in' or 'atop' https://bugs.webkit.org/show_bug.cgi?id=137856 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-06-09 Reviewed by Darin Adler. Source/WebCore: There was bug in calculating the absolutePaintRect of the feComposite filter when the operator is equal to 'in' or 'atop'. The absolutePaintRect was set to the absolutePaintRect of the background FilterEffect which is correct. What was missing is clipping this rectangle to the maxEffectRect of the filter which we do for other operators. Tests: svg/filters/feComposite-background-rect-control-operators.svg * platform/graphics/IntRect.h: (WebCore::operator-=): (WebCore::operator-): Add new operators to IntRect. * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::determineAbsolutePaintRect): Make sure the filter absolutePaintRect is clipped to maxEffectRect for all operators. (WebCore::FEComposite::platformApplySoftware): Code clean-up. * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::determineAbsolutePaintRect): Move the clipping part to a separate function. (WebCore::FilterEffect::clipAbsolutePaintRect): Clip the absolutePaintRect to the maxEffectRect of the filter. * platform/graphics/filters/FilterEffect.h: LayoutTests: * svg/filters/feComposite-background-rect-control-operators-expected.svg: Added. * svg/filters/feComposite-background-rect-control-operators.svg: Added. Ensure the painting rect of the feComposite filter with operator 'in' or 'atop' is clipped to its bounding rectangle Canonical link: https://commits.webkit.org/163864@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
5bbe6a2
commit c0f504d0844464c9eb672a3bd870b57e16879728
Showing
8 changed files
with
91 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters