Bug 200851 - CSS reference filter doesn't work if the filter comes after the target element in the DOM
Summary: CSS reference filter doesn't work if the filter comes after the target elemen...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-16 20:15 PDT by Simon Fraser (smfr)
Modified: 2023-04-09 05:45 PDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Simon Fraser (smfr) 2019-08-17 10:17:47 PDT
This is about ordering. If the <svg> comes after the <img>, it works.
Comment 2 Simon Fraser (smfr) 2019-08-17 10:51:03 PDT
The filter element build() functions return null if they have no renderer yet.

What we need to do is to invalidate the filtered element when the filter renderers change.
Comment 3 Simon Fraser (smfr) 2019-08-17 11:52:54 PDT
I think the main difference between SVG and CSS filters here is that SVG builds the filter chain at paint time, but CSS builds it at style change time, which is too early because we're still building the render tree at that point.
Comment 4 Ahmad Saleem 2022-07-18 11:39:59 PDT
I am able to reproduce this bug in Safari 15.5 on macOS 12.4 based on codepen mentioned in Description. Safari 15.5 shows lightening as "blue" while all other browsers (Chrome Canary 105 and Firefox Nightly 104) shows it as "red". Thanks!
Comment 5 Radar WebKit Bug Importer 2022-07-18 11:41:18 PDT
<rdar://problem/97210640>
Comment 6 Ahmad Saleem 2023-04-09 05:45:54 PDT
(In reply to Ahmad Saleem from comment #4)
> I am able to reproduce this bug in Safari 15.5 on macOS 12.4 based on
> codepen mentioned in Description. Safari 15.5 shows lightening as "blue"
> while all other browsers (Chrome Canary 105 and Firefox Nightly 104) shows
> it as "red". Thanks!

I am not able to reproduce this in Safari 16.4 and now it show a 'red' lightening similar to other browsers.

Marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!