Page MenuHomePhabricator

Bug 1839837 - Detect default color interpolation method for *-gradient() syntax r=#layout-reviewers
ClosedPublic

Authored by tlouw on Aug 5 2023, 12:05 AM.
Referenced Files
Unknown Object (File)
Mar 17 2026, 1:55 PM
Unknown Object (File)
Mar 1 2026, 1:11 AM
Unknown Object (File)
Jan 6 2026, 5:04 PM
Unknown Object (File)
Nov 19 2025, 10:37 PM
Unknown Object (File)
Oct 15 2025, 11:02 AM
Unknown Object (File)
Oct 14 2025, 8:00 PM
Unknown Object (File)
Oct 14 2025, 7:51 AM
Unknown Object (File)
Jun 10 2025, 8:25 AM
Subscribers

Details

Summary

The default color interpolation method is detected during parse time.
The equality with the specified method is stored on the gradient and
then during serialization the method is omitted if it was the default.

Event Timeline

tlouw created this revision.
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".Aug 5 2023, 12:05 AM
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
tlouw planned changes to this revision.Aug 5 2023, 9:08 AM
tlouw requested review of this revision.Aug 5 2023, 9:13 AM
tlouw updated this revision to Diff 751097.
tlouw retitled this revision from WIP: Bug 1839837 - Detect default color interpolation method for *-gradient() syntax r=#layout-reviewers to Bug 1839837 - Detect default color interpolation method for *-gradient() syntax r=#layout-reviewers.
tlouw added a reviewer: layout-reviewers.
emilio added inline comments.
layout/painting/nsCSSRenderingGradients.cpp
772

Maybe just use !mGradient->Repeating()?

servo/components/style/values/specified/image.rs
102

Just use a slice: &[generic::GradientItem..]

710–711

Maybe just // Legacy gradients always use srgb as a default.

740–741

Same here.

This revision is now accepted and ready to land.Aug 7 2023, 9:39 AM