Closed Bug 949678 Opened 11 years ago Closed 11 years ago

Rule view should show inline sheet links as "inline:<lineno>" instead of "/:<lineno>" when source maps are enabled

Categories

(DevTools :: Style Editor, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 29

People

(Reporter: harth, Assigned: harth)

References

Details

Attachments

(1 file, 2 obsolete files)

1) Flip the "devtools.styleeditor.source-maps-enabled" pref 2) Visit http://google.com 3) Open the Rule View 4) Links appear as "/:11" "/:8", etc. instead of "inline:11"
Assignee: nobody → fayearthur
Small fix for this. This fix also seemed to trigger a local failure due to an editor loading race condition, that's fixed as well.
Attachment #8347877 - Flags: review?(pbrosset)
Whoops, forgot to remove an event listener.
Attachment #8347877 - Attachment is obsolete: true
Attachment #8347877 - Flags: review?(pbrosset)
Attachment #8347881 - Flags: review?(pbrosset)
Attachment #8347881 - Attachment is obsolete: true
Attachment #8347881 - Flags: review?(pbrosset)
Attachment #8347884 - Flags: review?(pbrosset)
Comment on attachment 8347884 [details] [diff] [review] Fix inline inspector link and race condition that was causing test failure v3 Review of attachment 8347884 [details] [diff] [review]: ----------------------------------------------------------------- R+ for this, simple enough change. I just have a couple of questions. ::: browser/devtools/styleeditor/StyleEditorUI.jsm @@ +453,5 @@ > + if (selected == editor) { > + self.off("editor-added", onAdd); > + deferred.resolve(editor.summary); > + } > + }); I was at first surprised that you weren't using .once() and arrow function, but realized you need to skip events when they're not for the right editor. Can you confirm? ::: browser/devtools/styleinspector/style-inspector.js @@ +49,3 @@ > > // Chrome stylesheets are not listed in the style editor, so show > // these sheets in the view source window instead. Are chrome stylesheets still listed today? I've never come across them before. In any case, how could this even work before your fix? In cases where rule.href was null/undefined, viewSource(rule.href...) must have been failing, right?
Attachment #8347884 - Flags: review?(pbrosset) → review+
(In reply to Patrick Brosset [:pbrosset] from comment #4) > I was at first surprised that you weren't using .once() and arrow function, > but realized you need to skip events when they're not for the right editor. > Can you confirm? Correct, that's why. > > ::: browser/devtools/styleinspector/style-inspector.js > Are chrome stylesheets still listed today? I've never come across them > before. > In any case, how could this even work before your fix? In cases where > rule.href was null/undefined, viewSource(rule.href...) must have been > failing, right? I don't know, but the code was in here before, so I left it. I do know this code is triggered when your style sheet is an inline element style. I think I regressed something in bug 926014. It might now have worked since then /-:
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: