Sticky zero width, height in viewBox attribute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
Tavmjong Bah |
Bug Description
When changing the page width and/or height via 'Document Properties > Page > Custom Size' and entering a value of '0' (zero) as intermediary step, the corresponding '0' in the document's 'viewBox' attribute gets "sticky" i.e. does not update if the page width or height is set to a positive value later on.
Viewing such a file in other SVG viewers (e.g. web browsers) causes the content to be not rendered visible:
«A negative value for <width> or <height> is an error (see Error processing). A value of zero disables rendering of the element.»
http://
Side-effect: python-based extensions will fail with a ZeroDivisionError in getDocumentUnit() when applied in such a document (this failure was originally reported on irc by Qcoder00).
Steps to reproduce:
1) launch inkscape (default prefs, default new document)
2) draw a large rectangle (e.g. as large as the page)
3) open 'File > Document Properties > Page'
4) set Width in 'Custom size' to '0'
5) set Width in 'Custom size' to '210' (same as before)
6) save
7) view the file e.g. in Firefox
Expected result:
The rectangle drawn on the page is visible in the browser.
Actual result:
The browser displays an "empty" file (rendering is disabled).
Reproduced with Inkscape 0.91 r13725 and 0.91+devel r14242 on OS X 10.7.5.
Related branches
description: | updated |
Changed in inkscape: | |
milestone: | 0.91.1 → 0.92 |
status: | Fix Committed → Fix Released |
Result of 'steps to reproduce' (with Inkscape 0.91 r13725)