W3C home > Mailing lists > Public > www-svg@w3.org > February 2014

Re: What should the bbox of a path without a d attribute be?

From: Robert Longson <longsonr@gmail.com>
Date: Wed, 19 Feb 2014 12:33:54 +0000
Message-ID: <CAOu7Uv4Ph7jeovvVHhByU_K4ibWduRU-fr_mbPyzPdcoR869Qg@mail.gmail.com>
To: www-svg@w3.org
The contribution of invalid shapes bounding box in parents is an oversight
in Firefox that I think should be corrected. Which would lead to this...

'path' boundingClientRect: 18,18,100,100 bbox: 10,10,110,110 (inner bbox:
0,0,0,0)
'rect' boundingClientRect: 18,18,100,100 bbox: 10,10,110,110 (inner bbox:
0,0,0,0)
'circle' boundingClientRect: 18,18,100,100 bbox: 10,10,110,110 (inner bbox:
0,0,0,0)
'ellipse' boundingClientRect: 18,18,100,100 bbox: 10,10,110,110 (inner
bbox: 0,0,0,0)
'polygon' boundingClientRect: 18,18,100,100 bbox: 10,0,110,110 (inner bbox:
0,0,0,0)
'polyline' boundingClientRect: 18,18,100,100 bbox: 10,0,110,110 (inner
bbox: 0,0,0,0)
'line' boundingClientRect: 18,18,100,100 bbox: 0,0,110,110 (inner bbox:
0,0,0,0)
'line' boundingClientRect: 18,18,100,0 bbox: 0,0,110,10 (inner bbox:
0,0,0,0)

Note that it says nothing in the specification about lines being invalid if
they don't have attributes set, whereas an ellipse with a zero radius, or a
path without any d contents is explicitly not rendered for instance. I
think polygon and polyline without attributes or with empty attributes
should have text which says not rendered to be consistent with path
elements.

Robert
Received on Wednesday, 19 February 2014 12:34:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:35 UTC