[webkit-dev] SVG cloneNode?

Simon Fraser simon.fraser at apple.com
Wed Jun 30 10:49:05 PDT 2010


Is there a bugzilla bug for this? If not, there should be.

Simon

On Jun 30, 2010, at 10:47 AM, Fady Samuel wrote:

> Hi Darin,
> 
> I've attached a sample html file that creates an ellipse and then clones it. The cx, cy, rx, ry properties are not cloned and so we do not see the second ellipse. 
> 
> Fady
> 
> 
> On Wed, Jun 30, 2010 at 1:41 PM, Darin Adler <darin at apple.com> wrote:
> 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.
> 
>    -- Darin
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100630/f198c947/attachment.html>


More information about the webkit-dev mailing list