Bug 5278

Summary: WARNING: Malformed viewbox string: (l: 0)
Product: WebKit Reporter: Julien Palmas <julien.palmas>
Component: SVGAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P4    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.carto.net/papers/svg/samples/symbol.svg
Attachments:
Description Flags
Reduced test case.
none
Another reduced test case
none
rwlbuis patch eric: review+

Description Julien Palmas 2005-10-05 16:01:23 PDT
The URL points to a svg that triggers this warning.
This bug might already exist in the bugzilla list, but could not find where...
Comment 1 Eric Seidel (no email) 2005-10-05 18:04:30 PDT
Created attachment 4227 [details]
Reduced test case.

the use of <symbol> seems to be related.  This test might not be fully reduced
yet though.
Comment 2 Julien Palmas 2005-10-06 07:02:49 PDT
Created attachment 4234 [details]
Another reduced test case

This test case also triggers the warning.

If you add a viewBox attribute to the symbol element, the warning disappears .
For example :
<symbol id="coniferous" viewBox="0 0 100 50">

The warning comes from
KSVG::SVGFitToViewBoxImpl::parseViewBox(KDOM::DOMStringImpl *str)

The viewBox attribute is not compulsory (I think), but the parseViewBox method
is always called. This should be modified.
Comment 3 Julien Palmas 2005-10-06 07:06:19 PDT
Ah, forgot something.

If you add the viewBox attribute like I said before, the warning disappears, but the <use> element is not 
rendered anymore ...
Comment 4 Julien Palmas 2005-10-10 13:28:26 PDT
Created attachment 4299 [details]
rwlbuis patch
Comment 5 Eric Seidel (no email) 2005-10-10 14:03:44 PDT
Comment on attachment 4299 [details]
rwlbuis patch

I'm not sure I really like this "dummy" (hack) SVG element for use, but at
least this patch fixes the hack.
Comment 6 Rob Buis 2005-10-11 04:01:38 PDT
It seems there is still a problem with the reduced testcase.
My suspicion, aspect ratio is not correctly handled!
I'll look at it tonight, unless someone beats me to it :)