Closed Bug 1643180 Opened 4 years ago Closed 4 years ago

Style editor and debugger should always get generated url/line/column for view-source requests

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox79 fixed)

RESOLVED FIXED
Firefox 79
Tracking Status
firefox79 --- fixed

People

(Reporter: loganfsmyth, Assigned: loganfsmyth)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

The toolbox exposes toolbox.viewSourceInDebugger and toolbox.viewSourceInStyleEditor functions for navigating from other panels to the debugger or style editor.
Right now thes are passed a mishmash of original or generated url/line/column triple, sometimes with an actor ID instead of a URL, depending on whether the sourcemap url service has had time to load the sourcemap, among other things.

The other piece of is is that these functions themselves resolve positions to original positions if possible, which means that at the moment the style editor actually has no way to know what actor the request came from, just the URL, so things can still go wrong if multiple files share the same URL. This is also an issue for the debugger, because a generated file may share a URL with an original file, or there may be multiple original files with the same URL so even though we resolved the location using a source actor ID, we loose specificity if the position is mapped.

https://bugzilla.mozilla.org/show_bug.cgi?id=1642371 is doing a bit of the infrastructure work on this that mostly helps for CSS between other panels and the toolbox, but from the toolbox to the style editor itself can still lose information.

This bug should fully qualify everything so that if the toolbox is given a front or an actor ID, we are guaranteed to open exactly the right file in the style editor/debugger.

After that I can start on https://bugzilla.mozilla.org/show_bug.cgi?id=1641121 properly and then we should be as close to exact navigation as we'll be able to get.

Blocks: dbg-sources
Assignee: nobody → loganfsmyth
Status: NEW → ASSIGNED
Pushed by loganfsmyth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ebafb2a3c1e5
Part 1: Update EventTooltipHelper to use actor ID for sourcemaps. r=jlast
https://hg.mozilla.org/integration/autoland/rev/f4137ceb9821
Part 2: Update the Frame component to always pass generated position to view source. r=jlast
https://hg.mozilla.org/integration/autoland/rev/5a023712b666
Part 3: Update SmartTrace to keep original and generated positions separate. r=jlast
https://hg.mozilla.org/integration/autoland/rev/b9f2a9fc40b6
Part 4: Centralize viewSourceInDebugger's source ID and sourcemap processing. r=jlast
https://hg.mozilla.org/integration/autoland/rev/ca592926cbb5
Part 5: Centralize viewSourceInStyleEditor's actor ID and sourcemap processing. r=jlast
https://hg.mozilla.org/integration/autoland/rev/e3e927efe0d0
Part 6: Remove unused source-map-url-service functions. r=jlast
https://hg.mozilla.org/integration/autoland/rev/f5f4f276e171
Part 7: Separate url-only file handling from url/line/column handling. r=jlast
No longer blocks: 1642034
Regressions: 1650658
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: