Bug 233843

Summary: [GPU Process] (REGRESSION r285597): Fix SVGFilter clamping calculation
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: Layout and RenderingAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, changseok, dino, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, heycam, kondapallykalyan, pdr, schenney, sergio, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=232457
https://bugs.webkit.org/show_bug.cgi?id=231253
https://bugs.webkit.org/show_bug.cgi?id=233849
Bug Depends on:    
Bug Blocks: 231253    
Attachments:
Description Flags
Patch
simon.fraser: review+, ews-feeder: commit-queue-
Patch none

Description Said Abou-Hallawa 2021-12-03 16:20:12 PST
Before r285597, there were two transformations for SVGFilter: (1) the transform from the renderer of the SVGFilter to the outer root and (2) the clamping scale. But since we use only the scaling part of the outer root transformation in scaling the SVGFilter, in r285597 the clamping scale and the outer root scale were merged in one FloatSize called filterScale.

But I misunderstood the purpose and the arguments of ImageBuffer::sizeNeedsClamping(). And I think also there is a bug in SVGRenderingContext::createImageBuffer(). In this bug the following layout tests should be un-skipped.

webkit.org/b/232705 imported/blink/svg/filters/filter-huge-clamping.svg [ Skip ]
webkit.org/b/232705 svg/filters/big-sized-off-viewport-filter.svg [ Skip ]
Comment 1 Said Abou-Hallawa 2021-12-03 17:33:59 PST
Created attachment 445933 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-12-03 20:04:21 PST
Comment on attachment 445933 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=445933&action=review

> Source/WebCore/rendering/CSSFilter.h:53
> +    RefPtr<FilterEffect> lastEffect() const override;

or final?

> Source/WebCore/svg/graphics/filters/SVGFilter.h:45
> +    RefPtr<FilterEffect> lastEffect() const override { return !m_expression.isEmpty() ? m_expression.last() : nullptr; }

final
Comment 3 Said Abou-Hallawa 2021-12-03 20:42:00 PST
Created attachment 445951 [details]
Patch
Comment 4 EWS 2021-12-03 22:12:33 PST
Committed r286526 (244858@main): <https://commits.webkit.org/244858@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445951 [details].
Comment 5 Radar WebKit Bug Importer 2021-12-03 22:13:21 PST
<rdar://problem/86046194>