Bug 133505 (change-use-target)
Summary: | Changing the referred element of a SVGUseElement doesn't change the SVGUseElement | ||
---|---|---|---|
Product: | WebKit | Reporter: | Christoph Werner <gonsfx> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Blocker | CC: | ahmad.saleem792, bfulgham, rniwa, sabouhallawa, Svenja100388, webkit-bug-importer, zimmermann |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://jsfiddle.net/gonsfx/vFChe/ |
Christoph Werner
For my work on an SVG-based online editor for photo products i have to frequently swap out elements that are referred to by SVGUseElements.
This does not work in any Webkit Versions i tried. On a contrary, Firefox and old Opera work fine.
Steps to Reproduce
1) Open http://jsfiddle.net/gonsfx/vFChe/
It includes an inline SVG with a SVGUseElement that references the id 'target' and a SVGGElement which is set to display: none.
An element with the id 'target' does not exist at the beginning.
2) Click SVG (grey background)
Upon clicking the SVG, a new SVGPathElement with random dimensions and an id attribute of 'target' is created and appended to the (invisible) SVGGElement.
Webkit correctly displays the SVGUseElement on the first click.
3) Click SVG again (grey background)
Upon clicking the SVG another time, the existing SVGPathElement is removed from the DOM and a new, randomly dimensioned one is appended to the (invisible) SVGGElement.
The SVGUseElement does not change.
Actual Results
SVGUseElement is updated/correctly drawn on the first click and doesn't change on any subsequent click.
Expected Results
SVGUseElement reflects the change of its referred Element on every click.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brent Fulgham
Works in Chrome and Firefox. Fails in Safari.
Radar WebKit Bug Importer
<rdar://problem/97101293>
Ahmad Saleem
Seems to work fine now in Safari Technology Preview 174.
Might be fixed by https://github.com/WebKit/WebKit/commit/9057e67f74027a0a28d82230b35263cf724de030?