- From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
- Date: Tue, 23 Aug 2016 23:15:21 +0000
- To: public-svg-issues@w3.org
AmeliaBR has just created a new issue for https://github.com/w3c/svgwg: == Should bounding box of svg, image, foreignObject, etc include overflow content? == Currently, the [Bounding Box algorithm](https://svgwg.org/svg2-draft/coords.html#BoundingBoxes) states: > ‘canvas’, ‘foreignObject’, ‘iframe’, ‘image’, ‘video’ > 1. Return the tightest rectangle in coordinate space space that contains the rectangle defined by the ‘x’, ‘y’, ‘width’ and ‘height’ attributes of the element. >The fill, stroke and markers input arguments to this algorithm do not affect the bounding box returned for these elements. Two problems with that: 1. Any of these elements can take clipping paths, the bounding box needs to reflect that if the <var>clipped</var> option is set. That's easy to fix. 2. Any of these elements can overflow their rectangle. Or conversely, they can fail to fill up their rectangle. In contrast, `svg` elements are supposed to calculate their bounding box from their child content, without any mention of whether overflow is hidden or not. I can see arguments for using the positioning rectangle, but I can also see arguments for actually using the painted content. It would be nice to have a switch, but I'm not sure how the existing fill/stroke/decorated options would map to specified size vs concrete size. We also have existing text in the section on embedded HTML and fallback content, that says "The HTML subtree, defined by the root HTML element and its children, contributes to SVG container bounding box computations." Please view or discuss this issue at https://github.com/w3c/svgwg/issues/243 using your GitHub account
Received on Tuesday, 23 August 2016 23:15:28 UTC