Re: [css-houdini-drafts] [css-paint-api] Cycle possible using inputProperties() (#877)

I agree that the reasonable reaction to circular dependencies in paint methods is to treat the `CSSImageValue` as a broken/invalid image.  However, just the fact that two properties use the same paint worklet doesn't mean that there is a cycle.

It could just as easily represent a nested function call, equivalent to `paint(effect, paint(effect, <image>))`.

CSS custom properties (`var()` functions) are already defined to handle dependencies and cycle detections.  The same rules could be used for dependencies between properties created by paint worklets (and layout worklets & so on).  When there _isn't_ a cycle, I would expect the worklets to be called in a sequence consistent with the dependencies.

That said, if current implementations can't handle dependencies in a clear and consistent manner, I agree that it might be worth spec'ing an overly-strict behavior with the intention of loosening it later.



-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/877#issuecomment-487651369 using your GitHub account

Received on Monday, 29 April 2019 16:35:47 UTC