Bug 264777

Summary: Use correct destination rectangle in FEComposite w/ type='in'
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-11-13 14:58:13 PST
Hi Team,

While going through Blink's commit, I came across another failing test case:

Test Case (from Chrome bug): https://jsfiddle.net/jhmsh/

^ Fails in Safari / WebKit ToT only. While Chrome Canary 121 and Firefox Nightly 121 are same.

Blink Commit: https://chromium.googlesource.com/chromium/blink/+/436fb328f44f79caa4c8a8f5804ca305467f026b

Just raising so we can fix it.

Thanks!
Comment 2 Ahmad Saleem 2023-11-14 14:21:56 PST
Something along the lines - maybe?:

destinationRect.moveBy(-result.absoluteImageRect().location());

filterContext.drawImageBuffer(*inputImage2, destinationRect, FloatRect(source2Rect));

filterContext.drawImageBuffer(*inputImage, destinationRect, FloatRect(sourceRect), { CompositeOperator::SourceIn });
Comment 3 Radar WebKit Bug Importer 2023-11-20 14:59:12 PST
<rdar://problem/118663125>