Bug 112796 - A horizontal <line> is not rendered when contained in a parent group with a clip-path property.
Summary: A horizontal <line> is not rendered when contained in a parent group with a c...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-20 06:08 PDT by Patrick Ruzand
Modified: 2013-03-20 06:08 PDT (History)
1 user (show)

See Also:


Attachments
a simple testcase that reproduces the issue. (894 bytes, text/html)
2013-03-20 06:08 PDT, Patrick Ruzand
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Ruzand 2013-03-20 06:08:53 PDT
Created attachment 194032 [details]
a simple testcase that reproduces the issue.

A horizontal line whose parent has a clip-path attribute is not rendered, even if the clipPath geometry is "compatible" with the line geometry.
For example, with the following markup:
<g clip-path="url(#gfx_clip1)">
  <line stroke-dasharray="none" y2="200" x2="340" y1="200" x1="10"
        stroke-miterlimit="4" stroke-linejoin="miter" stroke-linecap="butt"
        stroke-width="1" stroke-opacity="1" stroke="rgb(255, 0, 0)" fill-opacity="0" fill="none">
  </line>
</g>
<clipPath id="gfx_clip1">
  <rect height="500" width="500" y="0" x="0"></rect>
</clipPath>

the line is not rendered on screen. It works in FF19, IE9.

Note that the issue does _not_ appear if:
* the clip-path attribute is removed; or
* a new shape is added to the group (provided the new shape changes the group bbox),the line is rendered. For example, the following markup does not reproduce the issue anymore:

<g clip-path="url(#gfx_clip1)">
  <line stroke-dasharray="none" y2="200" x2="340" y1="200" x1="10"
        stroke-miterlimit="4" stroke-linejoin="miter" stroke-linecap="butt"
        stroke-width="1" stroke-opacity="1" stroke="rgb(255, 0, 0)" fill-opacity="0" fill="none">
  </line>
  <rect stroke-dasharray="none" width="200" height="100" y="30" x="10"
         stroke-miterlimit="4" stroke-linejoin="miter" stroke-linecap="butt" stroke-width="1" stroke-opacity="1"
	 stroke="rgb(255, 0, 0)" fill-opacity="0" fill="none">
  </rect>
</g>
<clipPath id="gfx_clip1">
  <rect height="500" width="500" y="0" x="0"></rect>
</clipPath>

Attached a sample that reproduces the issue.

Reproduced on:
Safari 6.0.3 / MacOS X 10.8.3
Chrome 25.0.1364.172m / Windows 7
Chrome Canary 27.0.1446.3 / Windows 7