[Webkit-unassigned] [Bug 91498] New: SVG <use> elements not displayed in Chrome (Safari is OK)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 17 06:18:28 PDT 2012


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

           Summary: SVG <use> elements not displayed in Chrome (Safari is
                    OK)
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
               URL: http://www.bobwyttenbach.com/chromeuse.html
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: SVG
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rw12 at cornell.edu
                CC: zimmermann at kde.org


Chrome does not display <use> elements in inline svg. The same svg is displayed correctly when linked through an <object> tag.

Here is a simple test case (code below or view it at http://www.bobwyttenbach.com/chromeuse.html):

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Chrome use-tag bug?</title>
</head>
<body>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200px" height="200px" viewBox="0 0 200 200">
    <defs>
        <g id="test1">
            <circle cx="100" cy="100" r="50" fill="red"/>
        </g>
    </defs>
    <g>
        <rect x="0.5" y="0.5" width="199" height="199" stroke="black" fill="none"/>
        <use xlink:href="#test1" x="0" y="0"/>
    </g>
</svg>
<p>Above is inline svg with a use tag; below is the same svg linked through an object tag. Below is correct.</p>
<object data="chromeuse.svg" width="200" height="200"></object>
</body>
</html>

The red circle does not appear in the inline svg but does appear when the same svg is linked through an object tag. Following someone's suggestion, I wrapped the circle in <symbol> tags (and moved id="test1" into the symbol tag). It made no difference.

Safari, Firefox, Opera, and Internet Explorer 9 all display the inline svg correctly.

Tested with Chrome Version 20.0.1132.57 in both Mac OS 10.7.4 and Windows 7 (in VMWare Fusion). Webkit 536.11. (Safari WebKit 534.57.2 does not have this bug.)

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