[Webkit-unassigned] [Bug 61600] SVGRadialGradientElement::selfHasRelativeLengths() doesn't consider if cx() is relative

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 26 23:03:11 PDT 2011


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





--- Comment #8 from Nikolas Zimmermann <zimmermann at kde.org>  2011-05-26 23:03:10 PST ---
(In reply to comment #7)
> (In reply to comment #6)
> > (From update of attachment 95106 [details] [details])
> > How do we test this?
> 
> Unfortunately, I'm not sure. I'm not familiar with the WebKit code to know what may cause this path to be hit, just that it was "clearly" wrong. Either one of the calls to cy.isRelative() should be removed (since it is redundant) or the more likely answer, that because isRelative() has no side-effects/is const, the likely intent was for cx() and cy() to be checked, just as fx() and fy() are checked.
> 
> For what it's worth, the downstream report is at http://code.google.com/p/chromium/issues/detail?id=84141 (originally http://code.google.com/p/chromium/issues/detail?id=83873#c2 )

I have a suggestion for a test:
Use LayoutTests/svg/custom/relative-sized-content.xhtml  as template.

The hasRelativeLength() stuff is relevant, when you eg. apply your radialGradient with cx/cy in percentages to a target rectangle, which itself is relatively postionioned. Currently when resizing the window you won't see any changes of 'cx' (if it is relative, and 'cy' is absolute).

You can "mimic" window size changes, by embedding your <svg> in an outer <div> and resize that, this is what the test example I cited above does.

To summarize:
You'll need a svg with width/height 100%, a rect with w/h="100%" a radGrad with cy="50" (sth. absolute) and a percentage based cx. That should expose the bug....

Good catch, btw...

-- 
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