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().
Created attachment 465472 [details] test case (does not work on Retina display)
Created attachment 465473 [details] test case 2 (incorrect filter geometry)
<rdar://problem/106844401>
Pull request: https://github.com/WebKit/WebKit/pull/11641
Created attachment 465481 [details] test case 3 (unclipped filter region)
Committed 261827@main (7acdd2650a9b): <https://commits.webkit.org/261827@main> Reviewed commits have been landed. Closing PR #11641 and removing active labels.