Closed Bug 806432 Opened 7 years ago Closed 7 years ago

SVG filter region sometimes clipped when viewBox and opacity properties used.

Categories

(Core :: SVG, defect, minor)

17 Branch
defect
Not set
minor

Tracking

()

VERIFIED FIXED
mozilla20
Tracking Status
firefox17 - wontfix
firefox18 - affected
firefox19 - verified
firefox20 --- verified

People

(Reporter: karl8, Assigned: jwatt)

References

Details

(Keywords: regression)

Attachments

(3 files)

When an SVG image with viewBox property applied to the root SVG element (may be also another, no tested) has an element with opacity less than 1 and a filter directly applied to it, the filter region is clipped (see attachment).
On Firefox 16 was all fine, on 17 beta the bug showed up.
The clipped filter region is not fixed, it changes as the viewport is resized.
Seting svg.display-lists.painting.enabled = false helps

Regression window(m-c)
Good:
http://hg.mozilla.org/mozilla-central/rev/688734575830
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120802041638
Bad:
http://hg.mozilla.org/mozilla-central/rev/074fb996dfd7
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120802062038
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=688734575830&tochange=074fb996dfd7

Regression window(m-c)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/a799b5bff84c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120801155239
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/b077c43a4306
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120801163038
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=a799b5bff84c&tochange=b077c43a4306
Suspected : Bug 776054
Blocks: 776054
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
(In reply to cannas carlo from comment #0)
> Created attachment 676207 [details]
> Example that shows the bug
> 
> When an SVG image with viewBox property applied to the root SVG element (may
> be also another, no tested) has an element with opacity less than 1 and a
> filter directly applied to it, the filter region is clipped (see attachment).
> On Firefox 16 was all fine, on 17 beta the bug showed up.
> The clipped filter region is not fixed, it changes as the viewport is
> resized.

What web property or application is affected? Was this found through testing or while surfing? Thanks in advance!
Assignee: nobody → jwatt
(In reply to Alex Keybl [:akeybl] from comment #2)
> (In reply to cannas carlo from comment #0)
> > Created attachment 676207 [details]
> > Example that shows the bug
> > 
> > When an SVG image with viewBox property applied to the root SVG element (may
> > be also another, no tested) has an element with opacity less than 1 and a
> > filter directly applied to it, the filter region is clipped (see attachment).
> > On Firefox 16 was all fine, on 17 beta the bug showed up.
> > The clipped filter region is not fixed, it changes as the viewport is
> > resized.
> 
> What web property or application is affected? Was this found through testing
> or while surfing? Thanks in advance!
I found it while testing.
(In reply to cannas carlo from comment #3)
> (In reply to Alex Keybl [:akeybl] from comment #2)
> > (In reply to cannas carlo from comment #0)
> > > Created attachment 676207 [details]
> > > Example that shows the bug
> > > 
> > > When an SVG image with viewBox property applied to the root SVG element (may
> > > be also another, no tested) has an element with opacity less than 1 and a
> > > filter directly applied to it, the filter region is clipped (see attachment).
> > > On Firefox 16 was all fine, on 17 beta the bug showed up.
> > > The clipped filter region is not fixed, it changes as the viewport is
> > > resized.
> > 
> > What web property or application is affected? Was this found through testing
> > or while surfing? Thanks in advance!
> I found it while testing.

Given that, jwatt - do you have a feel for whether this bug will be prevalent post-release?
We also got the report of this bug through our customers. Users which upgraded to V16 has this problem, V15 was ok. I will attach an example which shows this problem. If you remove the opacity-flag everything works fine.
Attached image Example SVG
Not much chance of fixing this for 17.
Marking wontfix for 17 then, but let's try for 18.
It seems as this bug has been fixed already for V17. Thanks alot.
I'm sorry for my earlier comment. It seems that the problem reported by myself and demonstrated in attachment 678314 [details] "Example SVG" is fixed in V17, but the problem in attachment 676207 [details] "Example that shows the bug" still remains. Therefor the original bug is still available.
I should be able to start looking at this next week.
This was not a major issue post-release for FF17. We'll take a low risk uplift if found before beta 4 goes to build Tuesday.
(In reply to Jonathan Watt [:jwatt] from comment #11)
> I should be able to start looking at this next week.

Any update here?
This was untracked, so I'm focusing on the tracking bugs right now.
Attached patch patchSplinter Review
The nsDisplayTransform that is created for the transformed frame has already accounted for the transform by multiplying it onto the gfxContext. Therefore we need to use the untransformed visual overflow region when clipping to create the offscreen surface for group opacity/mask/non-trivial-clipPath.
Attachment #694898 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/5cb54f5fa690
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Blocks: 821152
Blocks: 782972
Blocks: 780354
Blocks: 818841
Blocks: 815462
Comment on attachment 694898 [details] [diff] [review]
patch

This fixes bug 780354, bug 782972, bug 815462, bug 818841 and bug 821152 too.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 776054
User impact if declined: quite a number of SVGs broken
Testing completed (on m-c, etc.): landed on m-c
Risk to taking this patch (and alternatives if risky): very low
String or UUID changes made by this patch: none
Attachment #694898 - Flags: approval-mozilla-aurora?
Blocks: 797507
Comment on attachment 694898 [details] [diff] [review]
patch

Approving on aurora as its low risk and helps fix a lot of SVG regressions.
Attachment #694898 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified fixed FF 19b4 Win 7, Ubuntu 12.04 and Mac OS X 10.7.5
Verified fixed FF 20RC Win 7, Ubuntu 12.04 and Mac OS X 10.7.5
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.