[Webkit-unassigned] [Bug 55643] Chromium unnecessarily creates SVGImage when an SVG document contains images

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 2 20:08:15 PST 2011


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


Xianzhu Wang <wangxianzhu at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Chromium-linux              |Chromium unnecessarily
                   |unnecessarily creates       |creates SVGImage when an
                   |SVGImage when an SVG        |SVG document contains
                   |document contains images    |images
         OS/Version|Linux                       |All
                 CC|                            |fishd at chromium.org




--- Comment #1 from Xianzhu Wang <wangxianzhu at google.com>  2011-03-02 20:08:15 PST ---
The problem is because of the different implementations of KURL(base, relative).string() when base is an empty string. The WebKit version of KURL returns relative, while Google version of KURL returns an empty string. The former looks more correct to me.

The steps of how the problem occurs are as follows:
1) When the parser has parsed the src attribute of an image element in an SVG document, it calls ImageLoader::updateFromElement() of an SVGImageLoader.
2) The URL is got from the attribute value with SVGImageLoader::sourceURI() which in turn calls KURL(element()->base(), stripLeadingAndTrailingHTMLSpaces(attr)).string)
3) Google version of KURL returns an empty URL. The document.completeURL returns the URL of the SVG document itself. The CachedResourceLoader then will request the SVG document as the image instead of the correct image file.

As the WebKit version of KURL returns the original relative URL if base is empty, the above next steps run normally without errors.

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