Open Bug 1788236 Opened 3 years ago Updated 3 years ago

System stylesheets should be read only in the style editor

Categories

(DevTools :: Style Editor, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

Details

STRs:

  • open about:support
  • open the style editor
  • remove all styles from html.css

ER: There is no impact in the page so I should not have been able to edit the stylesheet in the first place.

Hi Emilio!,

We cannot update system stylesheets (eg resource://gre-resources/scrollbars.css on about:support) with the APIs currently used by the StyleEditor.

I saw some cpp code mentioning readonly stylesheets at https://searchfox.org/mozilla-central/rev/1d861901b6682ef2e191b9f7683eb267bdd131e2/layout/style/StyleSheet.cpp#1515-1517, but I didn't manage to lift the restriction.

Do you know if there's a way to edit those stylesheets from DevTools (and apply the changes dynamically on the current page). It seems like it could be useful to engineers working on Firefox UI, but maybe it's not technically feasible. If not, I can just display them as readonly.

Thanks!

Flags: needinfo?(emilio)

Yeah, it's intentional, these are not mutable because they are in shared memory across all processes. User-agent style sheets should just be marked read-only.

Flags: needinfo?(emilio)

Thanks for the feedback, let's make them read-only then!

You need to log in before you can comment on or make changes to this bug.