Closed Bug 1006231 Opened 6 years ago Closed 6 years ago

Style Editor should load original source's content from the map's `sourcesContent` if it exists


(DevTools :: Style Editor, defect)

Not set


(firefox31 fixed, firefox32 fixed)

Firefox 32
Tracking Status
firefox31 --- fixed
firefox32 --- fixed


(Reporter: harth, Assigned: harth)



(1 file, 1 obsolete file)

Right now the Style Editor fetches the content of the original source from its resolved location. We should be getting the content from the `sourcesContent` property of the source map, if it exists.

The debugger does this already. We should really share some of this code at some point.
Small fix. Also refactored the source maps test and added a test for a self contained sourcemap in a data url.

Fixed a "TypeError: this.rawSheet.ownerNode.ownerDocument.location is null" that was cropping up when I ran the test.
Assignee: nobody → fayearthur
Attachment #8419192 - Flags: review?(nfitzgerald)
Comment on attachment 8419192 [details] [diff] [review]
Look at 'sourcesContent' before fetching, add test for self contained sourcemap

Review of attachment 8419192 [details] [diff] [review]:

Looks great!
Attachment #8419192 - Flags: review?(nfitzgerald) → review+
Patch from before, but with a test change to fix an intermittent it introduced. Try:
Attachment #8419192 - Attachment is obsolete: true
Keywords: checkin-needed
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 32
Heather, we should probably uplift this, yeah?
Flags: needinfo?(fayearthur)
(In reply to Nick Fitzgerald [:fitzgen] from comment #6)
> Heather, we should probably uplift this, yeah?

Yeah, def, let's wait a bit for it to bake.
Flags: needinfo?(fayearthur)
Comment on attachment 8419741 [details] [diff] [review]
To check in, patch with orange fix

[Approval Request Comment]
Bug caused by (feature/regressing bug #):
bug 926014

User impact if declined: 

A significant number of people using source maps in the developer tools will see empty files in the Style Editor - making it useless. One user reached out over twitter to report this bug.

Testing completed (on m-c, etc.):

This has been on mozilla-central for several days, has tests.

Risk to taking this patch (and alternatives if risky):

Nothing known.

String or IDL/UUID changes made by this patch:

Attachment #8419741 - Flags: approval-mozilla-aurora?
Attachment #8419741 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Heather, should I mark this as being in-testsuite? You mentioned it has tests but didn't flag it.
Flags: needinfo?(fayearthur)
It does have tests, yes.
Flags: needinfo?(fayearthur)
Flags: in-testsuite? → in-testsuite+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.