Page MenuHomePhabricator

Bug 2024601 - patch 1 - Parsing support for substitution functions as style query expression values. r=#style
ClosedPublic

Authored by jfkthame on Mar 30 2026, 2:23 PM.
Referenced Files
Unknown Object (File)
Sun, May 3, 12:14 AM
Unknown Object (File)
Thu, Apr 30, 9:24 AM
Unknown Object (File)
Sun, Apr 26, 12:56 PM
Unknown Object (File)
Thu, Apr 23, 5:59 PM
Unknown Object (File)
Fri, Apr 17, 11:45 AM
Unknown Object (File)
Fri, Apr 17, 5:32 AM
Unknown Object (File)
Thu, Apr 16, 10:29 PM
Unknown Object (File)
Thu, Apr 16, 6:01 AM
Subscribers

Details

Summary

This is sufficient to make the existing parsing test pass, but the functions don't
actually work at evaluation time. The following patch will add some query evaluation
tests to expose this.

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
emilio added a project: testing-approved.
emilio added a subscriber: emilio.
emilio added inline comments.
servo/components/style/queries/feature_expression.rs
818–821

Maybe also env? In fact, maybe factor out this into a static function?

This revision is now accepted and ready to land.Mar 30 2026, 2:32 PM
servo/components/style/queries/feature_expression.rs
818–821

I wondered about supporting env() ... AFAIK there's not currently any test coverage for it, but I'll check whether webkit/blink accept it already. I guess there probably no good reason not to allow it.

jfkthame marked an inline comment as done.
This revision is now accepted and ready to land.Apr 1 2026, 12:43 AM
This revision is now accepted and ready to land.Apr 1 2026, 11:03 AM