[Webkit-unassigned] [Bug 128589] New: Percentage positioning inside SVG symbol
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 11 01:47:52 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=128589
Summary: Percentage positioning inside SVG symbol
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh Intel
OS/Version: Mac OS X 10.9
Status: NEW
Severity: Normal
Priority: P2
Component: SVG
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: rapkasta at gmail.com
CC: zimmermann at kde.org
Created an attachment (id=223828)
--> (https://bugs.webkit.org/attachment.cgi?id=223828&action=review)
screenshot: Firefox (top left, works properly), Chrome (right), latest WebKit (bottom left)
According to SVG specification:
>> Additionally, there is a new meaning for percentage units defined to be relative to the current viewport since a new viewport has been established
>> …
>> A ‘symbol’ element define new viewports whenever they are instanced by a ‘use’ element.
>> http://www.w3.org/TR/SVG11/coords.html#EstablishingANewViewport"
However, in WebKit (latest WebKit, Safari, dev version of Google Chrome) positioning using percentage cause incorrect positioning relative to main <svg> element. Sometimes (as presented in attachment) elements with such positioning WebKit not renders at all, in latest Safari it renders element incorrectly and then removes rendered element.
On screenshot: Firefox (top left, works properly), Chrome (right), latest WebKit (bottom left).
Test SVG Document:
<svg xmlns='http://www.w3.org/2000/svg'
xmlns:xlink = "http://www.w3.org/1999/xlink"
width="100%"
height="100%"
viewBox = "0 0 1000 1000"
preserveAspectRatio = "true">
<defs>
<symbol id="blueCircle" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="50" style="fill: blue;"/>
</symbol>
<symbol id="mainItem" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="50" style="fill: yellow;"/>
<use xlink:href="#blueCircle" height="10" width="10" x="45" y="45"/>
</symbol>
<symbol id="whoIsNowAMainItemHuh" viewBox="0 0 300 300">
<use xlink:href="#mainItem" x="0" y="0" width="100" height="100"/>
<use xlink:href="#mainItem" x="100" y="100" width="100" height="100"/>
<!-- here % should be relative to the `use` of current `symbol` -->
<use xlink:href="#mainItem" x="65%" y="65%" width="100" height="100"/>
</symbol>
</defs>
<rect width="1000" height="1000" x="0" y="0" style="fill: green;"/>
<use xlink:href="#whoIsNowAMainItemHuh" width="600" height="600" x="100" y="100"/>
</svg>
--
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