RESOLVED FIXED 254062
[Filters] Calculating the CSSFilter geometry and clipping sometimes is incorrect
https://bugs.webkit.org/show_bug.cgi?id=254062
Summary [Filters] Calculating the CSSFilter geometry and clipping sometimes is incorrect
Said Abou-Hallawa
Reported 2023-03-16 22:43:25 PDT
Like SVGFilter, CSSFilter should always intersect the FilterEffect imageRect with its primitiveSubregion. This will require: 1. Filter::ClipOperation will be removed. 2. Filter::clipToMaxEffectRect() will always clip the rectangle with maxEffectRect. 3. FilterEffect::calculateImageRect() will return the maxEffectRect if number of input effects is zero. This was a bug which was covered by the union mode of Filter::clipToMaxEffectRect(). 4. RenderLayerFilters::beginFilterEffect() should set its targetBoundingBox the sourceImageRect of FilterTargetSwitcher. 5. SVGFilterGraph::getNamedNodes() should not return an error if one of the inputs is builtin and there is no node for it. This happens when we build a graph of primitives and one of the inputs is SourceGraphic or SourceAlpha. In this case we just need to ignore this input since there is no built-in primitive for it. This fixes the calculation of the filter outsets which was covered by the union mode of Filter::clipToMaxEffectRect().
Attachments
test case (does not work on Retina display) (267 bytes, text/html)
2023-03-16 22:45 PDT, Said Abou-Hallawa
no flags
test case 2 (incorrect filter geometry) (667 bytes, text/html)
2023-03-16 22:48 PDT, Said Abou-Hallawa
no flags
test case 3 (unclipped filter region) (662 bytes, text/html)
2023-03-17 09:36 PDT, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2023-03-16 22:45:28 PDT
Created attachment 465472 [details] test case (does not work on Retina display)
Said Abou-Hallawa
Comment 2 2023-03-16 22:48:56 PDT
Created attachment 465473 [details] test case 2 (incorrect filter geometry)
Radar WebKit Bug Importer
Comment 3 2023-03-16 22:51:11 PDT
Said Abou-Hallawa
Comment 4 2023-03-16 22:57:07 PDT
Said Abou-Hallawa
Comment 5 2023-03-17 09:36:24 PDT
Created attachment 465481 [details] test case 3 (unclipped filter region)
EWS
Comment 6 2023-03-18 12:29:34 PDT
Committed 261827@main (7acdd2650a9b): <https://commits.webkit.org/261827@main> Reviewed commits have been landed. Closing PR #11641 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.