Bug 5326

Summary: Scaling problems with viewBox attributes
Product: WebKit Reporter: Julien Palmas <julien.palmas>
Component: SVGAssignee: Eric Seidel (no email) <eric>
Severity: Normal CC: eric
Priority: P3    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Description Flags
Reduced test case
Expected result
Set correct default value for align
Another attempt at fixing this svg
Expected result
fixes the bug eric: review+

Description Julien Palmas 2005-10-10 13:14:52 PDT
An element with a viewBox attribute is not scaled correctly.
The problem is not present in KDE SVN.
Comment 1 Julien Palmas 2005-10-10 13:17:33 PDT
Created attachment 4296 [details]
Reduced test case

The grey rectangle should be scaled inside the black one, but no scaling is
Comment 2 Julien Palmas 2005-10-10 13:18:37 PDT
Created attachment 4297 [details]
Expected result

Result obtained with KDE
Comment 3 Eric Seidel (no email) 2005-10-11 03:52:01 PDT
Both FireFox and Opera render this svg just liek we do... I'm not sure what's "expected"
Comment 4 Rob Buis 2005-10-12 13:46:18 PDT
Created attachment 4326 [details]
Set correct default value for align

This may possible help with this bug...
Comment 5 Rob Buis 2005-10-12 14:14:02 PDT
Created attachment 4327 [details]
Another attempt at fixing this svg

Note: this patch is not ready for review!
It is a quick and dirty test to see if it fixes the .svg.
A cleaner way should be found, maybe changing SVGLengthImpl etc.
Comment 6 Julien Palmas 2005-10-12 14:40:02 PDT
Created attachment 4328 [details]
Expected result
Comment 7 Julien Palmas 2005-10-12 16:39:43 PDT
Created attachment 4332 [details]
fixes the bug

This patch is actually joining the 2 patches previously posted by rwlbuis.
The format is now correct.
Comment 8 Eric Seidel (no email) 2005-10-12 17:01:58 PDT
*** Bug 5343 has been marked as a duplicate of this bug. ***
Comment 9 Eric Seidel (no email) 2005-10-13 00:03:28 PDT
Comment on attachment 4332 [details]
fixes the bug

Looks good.  rwlbuis explained this all to me on IRC.  Basically instead of
passing itself as a reference (off of which to base % calculations),
SVGSVGElement is passing the nearest viewport.
Comment 10 Eric Seidel (no email) 2005-10-13 01:25:55 PDT