Closed
Bug 1225192
Opened 9 years ago
Closed 9 years ago
prettifying CSS preserves leading whitespace
Categories
(DevTools :: Style Editor, defect)
DevTools
Style Editor
Tracking
(firefox45 fixed)
RESOLVED
FIXED
Firefox 45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: tromey, Assigned: tromey)
References
Details
Attachments
(2 files, 4 obsolete files)
67.67 KB,
patch
|
tromey
:
review+
|
Details | Diff | Splinter Review |
3.42 KB,
patch
|
tromey
:
review+
|
Details | Diff | Splinter Review |
When prettifying CSS, the code in css-logic preserves leading whitespace. This can yield strange results like: div { } body { }
Assignee | ||
Comment 1•9 years ago
|
||
Cleaning up css-logic.js while I was in the area.
Assignee | ||
Comment 2•9 years ago
|
||
Remove leading whitespace before prettifying.
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8687991 [details] [diff] [review] fix eslint complaints about css-logic.js This fixes all the eslint nits I could fix. (It still complains about domUtils and CSS not being defined, but that's some other problem)
Attachment #8687991 -
Flags: review?(pbrosset)
Assignee | ||
Updated•9 years ago
|
Attachment #8687992 -
Flags: review?(pbrosset)
Comment 4•9 years ago
|
||
Comment on attachment 8687991 [details] [diff] [review] fix eslint complaints about css-logic.js Review of attachment 8687991 [details] [diff] [review]: ----------------------------------------------------------------- I'm going to be totally honest here, I did not review those 2000 lines in details :) The changes seemed mechanical enough that I quickly glanced over at them. What I did think about while reviewing though was that we probably are not using all of the code in this module anymore. Taking a quick look, I couldn't find a usage of findMatchedSelectors for example (which means that it could be removed along with compareTo and specificity). There might be some others too. Also, the actors in styles.js are the only one to actually instantiate the CssLogic class, but I have a feeling that this class isn't nearly as useful as it used to. For instance, we keep on calling .reset() on the instance, which, I think, defeats the original purpose which was to cache a bunch of properties. Anyway, I digress. So I filed bug 1225254.
Attachment #8687991 -
Flags: review?(pbrosset) → review+
Comment 5•9 years ago
|
||
Comment on attachment 8687992 [details] [diff] [review] remove leading whitespace before prettifying css Review of attachment 8687992 [details] [diff] [review]: ----------------------------------------------------------------- :) that was an easy one.
Attachment #8687992 -
Flags: review?(pbrosset) → review+
Assignee | ||
Comment 6•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d54cd280e9c5
Assignee | ||
Comment 7•9 years ago
|
||
Rebased and added r= to commit.
Attachment #8687991 -
Attachment is obsolete: true
Attachment #8687992 -
Attachment is obsolete: true
Assignee | ||
Comment 8•9 years ago
|
||
try pointed out that some test cases would have to spuriously change, because we're unconditionally rewriting the input. This update changes prettifyCSS to return the un-trimmed text for all "early" exits.
Assignee | ||
Updated•9 years ago
|
Attachment #8688614 -
Flags: review+
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8688615 [details] [diff] [review] remove leading whitespace before prettifying css Maybe it's silly to re-request review for this one.
Attachment #8688615 -
Flags: review?(pbrosset)
Assignee | ||
Comment 10•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=515f3d01ea01
Updated•9 years ago
|
Attachment #8688615 -
Flags: review?(pbrosset) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 11•9 years ago
|
||
this failed to apply: renamed 1225192 -> Bug-1225192---fix-eslint-complaints-about-css-logi.patch applying Bug-1225192---fix-eslint-complaints-about-css-logi.patch patching file devtools/shared/styleinspector/css-logic.js Hunk #2 FAILED at 75 1 out of 23 hunks FAILED -- saving rejects to file devtools/shared/styleinspector/css-logic.js.rej patch failed, unable to continue (try -v) patch failed, rejects left in working directory errors during apply, please fix and refresh Bug-1225192---fix-eslint-complaints-about-css-logi.patch
Flags: needinfo?(ttromey)
Keywords: checkin-needed
Assignee | ||
Comment 12•9 years ago
|
||
I've rebased this but I think it's better to wait for bug 1216234 at this point, as that one patches css-logic.js, which this patch massively changes.
Depends on: 1216234
Flags: needinfo?(ttromey)
Assignee | ||
Comment 13•9 years ago
|
||
Rebased.
Attachment #8688614 -
Attachment is obsolete: true
Attachment #8688615 -
Attachment is obsolete: true
Assignee | ||
Comment 14•9 years ago
|
||
Rebased.
Assignee | ||
Updated•9 years ago
|
Attachment #8694748 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Attachment #8694749 -
Flags: review+
Comment 15•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/5c706bfd11cc https://hg.mozilla.org/integration/fx-team/rev/872043399490
Comment 16•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5c706bfd11cc https://hg.mozilla.org/mozilla-central/rev/872043399490
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•