This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Does SVGViewSpec track changes to the original SVGSVGElement? http://www.w3.org/TR/SVG/struct.html#InterfaceSVGSVGElement Does not make it clear if "currentView" returns an SVGViewSpec object which tracks changes to the original (such as all the SVGAnimated* classes must do: e.g. var width = rect.width; rect.width.baseVal.value = 10; alert(width.baseVal.value); // expect 10), or if it is a normal "plain old data" object which is a copy of what SVGSVGElement had and never changes? Either way is fine, it just needs to be clarified. if SVGViewSpec is just a copy of the original and never changes once copied, that's easier to implement. One possible implementation problem if it tracks changes to SVGSVGElement, is what happens when that SVGSVGElement is removed from the document? Do then all of the viewPort, targetElement, preserveAspectRatio accessors then go undefined? var svg = document.getElementById("mysvg"); var currentView = svg.currentView; var svgParent = svg.parentNode; svgParent.removeNode(svg); alert(currentView.targetNode); // does this still work? One particularly thorny side effect of them *not* changing to undefined is that targetElement could be used to re-insert the SVGSVGElement, example: svgParent.removeNode(svg); svgParent.appendNode(currentView.targetNode.ownerSVGElement); Or equally fun to implement, I assume targetNode should at least update when nodes come and go from the document/change ids? Just looking for some guidance from you spec folks, thanks.
Created attachment 494 [details] an example test case of currentView "standard" behavior Note the test case is not stand alone and will not run in your browser. This test case assumes that SVGViewSpec objects *should* update when the original SVGSVGElement changes.
Putting it into the scope of SVG2. It needs testing what current browsers do here.
You mean should this animate? http://hoffmann.bplaced.net/svgtest/viewviewbox01.svg#view1 It does in Opera and Firefox.
(In reply to comment #3) > You mean should this animate? > http://hoffmann.bplaced.net/svgtest/viewviewbox01.svg#view1 > > It does in Opera and Firefox. No, this is related to SVGViewSpec, as accessed via SVGSVGElement.currentView: http://www.w3.org/TR/SVG/struct.html#__svg__SVGSVGElement__currentView AFAICT currentView is not supported in FF19: Error: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMSVGSVGElement.currentView]
Oh that. We can't figure out how what it should do see http://www.w3.org/Graphics/SVG/WG/track/issues/2444 and https://bugzilla.mozilla.org/show_bug.cgi?id=503855#c6