[Webkit-unassigned] [Bug 15443] SVGImage does not support sub-resource loading

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 26 23:08:45 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=15443





--- Comment #9 from Cosmin Truta <ctruta at chromium.org>  2011-01-26 23:08:44 PST ---
There are two problems to solve here:
(1) Load all subresources at all levels. (Currently, only the first level is loaded.)
(2) Do not render images that reference themselves cyclically, either directly or indirectly. (Currently, cyclic references are rendered.)

To solve (1), I must de-hack SVGImage::dataChanged, although I still have to understand how exactly this hack works in the first place.

To solve (2), Dirk suggested me to use Niko's SVGResourcesCache and SVGResourcesCycleSolver. As far as I understood from examining these classes and the surrounding code, the infrastructure already exists:
- RenderSVGModelObject::updateFromElement calls the cache / cycle solver, by calling SVGResourcesCache::clientUpdatedFromElement.
- RenderSVGImage is a subclass of RenderSVGModelObject, therefore the cycle solver should automagically work for SVG image elements.

However, the even the simplest case of self-recursion, involving one <image> referencing itself, fails to go through this path. See the test case below: WebKit shows two circles instead of one. (Morley Abbot also posted a similar test case in attachment 59154; see his comment #2 above.)

<!-- self-cycle.svg -->
<svg width="300px" height="100px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <circle cx="50" cy="50" r="50" fill="blue"/>
  <image x="100" y="0" width="200" height="100" xlink:href="self-cycle.svg"/>
</svg>

I suppose this happens because the two instances of "self-cycle.svg" are assigned different render objects, and yet they should be the same object?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list