RESOLVED FIXED 33091
SVGResources don't invalidate if target object changes attributes
https://bugs.webkit.org/show_bug.cgi?id=33091
Summary SVGResources don't invalidate if target object changes attributes
Dirk Schulze
Reported 2010-01-01 00:51:53 PST
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.
Attachments
SVGResources don't invalidate if object changes (1.42 KB, image/svg+xml)
2010-01-01 00:51 PST, Dirk Schulze
no flags
Resource invalidation on attribute changes of target object (33.94 KB, patch)
2010-01-03 15:01 PST, Dirk Schulze
zimmermann: review+
Dirk Schulze
Comment 1 2010-01-03 15:01:32 PST
Created attachment 45760 [details] Resource invalidation on attribute changes of target object Resource invalidation on attribute changes of target object.
WebKit Review Bot
Comment 2 2010-01-03 15:03:54 PST
style-queue ran check-webkit-style on attachment 45760 [details] without any errors.
Nikolas Zimmermann
Comment 3 2010-01-03 15:19:13 PST
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.
Eric Seidel (no email)
Comment 4 2010-01-03 18:48:07 PST
Attachment 45760 [details] was posted by a committer and has review+, assigning to Dirk Schulze for commit.
Dirk Schulze
Comment 5 2010-01-04 00:58:01 PST
landed in r52709. Closing bug now.
Note You need to log in before you can comment on or make changes to this bug.