Tweak rules view to ease supporting incremental updates
Categories
(DevTools :: Inspector: Rules, task)
Tracking
(firefox151 fixed)
| Tracking | Status | |
|---|---|---|
| firefox151 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
For now the CssRuleView class wipes its whole content on most updates, which causes many troubles regarding user focus.
We have to restore user focus when updating, whereas the actual element where the focus is doesn't need any update.
A simplification regarding "containers" would help supporting incremental updates.
Right now pseudo elements, inherited, keyframes, registered properties and position-try all follow a similar pattern with expandable containers.
But regular rules don't.
This discrepency makes it significantly harder to update the list of rules incrementally.
| Assignee | ||
Comment 1•5 months ago
|
||
This will help then reuse this logic for regular rules.
Updated•5 months ago
|
| Assignee | ||
Comment 2•5 months ago
|
||
This will help maintain the rule list on CSSOM updates.
| Assignee | ||
Comment 3•4 months ago
|
||
- simplify fetching pseudoClassLocks as
ElementStyle.elementis actually equal tothis.viewedElement - which also help remove #clearPseudoClassLocks and only rely on the refresh one.
refreshPseudoClassPanel doesn't need to wait for this.elementStyle,
but is functional as soon as viewedElement is set. - streamline the pattern of having "refresh" methods that can be called
right after updating the viewedElement both when it is set to a value
or null. - #clear argument wasn't used and the method is overall confusing.
Callsites are clearer by inlined it and using refresh methods.
(the destroy of ElementStyle is going to be tweaked in followups)
| Assignee | ||
Comment 4•4 months ago
|
||
Comment 6•4 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/00788d76a7fa
https://hg.mozilla.org/mozilla-central/rev/d660180beb2a
https://hg.mozilla.org/mozilla-central/rev/bee11d4678c3
https://hg.mozilla.org/mozilla-central/rev/4a499a60cca5
Updated•3 months ago
|
Description
•