Open Bug 1300979 Opened 4 years ago Updated 4 months ago

Initiator stack trace for requests caused by CSS

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: sebo, Unassigned)

References

(Blocks 1 open bug)

Details

For requests caused by parsing CSS (e.g. url() or image() notations or an @font-face rule) the related CSS file (and maybe line and column numbers) and/or CSS rule may be displayed.

Clicking it would switch to the Style Editor panel and highlight the related property (or even the related value) there.
Hovering it could display the related CSS rule within a tooltip.

Sebastian
Sounds like nice new enhancement, thanks for the report.

Honza
Priority: -- → P3
Product: Firefox → DevTools

Brad, not sure if you can advise on this, feel free to bounce this back: Without deeper investigation, which team do you think needs to help us with this and do you have a sense of effort/complexity?

Flags: needinfo?(bwerth)
Summary: Improve info related to requests caused by CSS → Initiator stack trace for requests caused by CSS

(In reply to :Harald Kirschner :digitarald from comment #2)

Brad, not sure if you can advise on this, feel free to bounce this back: Without deeper investigation, which team do you think needs to help us with this and do you have a sense of effort/complexity?

I don't know how feasible this is, or even if we would need more support from the Platform code. Razvan will know.

Flags: needinfo?(bwerth) → needinfo?(razvan.caliman)

I believe this is similar in spirit to the links for CSS Warnings in the console to jump to the target CSS Rule. For those, we did need a few platform changes which I believe @jsdescottes implemented.

It also sounds related to Bug 1169770 where we have line and column offsets for a CSS Rule to be able to jump to it in the right context. (There's a bug wrong offsets within inline stylehseets). These offsets come from helpers in InspectorUtils:
https://searchfox.org/mozilla-central/rev/c79c0d65a183d9d38676855f455a5c6a7f7dadd3/dom/chrome-webidl/InspectorUtils.webidl#21-23

Flags: needinfo?(razvan.caliman)

I believe this is similar in spirit to the links for CSS Warnings in the console to jump to the target CSS Rule. For those, we did need a few platform changes which I believe @jsdescottes implemented.

Thanks for the analysis! It seems like the linking to CSS depends on having the CSS stacks available at all. Right now in the Network panel, the resources caused by CSS directives don't even have stacks attached yet. Any idea where that work should happen?

You need to log in before you can comment on or make changes to this bug.