[webkit-dev] SVG cloneNode?
darin at apple.com
Wed Jun 30 10:41:33 PDT 2010
On Jun 30, 2010, at 10:38 AM, Fady Samuel wrote:
> StyledElment's void copyNonAttributeProperties(const Element *sourceElement) for every single SVG node. Do you think this is the case or is there a nicer way to do this that doesn't involve my modifying 100+ files?
Generally speaking cloning an element and all its attributes as visible in markup does the trick, and other state in the object is not appropriate to clone, and should be regenerated by the element in its new context.
It seems unlikely that every SVG element has data that is not stored in an element attribute that needs to be cloned. For comparison, in all of XML and HTML, only one element, <input>, has this.
Maybe you could give some specific examples so we can confirm these are all things that should be cloned by cloneNode.
More information about the webkit-dev