Re: [svgwg] SVGElement.getBoundingClientRect(): which bounding box?

Doh. Sorry. Read too fast, first thing in the morning.

OK. So first step would be to confirm exactly what all the browsers are doing: is it stroke-box, decorated-box (including markers), or the full dirty-paint rectangle (including filter effects, like blurring or offset shadows) ?

Since the CSS layout version includes border-box and positioned children, the closest equivalent would probably be to use decorated-box: the full geometry area of the element and its descendants, but not any extra area for filters.

As an aside: the way the CSSOM definition is worded is interesting.  For elements that have both SVG and CSS layout (aka, `<svg>` elements that are root elements or children of HTML elements), it prioritizes the SVG definition over the CSS definition.  I wonder if any browsers actually do that?



-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/339#issuecomment-320052108 using your GitHub account

Received on Thursday, 3 August 2017 18:28:38 UTC