Support detecting bool preferences in chrome stylesheets #1776

Closed
opened 1 year ago by Ghost · 0 comments
Ghost commented 1 year ago

In Bug 1259889 (which landed in mozilla/48) they added the ability to abuse @supports to read preferences in UA Sheets. This is pretty nifty and we do use it slightly.

However, the history of this comes from a much earlier bug which is not very relevant with the goal of supporting this is chrome-priv stylesheets. Mozilla ended up doing this in mozilla/59 via Bug 1267890 and adding it to servo/stylo. Luckily, they ALSO made sure to make Gecko its self capable of it.

There is a theoretical performance impact.. But our codebase is well fast enough with its code cleanup over the years to handle it just fine.

This is basically a one liner that anyone could do. I don't need this any time soon but will want it for a thing eventually and it would be a good feature to have for extensions. So I am gonna set this for the next milestone and set as a Good First Issue and let anyone who wants to do it.. Do it.

Just be sure to test it before you PR it.. or else ;)

In [Bug 1259889](https://bugzilla.mozilla.org/show_bug.cgi?id=1259889) (which landed in `mozilla/48`) they added the ability to abuse `@supports` to read preferences in `UA Sheets`. This is pretty nifty and we do use it slightly. However, the history of this comes from a much earlier bug which is not very relevant with the goal of supporting this is `chrome-priv` stylesheets. Mozilla ended up doing this in `mozilla/59` via [Bug 1267890](https://bugzilla.mozilla.org/show_bug.cgi?id=1267890) and adding it to servo/stylo. Luckily, they ALSO made sure to [make Gecko its self capable](https://hg.mozilla.org/mozilla-central/rev/da5f3201fc92) of it. There is a theoretical performance impact.. But our codebase is well fast enough with its code cleanup over the years to handle it just fine. This is basically a one liner that anyone could do. I don't need this any time soon but will want it for a thing eventually and it would be a good feature to have for extensions. So I am gonna set this for the next milestone and set as a Good First Issue and let anyone who wants to do it.. Do it. Just be sure to test it before you PR it.. or else ;)
Ghost added the
Layout - CSS
Good first issue
labels 1 year ago
Ghost added this to the 29.3.0 milestone 1 year ago
Ghost removed the
Good first issue
label 1 year ago
athenian200 was assigned by Ghost 1 year ago
Ghost added the
Fixed
label 1 year ago
Ghost closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: MoonchildProductions/UXP#1776
Loading…
There is no content yet.