svg filter used in mask's group fails to render correctly

RESOLVED FIXED in mozilla11

Status

()

Core
SVG
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Eugene, Assigned: Robert Longson)

Tracking

Trunk
mozilla11
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 576837 [details]
filter applied to group within a mask

If a filter is applied to <g> element within a mask, firefox fails to render. But if it is applied directly to child element of <g> it renders svg.

Please see the attachment for the not working svg.

Here are 2 svgs to demonstrate the issue: 
1)does not work on Firefox(works on chrome)
<svg width="600" height="400" xmlns="http://www.w3.org/2000/svg" bbheight="210" bbwidth="250">
 <!-- Created with ImageBot - http://www.imagebot.com/ -->
 <g>
  <defs>
   <filter y="90" width="250" height="210" x="90" filterUnits="userSpaceOnUse" id="imagebot_6">
    <feGaussianBlur stdDeviation="6" result="back"/>
   </filter>
  </defs>
  <title>Layer 1</title>
  <g id="imagebot_1">
   <mask id="imagebot_5" x="0" y="0" width="1" height="1">
    <g id="imagebot_7" filter="url(#imagebot_6)">
     <rect  x="100" y="100" width="250" height="210" fill="grey" id="imagebot_2" />
    </g>
   </mask>
   <g id="imagebot_3" mask="url(#imagebot_5)">
    <rect x="100" y="100" width="250" height="210" fill="red" id="imagebot_4"/>
   </g>
  </g>
 </g>
</svg>

2)works on Firefox(works on chrome)
<svg width="600" height="400" xmlns="http://www.w3.org/2000/svg" bbheight="210" bbwidth="250">
 <!-- Created with ImageBot - http://www.imagebot.com/ -->
 <g>
  <defs>
   <filter y="90" width="250" height="210" x="90" filterUnits="userSpaceOnUse" id="imagebot_6">
    <feGaussianBlur stdDeviation="6" result="back"/>
   </filter>
  </defs>
  <title>Layer 1</title>
  <g id="imagebot_1">
   <mask id="imagebot_5" x="0" y="0" width="1" height="1">
    <g id="imagebot_7" >
     <rect  x="100" y="100" width="250" height="210" fill="grey" id="imagebot_2" filter="url(#imagebot_6)"/>
    </g>
   </mask>
   <g id="imagebot_3" mask="url(#imagebot_5)">
    <rect x="100" y="100" width="250" height="210" fill="red" id="imagebot_4"/>
   </g>
  </g>
 </g>
</svg>


The only difference is that filter reference is moved from <g> element directly to the child in this case <rect>.
(Assignee)

Updated

6 years ago
Assignee: nobody → longsonr
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 1

6 years ago
Created attachment 582694 [details] [diff] [review]
patch

children of masks have no valid covered rect as masks are not directly displayable so we skip drawing them when there's a filter present as filters calculate their own dirty rects.
Attachment #582694 - Flags: review?(dholbert)
(Assignee)

Updated

6 years ago
Blocks: 697904
OS: Windows 7 → All
Hardware: x86_64 → All
Version: unspecified → Trunk
Attachment #582694 - Flags: review?(dholbert) → review+
(Assignee)

Comment 2

6 years ago
pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/f21424ec84e6
Flags: in-testsuite+
Target Milestone: --- → mozilla11
https://hg.mozilla.org/mozilla-central/rev/f21424ec84e6
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.