Overflow attribute on markers and patterns is never kept

Bug #604000 reported by Louis Simard on 2010-07-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scour
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

Changed in scour:
importance: Undecided → High
summary: - Bad render: fulltests/web-process.png
+ 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>.

This patch is against trunk revision 181.

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

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) on 2010-07-11
summary: - Overflow attribute on markers and patterns is never kept
+ Scour incorrectly removes overflow attributes
Changed in scour:
status: In Progress → Confirmed
codedread (codedread) on 2010-07-11
summary: - Scour incorrectly removes overflow attributes
+ Overflow attribute on markers and patterns is never kept
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) on 2010-07-12
Changed in scour:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers