SVG rotation renderization broken

Bug #99368 reported by Jaime Soriano
8
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Medium
firefox (Fedora)
Fix Released
Medium
firefox (Ubuntu)
Fix Released
Medium
Mozilla Bugs
Declined for Feisty by Alexander Sack

Bug Description

Binary package hint: firefox

Firefox 2.0.0.3 in Ubuntu Feisty doesn't render properly the SVG rotations, some parts of the image disappear or are corrupted.

It can be tested with http://croczilla.com/svg/samples/opacity1/opacity1.xml or with any other SVG with rotations.

It works correctly with the same version of Firefox in Ubuntu Edgy.

Tags: mt-upstream
Revision history for this message
In , Adam (adam-redhat-bugs) wrote :

Description of problem:
When displaying svg in firefox from default fedora installation the svg image is
garbled. Check e.g.:
http://www.lowlevel.cz/log/images/tuxtosh3.svg

Version-Release number of selected component (if applicable):
firefox-1.5.0.10-5.fc6

How reproducible:
always

Expected results:
Check the firefox downloaded from mozilla.com pages.

Additional info:
Could be related to cairo?!

Revision history for this message
In , Matěj (matj-redhat-bugs) wrote :

Created attachment 150321
rendering in Epiphany 2.16.3-3.fc6

Just to add one data-point -- this is rendering in epiphany on FC6. Looks
garbled to me as well.

Revision history for this message
In , Adam (adam-redhat-bugs) wrote :

Definitely. But epiphany is also using gecko - I'll bet on some library behind.

Revision history for this message
In , Martin (martin-redhat-bugs) wrote :

Hm, all our gecko apps look broken.

Revision history for this message
In , Martin (martin-redhat-bugs) wrote :

Looks like a problem with system cairo library. When firefox is built with
"--disable-system-cairo", svg rendering works fine. Reassigning.

Revision history for this message
In , Martin (martin-redhat-bugs) wrote :

btw. broken in rawhide, too.

Changed in firefox:
assignee: nobody → mozilla-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Jaime Soriano (kronoss) wrote :

I can make screenshots of the corrupted views. It happens in any SVG with rotations.

I have tried it in three different computers with Firefox 2.0.0.3 and Ubuntu Feisty and always can be reproduced. I haven't seen this problem in other distributions or other versions of Firefox.

Revision history for this message
Chris Nokleberg (chris-sixlegs) wrote :

I can confirm this on Feisty. The linux 2.0.0.3 binary downloaded from mozilla.org works fine, so it seems to be a Ubuntu-specific issue (non-standard build flags?). This will be a show-stopper for many SVG-based applications.

Revision history for this message
Alexander Sack (asac) wrote :

Thanks, this appears to be a bug in thebes implementation depending on some cairo (non-)feature which changed in latest libcairo updates.

Changed in firefox:
importance: Undecided → Medium
status: Needs Info → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

Chris, thanks for helping to triaging firefox bugs. In future, please don't nominate.

Revision history for this message
Frédéric Junod (fredj) wrote :

Hi,

I have the same problem using this site: http://www.openlayers.org/dev/examples/draw-feature.html

Revision history for this message
In , Adam (adam-redhat-bugs) wrote :

Still present in latest rawhide liveCD image for F7.

Revision history for this message
Sylvain Pasche (sylvain-pasche) wrote :

So not using --enable-system-cairo should fix this?

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 99368] Re: SVG rotation renderization broken

On Thu, May 24, 2007 at 10:16:12AM -0000, Sylvain Pasche wrote:
> So not using --enable-system-cairo should fix this?
>

It might fix this particular problem ... but we cannot ship with cairo
that is embedded.

 - Alexander

Revision history for this message
Sylvain Pasche (sylvain-pasche) wrote :

I can confirm that rebuilding the package with the embedded cairo fixes this. The embedded cairo version is cairo 1.0.2, while the current version on feisty is 1.4.2. That's a rather big difference for tracking the potential issues which happened between these versions. I'm wondering if the same issues is also affecting Fedora, it would be interesting to test this on core 7 (they are also using --enable-system-cairo).

What are the arguments against using the embedded cairo version?

Revision history for this message
Alexander Sack (asac) wrote :

On Thu, May 24, 2007 at 01:29:38PM -0000, Sylvain Pasche wrote:
> I can confirm that rebuilding the package with the embedded cairo fixes
> this. The embedded cairo version is cairo 1.0.2, while the current
> version on feisty is 1.4.2. That's a rather big difference for tracking
> the potential issues which happened between these versions. I'm
> wondering if the same issues is also affecting Fedora, it would be
> interesting to test this on core 7 (they are also using --enable-system-
> cairo).
>
> What are the arguments against using the embedded cairo version?
>

If you want to track this down, ask thebes devs on #cairo (or however
the freenode channel is called). They may have an idea as they
probably fixed it for ffox trunk already.

 - Alexander

Revision history for this message
In , Sylvain (sylvain-redhat-bugs) wrote :
Revision history for this message
Sylvain Pasche (sylvain-pasche) wrote :

Notes from the cairo devs for tracking this:

< cworth> If you can verify that a system-cairo of 1.0.2 works and a system-cairo of 1.4.2 doesn't, then it should be an easy process to use
                git-bisect to find the problem.
< tor_> offhand that looks possibly to be the change when cairo fixed an extents bug the 1.8-branch svg depended on
< tor_> a8ca155f83098c02fb8d3acc57b0492d5b753d54 is the likely suspect, if you're set up to experiment that way
< tor_> if that is the problem, changing moz to work with the current fixed behavior is relatively simple

Revision history for this message
Freddy Martinez (freddymartinez9) wrote :

Shouldn't the upstream tracker be mozilla?

Changed in firefox:
status: Unknown → In Progress
Revision history for this message
In , Tor-acm (tor-acm) wrote :

Created attachment 266077
don't depend on API bug

Since linux distributors can't seem to understand "--enable-system-cairo is unsupported", we need to change the branch SVG code to handle both the old and new API behavior of cairo_{fill,stroke}_extent.

Revision history for this message
In , Sylvain Pasche (sylvain-pasche) wrote :
Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
In , Jonathan Watt (jwatt) wrote :

What is the API bug that we don't want to depend on?

Revision history for this message
In , Sylvain Pasche (sylvain-pasche) wrote :

Here's the commit Tim found that fixes the API bug in question: http://gitweb.freedesktop.org/?p=cairo.git;a=commitdiff;h=a8ca155f83098c02fb8d3acc57b0492d5b753d54

"Correctly return the transformed bounding box for stroke/fill extents,
instead of just transforming the two corners separately."

Revision history for this message
In , Jonathan Watt (jwatt) wrote :

Thanks Sylvain.

Revision history for this message
In , Tor-acm (tor-acm) wrote :

Comment on attachment 266077
don't depend on API bug

Linux distributors have been ignoring our advice that --enable-system-cairo is unsupported and are running Firefox against newer versions of cairo than what's in the tree. The branch svg code relied on a bug in one of the cairo APIs that has since been fixed. This patch moves similar fixes that were made to the trunk about half a year ago, and makes the code work with both old and new behavior.

Revision history for this message
In , Dveditz (dveditz) wrote :

Comment on attachment 266077
don't depend on API bug

approved for 1.8.1.5, a=dveditz for release-drivers

Revision history for this message
In , Tor-acm (tor-acm) wrote :

Checked in on MOZILLA_1_8_BRANCH.

Changed in firefox:
status: Confirmed → Fix Released
Revision history for this message
Sylvain Pasche (sylvain-pasche) wrote :

This is now fixed in 2.0.0.5.

Revision history for this message
Freddy Martinez (freddymartinez9) wrote :

Per user comments, marking Fix Released.

Changed in firefox:
status: Confirmed → Fix Released
Revision history for this message
In , Sylvain (sylvain-redhat-bugs) wrote :

This is fixed in version 2.0.0.5-1.fc7

Revision history for this message
In , Martin (martin-redhat-bugs) wrote :

aha, thanks for the notice.

Changed in firefox:
status: In Progress → Fix Released
Changed in firefox:
importance: Unknown → Medium
Changed in firefox (Fedora):
importance: Unknown → Medium
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.