Created attachment 45728 [details] SVGResources don't invalidate if object changes SVGResources don't invalidate if target object changes attributes. This is no problem on clipping, because we calculate the clipping path and clip the context on every call of SVGResourceClipper::applyClip. The same for filter. But we might change both to not recalculate the resource properties on every call of SVGResource*::apply*(). At least for filters that is highly ineffective and slows down the system a lot. We also need to invalidate if a child changes it's properties. It will also affect clippers in the future, if we support more than simple pathes, like texts. Another problem is the attribute visible. It looks like we still draw the childs of an element with the attribute visible="hidden". This can be a problem for filters, thus they can draw contents independent of it's target object. But this can be fixed with another bug report. The attachement points the problem. Click on one of the rects or circles. The width of the element change from 200 to 100. You should see two circles (no ovals with different radiuses) and a quadrat with a shadow.
Created attachment 45760 [details] Resource invalidation on attribute changes of target object Resource invalidation on attribute changes of target object.
style-queue ran check-webkit-style on attachment 45760 [details] without any errors.
Comment on attachment 45760 [details] Resource invalidation on attribute changes of target object Looks almost fine, please change following before landing: > +void SVGStyledElement::invalidateResources() > +{ Retrieve document via DOM, not render tree, and early exit when parsing: Document* document = this->document(); if (!document->parsing()) return; You could also use "doc", and save the "this->", but I think it's a stylerule to not use abbreviations, if possible, so let's enforce it. r=me.
Attachment 45760 [details] was posted by a committer and has review+, assigning to Dirk Schulze for commit.
landed in r52709. Closing bug now.