W3C home > Mailing lists > Public > www-style@w3.org > March 2008

Re: [cssom-view] small update

From: Erik Dahlström <ed@opera.com>
Date: Fri, 07 Mar 2008 13:00:10 +0100
To: robert@ocallahan.org, "Anne van Kesteren" <annevk@opera.com>
Cc: www-style@w3.org
Message-ID: <op.t7naakthgqiacl@gnorps.palace.opera.no>

On Thu, 06 Mar 2008 13:59:53 +0100, Robert O'Callahan  
<robert@ocallahan.org> wrote:

> A few comments...
...
> For SVG elements, which don't really have border-boxes, our  
> implementation
> of getClientRects returns a single rect which is the bounding-box of the  
> SVG
> element.

Is "the bounding-box" for SVG the same as what SVGLocatable.getBBox  
returns on the element? Since those bboxes are in user-space coordinates  
it should be noted that they may not be aligned with the screen coordinate  
system. Or do you mean SVGLocatable.getScreenBBox (from SVGT12), which is  
aligned with the screen coordinate system?

Or do you mean that if one calls getClientRects on any SVG element you get  
back the rootmost <svg> element clientrect? And if an svg element is not  
inside an <svg> fragment what do you get? And in case there's an <svg>  
inside an <svg> and a you query a child of the innermost <svg> element, do  
you get the nearest or the rootmost <svg> element clientrect?

> In our implementation, if an element is a descendant of an SVG
> foreignObject, we treat the nearest enclosing foreignObject as  
> establishing
> the viewport for the element for the purposes of getClientRects and
> getBoundingClientRect. It doesn't seem to make sense to use the true
> viewport in the presence of possible SVG transformations.

That seems sensible.

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Friday, 7 March 2008 12:00:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:02 GMT