Get unique selector before creating the DOM for a CSS Rule in the Rules view
Categories
(DevTools :: Inspector: Rules, defect, P3)
Tracking
(firefox108 fixed)
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: rcaliman, Assigned: jdescottes)
Details
Attachments
(2 files)
The RuleEditor._create()
operation is synchronous. It generates the DOM for the CSS Rule.
While preparing to build the selector fragment, there is a nested async operation to get the uniqueSelector()
of a style rule which doesn't have a proper CSS selector text, like style rules from inline style
attributes.
The nested async expression is odd. It breaks the expectations of tests that DOM here is produced synchronously.
We should find a way to keep the entire body of RuleEditor._create()
synchronous.
Perhaps compute the unique selector higher in the chain, when getting rules from the server, but before rendering them?
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Note that this unexpected async operation also leads the highlighter icon to be positioned differently for the "element" entry compared to the regular selectors.
Assignee | ||
Comment 2•2 years ago
|
||
Moving to defect as this is at least a visual / UI bug.
Assignee | ||
Comment 3•2 years ago
|
||
unique selectors for inline and inherited inline rules will be retrieved on demand.
Updated•2 years ago
|
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1283037f6210 [devtools] Resolve inline & inherited-inline selectors for rule-editor on demand r=nchevobbe
Comment 5•2 years ago
|
||
bugherder |
Description
•