Minified sheets need a sourcemap in the style editor
Categories
(DevTools :: Style Editor, defect, P2)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: miker, Assigned: rcaliman)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [polish-backlog][difficulty=medium])
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
Updated•10 years ago
|
Comment 4•10 years ago
|
||
Updated•10 years ago
|
Updated•9 years ago
|
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Comment 8•9 years ago
|
||
Comment 9•9 years ago
|
||
Comment 11•9 years ago
|
||
Updated•8 years ago
|
Comment 12•7 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 13•5 years ago
|
||
Ensure source links for selectors in the Rules view and warning links in Web Console for minified CSS go to the right location in the Style Editor after applying automatic prettification.
This only works for linked stylesheets. Bug 1169770 needs to be fixed first before applying this logic to inline minified stylesheets.
This patch augments the prettifyCSS()
method to generate the mappings necessary to generate a sourcemap from the original to the prettified source. It uses these mappings to translate the cursor position when invoking the Style Editor be opened at a specific location.
The mappings from the minified to p the rettified source are used only until the stylesheet is changed in the Style Editor. Upon editing the source in the Style Editor, the associated mappings are cleared because it's likely they have been rendered invalid by the editing.
The updated stylesheet will already be prettified so it bypasses the prettifyCSS()
method, thus avoiding the need to re-generate mappings. New CSS warnings will be listed in the console which point to the right location in the edited stylesheet (the old warnings no longer point to the right place, but that's an acceptable side-effect). The Rules view in the Inspector also lists selectors with the new positions within the edited stylesheet.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
bugherder |
Description
•