W3C home > Mailing lists > Public > www-svg@w3.org > October 2009

Re: [Rendering Order] Some early feedback

From: Jeff Schiller <codedread@gmail.com>
Date: Mon, 26 Oct 2009 10:47:05 -0500
Message-ID: <da131fde0910260847h16679c7fj8a44828ba48b63d7@mail.gmail.com>
To: Jonathan Watt <jwatt@jwatt.org>
Cc: www-svg <www-svg@w3.org>
Hi Jonathan,

On Mon, Oct 26, 2009 at 5:44 AM, Jonathan Watt <jwatt@jwatt.org> wrote:
> presume this relates to your work on SVG-Edit? It would seem a bit weird to me
> for an element to pop above all others when I drag it, and then presumably drop
> back down when I released it, but maybe I'm missing something.

Actually whenever we re-order things in SVG-edit, we just
insertBefore() into the DOM, my comments have nothing to do with that
project. :)

>
>> 4) As maybe clear from above, I'm not really convinced of a strong
>> need for this.
>
> To me the most compelling reason for z-index type functionality is to avoid the
> problem of images and sub-documents (e.g. iframe in foreignObject) from having
> to be reloaded due to them being removed temporarily from the DOM to reposition
> them somewhere else.

I'm not a DOM expert, especially when it comes to load events, things
like that - but it seems to me that this is the main reason people
think they need the ability to arbitrarily order the document.  My own
thoughts on this are:  why does the image need to be reloaded when an
insertBefore() has been done?  Could additional requirements be added
to the DOM to change this behavior upon insertBefore()?

i.e. "If the node being inserted into the DOM already exists in that
DOM, the user agent must only reposition the node in the DOM, the user
agent must not reload the contents or ..."

If this has the potential to break a whole lot of existing web content
(as I now suspect it does), then could a new method be added into the
core DOM? i.e. moveElement() that has the same function signature as
insertBefore()?

Several members of the SVG IG were chatting about this at SVG Open
(Ruud, Wade, myself).  At the time we thought z-index (or something
equivalent) breaks the elegance of SVG for the reasons that Ruud
stated above.  We were originally thinking about a new method for
moving elements within a DOM but I wasn't even sure this was required
since I was not familiar with the requirements on UAs to reload
content when insertBefore() had been called.

Regards,
Jeff
Received on Monday, 26 October 2009 15:55:49 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:43 GMT