Closed Bug 1838627 Opened 3 years ago Closed 3 years ago

Expose desugaredSelector property on StyleRuleActor form for nested rule

Categories

(DevTools :: Inspector: Rules, task, P1)

task

Tracking

(firefox116 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: nchevobbe, Assigned: emilio)

References

Details

Attachments

(1 file, 1 obsolete file)

We need the full desugared selector in the inspector for a few different things (matching style for a rule, selector highlighter, …), so let's expose it from the server.

We might also put it for each ancestor so we could also display it for parent rules if need be

Emilio, is this something platform keeps around for a given rule? If so, can you point me to it so I can try to expose it for chome access?
Not the end of the world if this is not the case, it shouldn't be too hard to do in JS

Flags: needinfo?(emilio)

We don't, we generate those dynamically later, but it shouldn't be too hard to do... Curious, do you always want the desugared selector for a given rule? Or do you need something like CSSStyleRule.desugarSelectorWith(UTF8String parentSelector)? Either way is probably fine.

Flags: needinfo?(emilio)

Oh, also, do you want the whole selector text? Or the selector at one position? We have a bunch of APIs for DevTools that do the later, so just wondering.

Flags: needinfo?(nchevobbe)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

We don't, we generate those dynamically later, but it shouldn't be too hard to do... Curious, do you always want the desugared selector for a given rule? Or do you need something like CSSStyleRule.desugarSelectorWith(UTF8String parentSelector)? Either way is probably fine.

Yeah we'll probably always want the desugared selector for a rule, since we'll need it for our highlighter selector (Bug 1838163), and I also think it will be useful to display it for the user (Bug 1838626)(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)

Oh, also, do you want the whole selector text? Or the selector at one position? We have a bunch of APIs for DevTools that do the later, so just wondering.

Yeah the whole selector text is what we want for this case

Flags: needinfo?(nchevobbe)
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Duplicate of this bug: 1428245
Attachment #9339328 - Attachment description: Bug 1838627 - Expose CSSStyleRule.desugaredSelectorList to chrome code. r=nchevobbe → Bug 1838627 - Refactor InspectorUtils APIs that just forward to CSSStyleRule, and expose desugared selectors on them. r=nchevobbe
Blocks: 1838164
Priority: -- → P1
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/782b982f3a81 Refactor InspectorUtils APIs that just forward to CSSStyleRule, and expose desugared selectors on them. r=nchevobbe,webidl,firefox-style-system-reviewers,smaug,devtools-reviewers,boris
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

Comment on attachment 9340225 [details]
Bug 1838627 - [devtools] Expose desugared selectors on style rule actor. r=#devtools-reviewers.

Revision D181606 was moved to bug 1838163. Setting attachment 9340225 [details] to obsolete.

Attachment #9340225 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: