Overflow attribute on markers and patterns is never kept

Bug #604000 reported by Louis Simard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scour
Fix Released
High
codedread

Bug Description

The file fulltests/web-process.svg, originally from Ubuntu 10.04's /usr/share/doc/python-twisted-web/img/web-process.svg and added to trunk revision 181, renders incorrectly after being Scoured.

-- To reproduce --

Program version: trunk revision 180

Command line: ./scour.py --shorten-ids --enable-id-stripping --create-groups --renderer-workaround --indent=none -i fulltests/web-process.svg -o fulltests/web-process.opt.svg

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :
Changed in scour:
importance: Undecided → High
summary: - Bad render: fulltests/web-process.png
+ Bad render: fulltests/web-process.svg
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote : Re: Bad render: fulltests/web-process.svg

<marker
       inkscape:stockid="Arrow2Lend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Lend"
       style="overflow:visible">

-->

<marker id="b" refY="0" refX="0" orient="auto">

style="overflow:visible" was removed from the marker; restoring it allowed the arrows to show again.

The SVG specification says, for the overflow property,

> The initial value for ‘overflow’ as defined in [CSS2-overflow]
> is 'visible', and this applies also to the root ‘svg’ element;
> however, for child elements of an SVG document, SVG's user
> agent style sheet overrides this initial value and sets the
> ‘overflow’ property on elements that establish new viewports
> (e.g., ‘svg’ elements), ‘pattern’ elements and ‘marker’
> elements to the value 'hidden'.

Seeing as 'marker' gets the default value of 'overflow: hidden', the removal of default attribute values should not affect the 'overflow' property, or should be modified to be 'hidden' for elements other than <svg>.

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

This patch is against trunk revision 181.

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

Ok, so that patch is flawed. It unconditionally removes overflow from <marker>, <pattern> and <svg>, and unconditionally leaves it in for all other elements.

I'll rework the patch and give a unit test along with the next patch attachment.

Changed in scour:
assignee: nobody → Cynthia Gauthier (louis-simard)
status: New → In Progress
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

codedread has fixed my patch and is making a unit test already. (per email)

Changed in scour:
assignee: Cynthia Gauthier (louis-simard) → codedread (codedread)
summary: - Bad render: fulltests/web-process.svg
+ Overflow attribute on markers and patterns is never kept
codedread (codedread)
summary: - Overflow attribute on markers and patterns is never kept
+ Scour incorrectly removes overflow attributes
Changed in scour:
status: In Progress → Confirmed
codedread (codedread)
summary: - Scour incorrectly removes overflow attributes
+ Overflow attribute on markers and patterns is never kept
Revision history for this message
codedread (codedread) wrote :

Fixed in revision 183. Note that there is still one problem with fulltests/web-process.svg: the second arrow head on the left is reversed. This appears to be a different bug, recommending raising a new one.

Changed in scour:
status: Confirmed → Fix Committed
codedread (codedread)
Changed in scour:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.