Comment 0 for bug 1589217

Revision history for this message
su_v (suv-lp) wrote :

Inkscape's addition of a viewBox attribute to the top-level <svg> element in current trunk / 0.92pre may silently modify document content as well: it converts for example presentation attributes to in-line CSS style properties. Such a conversion usually is only triggered when editing elements with such attributes (a to-be-expected change in that situation).

Attached is a (manually written) SVG file with presentation attributes for fill, fill-opacity and stroke.

Steps to reproduce:
1) open attached test case in current trunk / 0.92pre1 (default new prefs)
2) resave (File > Save as) without any modifications
3) inspect the saved file in external editor

Expected result:
Apart from formatting (indentation, linebreaks), adding metadata and editor information for document properties (namedview), and unique IDs to all elements, there are no further changes to the content itself.

Actual result:
In addition to the expected differences, all presentation attributes are converted to style properties.

Reverting the changes from r13938 and r14648 to not enforce adding a viewBox on load if not present produces the expected result (as long as the element is not edited within Inkscape, its original presentation attributes are preserved).

=====
The issue was noticed while investigating this user question:
http://www.inkscapeforum.com/viewtopic.php?f=5&t=21031&p=78090