Issue: If a boxShadow(...) style was set on a node, and then turned off later, the box-shadow would continue to be shown.
Defect: When boxShadow(..) is set - we add an image filter onto the Skia.Paint.t owned by the node. This is stateful - if we don't do anything, the box shadow image filter will continue to be applied.
Fix: Turn off the image filter when we don't need it anymore.
This also moves the box-shadow rendering to occur before the border and interior elements are painted. Without this, the box-shadow would be rendered along with the interior element, which would actually draw part of the shadow over the border. I think a better flow would be to draw the interior element first w/ a shadow, and then the borders - but right now, we use the borders to calculate the interior element positioning.
Issue: If a
boxShadow(...)
style was set on a node, and then turned off later, the box-shadow would continue to be shown.Defect: When
boxShadow(..)
is set - we add an image filter onto theSkia.Paint.t
owned by the node. This is stateful - if we don't do anything, the box shadow image filter will continue to be applied.Fix: Turn off the image filter when we don't need it anymore.
This also moves the box-shadow rendering to occur before the border and interior elements are painted. Without this, the box-shadow would be rendered along with the interior element, which would actually draw part of the shadow over the border. I think a better flow would be to draw the interior element first w/ a shadow, and then the borders - but right now, we use the borders to calculate the interior element positioning.