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: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-16 20:15 PDT by Simon Fraser (smfr)
Modified: 2019-10-09 18:20 PDT (History)
3 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.