stylo: handle modifications to UA sheets by invalidating UA CascadeData cache

NEW
Unassigned

Status

()

enhancement
P3
normal
2 years ago
2 years ago

People

(Reporter: heycam, Unassigned)

Tracking

unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 wontfix, firefox58 affected)

Details

Reporter

Description

2 years ago
In bug 1362532 comment 19, Brad points out that it is possible to edit the UA style sheets using the Browser Toolbox.  We should ensure that we update our cached UA-level CascadeData when this happens, otherwise the changes might/will not have an effect.
To be clear, changes make to stylesheets via Browser Toolbox appear to trigger restyle and layout in Stylo builds. Here's steps to demonstrate that:

1) Follow instructions at https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox to setup and then open the Browser Toolbox.
2) Scroll down the list of stylesheets until you get to the bottom, and select the "global.css" near the bottom.
3) Scroll through the list of styles until about line 185, where you will see the ".plain" style. I believe this style applies to the canvas containing the main scrollframe.
4) Change padding from 0 to 100px. The interior container will shrink and the content inside will go through layout.
Reporter

Comment 2

2 years ago
I think global.css is loaded as an Author level sheet, so it wouldn't be involved with the cascade data cache.

I'm not really sure how the browser toolbox works -- if it is targetting the parent process (since it's inspecting a browser window) and you edit one of the sheets, does that change get propagated to child processes?  I tried turning off e10s, opening the browser toolbox, then editing html.css to add a |pre { color: red !important; }| rule, but I didn't see it have an effect in my Bugzilla tabs.
Reporter

Comment 3

2 years ago
But I don't see it have an effect even with Stylo disabled.
status-firefox57=wontfix unless someone thinks this bug should block 57
You need to log in before you can comment on or make changes to this bug.