Open Bug 1167917 Opened 10 years ago Updated 4 months ago

The shared viewSourceInStyleEditor method doesn't fall back to the view-source window if style editor doesn't contain the sheet

Categories

(DevTools :: Style Editor, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: sjakthol, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The method expects one of the promises to reject in order to trigger the fallback. However if style editor can't find the sheet it has been asked to select, it will just resolve immediately in StyleEditorUI.switchToSelectedSheet [1] meaning the fallback won't be triggered. I haven't yet found a way to trigger this specific case (and don't have STR) but the code sure seems to behave incorrectly if this ever occurs. https://dxr.mozilla.org/mozilla-central/source/browser/devtools/styleeditor/StyleEditorUI.jsm#647
Good find! This should be handled by shared/source-utils ideally
Figured out a test case for this: 1. Extract the contents of the attached zip file. 2. Open page.html inside it. 3. Open Inspector. 4. Expand the <head> element. 5. Open the context menu over 'compiled.css' link attribute. 6. Click 'Show File in Style-Editor'. Expected results: compiled.css is opened to view-source window as it's not present in Style-Editor. Actual results: The style editor opens but shows the wrong file (compiled.css has been replaced with original.less).
Inspector bug triage (filter on CLIMBING SHOES).
Priority: -- → P2
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: