[Webkit-unassigned] [Bug 47156] CSS 2.1 failure: background-intrinsic-*

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 9 04:19:29 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=47156





--- Comment #3 from Nikolas Zimmermann <zimmermann at kde.org>  2011-01-09 04:19:30 PST ---
(In reply to comment #2)
> The problem here is that SVGImage fails to report the correct size() for SVG with a viewBox. If both height and width of the SVG are relative, the viewBox should be used to compute the correct size for a given containerSize, but I can't find the right incantation of viewBox/preserveAspectRatio etc to do this.

SVGFitToViewBox contains a helper metho for that task:
static AffineTransform viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);

For a given viewBox rect and a SVGPreseveAspectRatio, as well as an available width/height it gives you the AffineTransform that you need to concat to the current graphics context CTM, to render the SVG properly according to the viewBox/preserveAspectRatio settings.

Does that help?
(Note, I only had a quick glance at what you wrote, and didn't check the actual testcase, i'm in hurry atm...)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list