Computed view is not updated when updating a stylesheet in the rule view
Categories
(DevTools :: Inspector, defect)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
Details
STRs:
- open https://rural-quill.glitch.me/
- open devtools inspector with 3 pane mode, select computed view
- select the h1 in the markup view
- update the color to anything else
Expected result: the computed view color should be updated
Actual result: the computed view color is not updated
Note1: this only happens for rules defined in a stylesheet, adding rules to the element directly will update the computed view.
Note2: doing the same stylesheet modification in the StyleEditor will update the computed view
Reporter | ||
Comment 1•5 years ago
|
||
My analysis is that the update of the computed view here should be triggered from a stylesheet-updated
event. However this event is not emitted by the pageStyle actor when the update comes from the RuleView, because it triggers an update of type UPDATE_PRESERVING_RULES
. And only style updates with type UPDATE_GENERAL
are turned into stylesheet-updated events:
Some additional pointers:
- setRuleText method using UPDATE_PRESERVING_RULES, used by the ruleview to update the stylesheet
- description of
UPDATE_PRESERVING_RULES
vsUPDATE_GENERAL
in stylesheets.js - styleApplied callback which filters out events that are not
UPDATE_GENERAL
I feel like updates to stylesheets from the ruleview should also trigger stylesheet updated events, but we should make sure this doesn't have a bad performance impact.
Comment 2•5 years ago
|
||
Most likely a duplicate of bug 1456779. I will close this one and more your comment to that bug since it's really useful. Thanks.
Assignee | ||
Updated•3 years ago
|
Description
•