Bug 214239 - Some further streamlining of Gradient handling code
Summary: Some further streamlining of Gradient handling code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-12 13:33 PDT by Darin Adler
Modified: 2020-07-12 21:10 PDT (History)
20 users (show)

See Also:


Attachments
Patch (29.39 KB, patch)
2020-07-12 13:53 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (29.42 KB, patch)
2020-07-12 14:16 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2020-07-12 13:33:00 PDT
Some further streamlining of Gradient handling code
Comment 1 Darin Adler 2020-07-12 13:53:35 PDT Comment hidden (obsolete)
Comment 2 Darin Adler 2020-07-12 14:16:31 PDT
Created attachment 404116 [details]
Patch
Comment 3 Darin Adler 2020-07-12 17:03:57 PDT
Parts of this were driven by Sam’s comments on my last patch.
Comment 4 Darin Adler 2020-07-12 18:36:41 PDT
Comment on attachment 404116 [details]
Patch

Passing all the EWS tests.
Comment 5 Sam Weinig 2020-07-12 19:12:05 PDT
Comment on attachment 404116 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404116&action=review

> Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp:150
> +        gradient->setGradientSpaceTransform(userspaceTransform);
> +
> +        return { WTFMove(gradient), userspaceTransform };

What is the purpose of storing the userspaceTransform both on the Gradient and in the GradientData?
Comment 6 Darin Adler 2020-07-12 20:44:40 PDT
Comment on attachment 404116 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404116&action=review

>> Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp:150
>> +        return { WTFMove(gradient), userspaceTransform };
> 
> What is the purpose of storing the userspaceTransform both on the Gradient and in the GradientData?

I asked myself the same question.

> Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp:174
> +            gradientData.gradient->setGradientSpaceTransform(transformOnNonScalingStroke(&renderer, gradientData.userspaceTransform));

Here is where it’s used. The only place it’s used. Maybe it could be removed. I don’t understand it well enough to be sure at this point.
Comment 7 EWS 2020-07-12 21:09:24 PDT
Committed r264290: <https://trac.webkit.org/changeset/264290>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404116 [details].
Comment 8 Radar WebKit Bug Importer 2020-07-12 21:10:12 PDT
<rdar://problem/65453742>