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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 9 08:01:32 PST 2011


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





--- Comment #16 from Cosmin Truta <ctruta at chromium.org>  2011-02-09 08:01:32 PST ---
Adam Barth explained to me some a list of issues (which he believes to be SVG design errors) that affect the SVG <image> tag.

The <image> tag is good to be used with raster graphics, but not so much with SVG graphics, because it loses both semantics and performance during rasterization. The <use> tag serves the same purpose, while providing a cleaner design and a faster performance.

Let us make comparison with <iframe> in HTML. Everything that is contained by the iframe becomes the part of the render tree. For example, if a specific region within the contained iframe changes its appearance, the render tree "knows" to re-render that particular region.

In contrast, <image> in SVG is an abstraction that needs to be rendered, and not much else is known besides the fact that it's a bunch of pixels. The image referred to in <image> is a leaf in the render tree, regardless whether it is a JPEG, and animated GIF, or an SVG (be it a static or an animated image). Of course, the SVG image itself needs to be rendered, but the SVG render tree exists in isolation, it is not an organic part of the container's render tree, nor does it communicate with it. (As a side consequence, animations are not rendered.)

This situation can be resolved by augmenting the logic of the container that embeds the top-level SVG. If the container "knows" that the SVG <image> tag happens to point to another SVG image (not just a generic kind of image), then it should be possible to work around this design limitation. This means every kind of container (the broser window, the HTML container, the CSS container, etc.) must be modified accordingly. (For example, the CSS attribute "background-image" must know about it, too.) This is doable, but requires a huge amount of work.

In short, to make a comparison with HTML, external images (non-HTML) are embedded via the <img> tag, while external HTML files are embedded via the <iframe> tag, and the separate logic applies to each of these two separate cases by design. On the other hand, in SVG, external SVG images are embedded in the same manner as non-SVG images via the <image> tag, and this can only work if the SVG's container has specific logic to handle the two cases separately. Since this logic does not currently exist in WebKit, it needs to be implemented, separately, in each of the SVG's container classes.

-- 
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