Summary: | Incorrect handling of chained pending resources in SVGUseElement | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Florin Malita <fmalita> | ||||||
Component: | SVG | Assignee: | Florin Malita <fmalita> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | krit, pdr, rakuco, rwlbuis, webkit.review.bot, zimmermann | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
The problematic case is <use> on <use>, when the target <use> has pending resources. The referencing element builds its shadow and instance trees when the target <use> becomes available, and the shadow tree expansion only captures a snapshot of the tree at that time. Later on, when the pending resources for the target element are resolved, the referencing <use> never refreshes its shadow tree. To support arbitrary <use> on <use> constructs, we need some way to track these dependencies and update the referencing trees when the target trees get rebuilt. I have a patch that takes advantage of SVGDocumentExtensions' m_elementDependencies for this purpose. Created attachment 151777 [details]
Patch
Comment on attachment 151777 [details]
Patch
Beautiful! I'm happy that you've reused the elementDependencies set, it was meant as general solution to be adapted for <use>: great that you've tackled this! r=me.
Comment on attachment 151777 [details] Patch Clearing flags on attachment: 151777 Committed r122449: <http://trac.webkit.org/changeset/122449> All reviewed patches have been landed. Closing bug. |
Created attachment 148866 [details] The indirectly referenced resource is not rendered. SVGUseElement is currently building pending resources when the target is inserted into the tree, without checking first whether the target itself has any pending resources. So depending on document order, chained <use>s can yield incomplete results.