Open Bug 1327774 Opened 7 years ago Updated 2 years ago

Style editor fails to prettify minified stylesheets if it encounters line breaks %0A \n

Categories

(DevTools :: Style Editor, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: arni2033, Unassigned)

References

Details

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url [1]
2. Open devtools -> style editor

STR_2:
1. Open url [2]
2. Open devtools -> style editor

AR:  Style isn't prettified at all. Same for huge styles on the web pages
ER:  Style should be prettified

> [1] data:text/html,<style>html{top:0px}%0Abody{top:1px}</style>
> [2] data:text/html,<link rel="stylesheet" href="data:text/css,html{top:0px}%250Abody{top:1px}">
Component: Untriaged → Developer Tools: Style Editor
No longer blocks: 1277113
In this case, the original text is being returned due to this heuristic:
https://dxr.mozilla.org/mozilla-central/source/devtools/shared/inspector/css-logic.js#312

It's not completely clear to me that removing these lines is ok.  Since it's just
a heuristic, it might run into other cases where it was correct to bail out.

The best fix here is described in bug 724505; where I haven't made progress for a long time...
Based on Tom's comment I'm marking this as blocked on bug 724505 and prioritize to P2, just like 724505.
Depends on: 724505
Priority: -- → P2
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.