Bug 191930 - Radial gradient with href sometimes doesn't paint in WK1 or with the very first layout in WK2
Summary: Radial gradient with href sometimes doesn't paint in WK1 or with the very fir...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 192068 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-23 16:49 PST by Ryosuke Niwa
Modified: 2018-12-12 14:25 PST (History)
7 users (show)

See Also:


Attachments
Reduction (546 bytes, text/html)
2018-11-23 16:52 PST, Ryosuke Niwa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2018-11-23 16:49:23 PST
When href content attribute is used on radial gradient to copy attributes from another radial gradient,
the very first paint / layout in MiniBrowser and DumpRenderTree doesn't reference to it.

The problem doesn't seem to reproduce in Safari perhaps because it triggers multiple layouts.
Comment 1 Ryosuke Niwa 2018-11-23 16:52:26 PST
Created attachment 355541 [details]
Reduction

To reproduce the bug, open the attached bug in MiniBrowser. The issue reproduces the very first time the document is loaded.

It appears that reproducing the problem requires a new WK2 window. In WK1, the green box never appears regardless of how many window sizes I trigger so that's a pretty serious bug.
Comment 2 Ryosuke Niwa 2018-11-23 16:53:30 PST
Oops, I initially thought this is a very recent regression but it's not that. The bug simply doesn't reproduce in Safari.
Comment 3 Ryosuke Niwa 2018-11-23 17:00:36 PST
There are suspicious early exists for when renderer() is null in SVGRadialGradientElement::collectGradientAttributes but removing them didn't fix the issue. There is some kind of dependency resolution that's broken here since the bug doesn't reproduce if href isn't specified on radial gradient.
Comment 4 Ryosuke Niwa 2018-11-23 17:47:41 PST
Hm... tests like LayoutTests/svg/custom/radialGradient-focal-radius.svg is working so it's only the subset of features that don't quite work.
Comment 5 Ryosuke Niwa 2018-11-23 17:55:37 PST
It looks like updating href content attribute doesn't update the rendering at all: https://bugs.webkit.org/show_bug.cgi?id=191934

I suspect these two bugs are related.
Comment 6 Simon Fraser (smfr) 2018-11-27 20:13:38 PST
*** Bug 192068 has been marked as a duplicate of this bug. ***
Comment 7 Simon Fraser (smfr) 2018-11-27 20:14:01 PST
It paints when we paint with accelerated drawing, but not when we don't.
Comment 8 Simon Fraser (smfr) 2018-11-27 20:17:55 PST
<rdar://problem/46298791>
Comment 9 Radar WebKit Bug Importer 2018-12-12 14:25:51 PST
<rdar://problem/46675465>