Closed Bug 1849881 Opened 10 months ago Closed 9 months ago

Copy Location should support css sourcemaps

Categories

(DevTools :: Inspector, defect, P3)

Firefox 116
defect

Tracking

(firefox120 fixed)

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: tajinder.gill, Assigned: nchevobbe)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

In the rules part of the Inspector on a site with CSS sourcemaps enabled and "Show original sources" enabled. Hover over the source link and choose "Copy Location".

Actual results:

The location of the rendered css file is copied.

Expected results:

If "Show Original Sources" is enabled this arguable should copy what is displayed which is the source file path. This isn't the case however the rendered file path is always copied. If this isn't desirable then "Copy Source Location" field should be added as this is a common use case for developers.

Component: Untriaged → Inspector
Product: Firefox → DevTools

The context menu is handled in https://searchfox.org/mozilla-central/rev/479f4762b8c537892269dbf4442dd33cc01a525c/devtools/client/styleeditor/StyleEditorUI.sys.mjs#807-811

#copyUrl = () => {
  if (this.#contextMenuStyleSheet) {
    lazy.copyString(this.#contextMenuStyleSheet.href);
  }
};

Thank you for the enhancement suggestion.
Setting as NEW so the developing team can have a look.

Status: UNCONFIRMED → NEW
Ever confirmed: true

STRs:

  • go to MDN
  • open style editor
  • make sure "Show original sources" is checked
  • open inspector
  • right click on any css link pointing to _themes.css
  • copy source location

Expected result: should copy the linl to _themes.css
Actual result: copies a link to the generated file

Note that in the style editor right clicking on the file and using Copy URL copies the right URL.

Severity: -- → S3
Type: enhancement → defect
Priority: -- → P3
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/773b8562a6c2
[devtools] Make Copy Location context menu handle original file. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: