RESOLVED FIXED 38307
REGRESSION: gradient background of LayoutTests/fast/backgrounds/resources/balloon.svg fails to draw
https://bugs.webkit.org/show_bug.cgi?id=38307
Summary REGRESSION: gradient background of LayoutTests/fast/backgrounds/resources/bal...
Simon Fraser (smfr)
Reported 2010-04-28 21:25:16 PDT
At some point the rendering of LayoutTests/fast/backgrounds/resources/balloon.svg changed; the gradient background no longer draws. This breaks the LayoutTests/fast/backgrounds/svg-as-background-2.html test in pixel mode.
Attachments
Testcase (6.39 KB, image/svg+xml)
2010-04-28 21:26 PDT, Simon Fraser (smfr)
no flags
Fix regressions (1.33 MB, patch)
2010-04-29 01:07 PDT, Nikolas Zimmermann
mjs: review+
Simon Fraser (smfr)
Comment 1 2010-04-28 21:26:17 PDT
Created attachment 54669 [details] Testcase
Simon Fraser (smfr)
Comment 2 2010-04-28 21:36:01 PDT
Simon Fraser (smfr)
Comment 3 2010-04-28 22:06:18 PDT
It seems like the difference with this file is that the <linearGradient> is inside a <def>. The <def> has no renderer, so we never create a renderer for the linearGradient, and therefore never call SVGDocumentExtensions::addResource() for it. How is this supposed to work?
Nikolas Zimmermann
Comment 4 2010-04-29 00:40:01 PDT
Hi Simon, thanks a lot for the investigation. Some details why the code changed recently: We had a long-standing hack in SVGStopElement, to do manual style resolution, because of svg/W3C-SVG-1.1/pservers-grad-19-b.svg, which used code like: <g display="none"> <linearGradient> <stop> ... RenderSVGGradientStop was never created because of the display="none" in the parent <g>. To remove manual style resolution hacks (calling styleForRenderer() manually) I made SVGGElement always create renderers, even for display="none" (RenderSVGHiddenContainer, instead of the regular RenderSVGTransformableContainer). For <defs> a RenderSVGHiddenContainer is always created, so renderers are _supposed_ to be created. I will investigate today what is happening, stay tuned.
Nikolas Zimmermann
Comment 5 2010-04-29 00:42:59 PDT
Heh, the testcase uses <def>, instead of <defs>. That element does not exist, so the current rendering is actually a progression ;-) Obviously the testcase needs to be fixed, I'll prepare it.
Nikolas Zimmermann
Comment 6 2010-04-29 01:07:11 PDT
Created attachment 54681 [details] Fix regressions Updated all current failing expected.png files. Fixed problem in balloon.svg (s/def/defs/) -> works again as expected. svg-as-background-2.html now properly paints the gradient, instead of pure red color, even an improvement. I hope this also fixes the Chromium problems, that have been reported in bug 38108.
Maciej Stachowiak
Comment 7 2010-04-29 01:44:29 PDT
Comment on attachment 54681 [details] Fix regressions r=me
Nikolas Zimmermann
Comment 8 2010-04-29 02:07:49 PDT
Landed in r58489.
Note You need to log in before you can comment on or make changes to this bug.