ISSUE-2454: What should the bbox of a path without a d attribute be? should such bboxes contribute to a parent container element's bbox?

What should the bbox of a path without a d attribute be? should such bboxes contribute to a parent container element's bbox?

State:
RAISED
Product:
SVG 2
Raised by:
Erik Dahlström
Opened on:
2014-02-10
Description:
What should the bbox of a path without a d attribute be?
Should such bboxes contribute to a parent container element's bbox?

Example 1:
<path />

Example 2:
<g>
<path />
<path d="M100,100L300,100"/>
</g>

Same issue exists also for <polyline> and <polygon>, since those don't have a defined offset like the other shapes do.

Data point: in Opera Presto, empty <path>, <polygon> and <polyline> didn't contribute to the container. GetBBox on empty <path>, <polygon> and <polyline> returned [<DBL_MAX>, <DBL_MAX>, -Inf, -Inf]

On the testcase http://code.google.com/p/chromium/issues/attachmentText?id=340960&aid=3409600006000&name=svg-g-empty-path-bcr.html here are the results.

IE 11.0.9600.16438:
'path' boundingClientRect: 8,8,0,0 bbox: 0,0,0,0 (inner bbox: 0,0,0,0)
'rect' boundingClientRect: 3,3,120,120 bbox: 10,10,100,100 (inner bbox: 0,0,0,0)
'circle' boundingClientRect: 13,13,110,110 bbox: 10,10,100,100 (inner bbox: 0,0,0,0)
'ellipse' boundingClientRect: 13,13,110,110 bbox: 10,10,100,100 (inner bbox: 0,0,0,0)
'polygon' boundingClientRect: 8,8,0,0 bbox: 0,0,0,0 (inner bbox: 0,0,0,0)
'polyline' boundingClientRect: 8,8,0,0 bbox: 0,0,0,0 (inner bbox: 0,0,0,0)
'line' boundingClientRect: 3,3,120,120 bbox: 10,10,100,100 (inner bbox: 0,0,0,0)
'line' boundingClientRect: 3,3,120,20 bbox: 10,10,100,0 (inner bbox: 0,0,0,0)

Chrome 34.0.1788.0 dev:
'path' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'rect' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'circle' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'ellipse' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'polygon' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'polyline' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'line' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'line' boundingClientRect: 8,8,110,10 bbox: 0,0,110,10 (inner bbox: 0,0,0,0)

Firefox Nightly 29.0a1 (2014-01-08):
'path' boundingClientRect: 18,18,100,100 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'rect' boundingClientRect: 18,18,100,100 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'circle' boundingClientRect: 18,18,100,100 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'ellipse' boundingClientRect: 18,18,100,100 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'polygon' boundingClientRect: 18,18,100,100 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'polyline' boundingClientRect: 18,18,100,100 bbox: 0,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)

Opera 12.16 (Presto):
'path' boundingClientRect: 18,18,100,100 bbox: 10,10,100,100 (inner bbox: 3.4028234663852886e+38,3.4028234663852886e+38,-Infinity,-Infinity)
'rect' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'circle' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'ellipse' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'polygon' boundingClientRect: 18,18,100,100 bbox: 10,10,100,100 (inner bbox: 3.4028234663852886e+38,3.4028234663852886e+38,-Infinity,-Infinity)
'polyline' boundingClientRect: 18,18,100,100 bbox: 10,10,100,100 (inner bbox: 3.4028234663852886e+38,3.4028234663852886e+38,-Infinity,-Infinity)
'line' boundingClientRect: 8,8,110,110 bbox: 0,0,110,110 (inner bbox: 0,0,0,0)
'line' boundingClientRect: 8,8,110,10 bbox: 0,0,110,10 (inner bbox: 0,0,0,0)
Related Actions Items:
Related emails:
  1. agenda, 7 March 2014 SVG WG telcon (from cam@mcc.id.au on 2014-03-06)
  2. What should the bbox of a path without a d attribute be? (from nikos.andronikos@cisra.canon.com.au on 2014-02-19)
  3. SVG WG Meeting Minutes 12-12-2013 (from nikos.andronikos@cisra.canon.com.au on 2014-02-14)
  4. Re: Agenda, 13 February 2014 SVG WG telcon (from cam@mcc.id.au on 2014-02-13)
  5. Agenda, 13 February 2014 SVG WG telcon (from ed@opera.com on 2014-02-12)
  6. ISSUE-2454: What should the bbox of a path without a d attribute be? should such bboxes contribute to a parent container element's bbox? (from sysbot+tracker@w3.org on 2014-02-10)

Related notes:

Blink bugreport: http://code.google.com/p/chromium/issues/detail?id=340960

Erik Dahlström, 11 Feb 2014, 12:12:35

Display change log ATOM feed


Dirk Schulze <dschulze@adobe.com>, Chair, Chris Lilley <chris@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 2454.html,v 1.1 2020/01/17 13:22:06 carcone Exp $