Closed Bug 38654 Opened 24 years ago Closed 21 years ago

The cute lion won't show

Categories

(Core :: SVG, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: axel, Assigned: alex)

References

()

Details

(Whiteboard: [libart])

Attachments

(2 files)

Hi,
I am trying out svg with a build from CVS Tue May  9 13:44:45 MET DST 2000
The example.xml in layout/svg/tests looks ok, but the cute lion linked on the
SVG page won't show, it won't show anything if pointing the lizard to the link.
I tried renaming the file from lion.svg to lion.xml, and the title shows.
If I add the namespace given in example.xml, it displays a few assorted 
polygons, but nothing close to a cute lion.
I will attach screenshot.

Axel
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Reporter: can you add the URL from which you downloaded this document?
Wow, this is one year old, I forgot about it.
This was on the project site, but isn't linked anymore.
http://www.mozilla.org/webtools/bonsai/cvslog.cgi?file=mozilla-org/html/projects/svg/lion.svg&rev=&root=/cvsroot/
http://www.mozilla.org/projects/svg/lion.svg is the direct link.

Still wrong mime-type, of course, and as bonsai shows no change to that file,
I guess the bugs still valid.
Thanx to Eric for bringing this up again.
Of course we now have a working cute lion at skeeter ;-).

Axel
The mime type is now correct - I filed a bug on endico a while back. However,
even on the branch, it looks, well... Let me attach a screenshot - words can't
describe this.

Nice effect, though :)

Reloading changes the result - uninited variable somewhere. Note that this is a
build with the fix to bug 110976 applied.
The screenshot is all screwed up because it contains filled polylines, which 
are allowed by the specs but we don't handle at the moment. To fix this, we 
need implementions for ContainsOpenSubPaths() and ConstructClosedPath() in 
layout/svg/base/src/nsSVGFill.cpp.
Any takers?
So, I hacked at this, and it turns out that this isn't the problem.

See bug 113156 for the open paths thing.

The real issue is that the <polyline> has the end point the same as the start
point, _and_ as the last three points. Making it just the last two points works.

I think this is a libart bug. James?
Depends on: 113156
Yeah, libart doesn't like consecutive points being equal. Some of the libart 
algorithms add a small random perturbation to all points to gain some 
stability, but that clearly isn't enough. It looks like we'll need to prevent 
these cases being passed to libart. We could add a check in 
nsSVGBPathBuilder::LineTo(), etc..
Also, libart's perturbation can have a negative effect if a Path is closed by 
setting the last point equal to the first one (as opposed to using 
nsASVGPathBuilder::Close()). In this case, the perturbation can have the effect 
of opening the polygon such that on rendering one or more scanlines 'leak' to 
the left or right.
We could catch these cases in nsSVGBPathBuilder as well.

No, the libart perturbation code checks for the last point of a closed subpath
(ie one started with ART_MOVETO rather than ART_MOVETO_OPEN). Without my patch
in bug 113156, all our paths will be _OPEN.

I want to avoid removing points though, becasue that will stuff up markers when
we end up supporting them.
This is a libart bug.
Assignee: dean.jackson → alex.fritze
Status: ASSIGNED → NEW
OS: Solaris → All
QA Contact: dean.jackson → bbaetz
Hardware: Sun → All
Whiteboard: [libart]
this works for me (build 2002021423)
The URL should probably be updated to http://www.mozilla.org/projects/svg/lion.svg

But with the move to the new web server, it is being sent with a Content-type of
text/plain.
telnet www.mozilla.org 80
GET /projects/svg/lion.svg  HTTP/0.9

HTTP/1.1 200 OK
Date: Thu, 30 Oct 2003 12:49:51 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) PHP/4.1.2
Last-Modified: Fri, 29 Aug 2003 01:20:13 GMT
ETag: "5c412c-52d9-3f4eaa4d"
Accept-Ranges: bytes
Content-Length: 21209
Connection: close
Content-Type: image/svg+xml
lion.svg was missing an svg namespace declaration. 
Marking fixed.
Libart still has a problem with that file because it uses paths with many
duplicate points (leading to horizontal line glitches), but that's a different bug.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: