Style editor doesn't honour existing line ending type on newly added lines

RESOLVED FIXED

Status

()

Firefox
Developer Tools: Source Editor
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: emorley, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sourceeditor])

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1

1) Visit a site that has a stylesheet with unix file endings. eg https://tbpl.mozilla.org/
2) Open the Style Editor
3) Add a newline
4) Use save
5) Open resultant .css file in text editor of choice + show file endings.

Expected:
Added newline is LF, matching the rest of the file.

Actual:
Added newline is a CRLF.

Updated

6 years ago
Whiteboard: [sourceeditor][orion]
There's an upstream Orion bug about this issue already reported:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349096

I will ping the Orion team about this problem to see if we can get a fix soon. Thanks for your report Ed!
OS: Windows 7 → All
Hardware: x86 → All
(Reporter)

Comment 2

6 years ago
Thank you :-)
Problem identified. Will look into implementing a fix, in time for bug 759351.
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
Depends on: 759351
Whiteboard: [sourceeditor][orion] → [sourceeditor]
Moving to Source Editor component.

Filter on CHELICERAE.
Component: Developer Tools: Style Editor → Developer Tools: Source Editor
Created attachment 645442 [details] [diff] [review]
proposed patch

Easy fix. We need to use a nice feature of the Orion TextModel: autodetect line endings.
Attachment #645442 - Flags: review?(rcampbell)

Updated

6 years ago
Depends on: 746218
No longer depends on: 759351

Updated

6 years ago
Blocks: 760825
Comment on attachment 645442 [details] [diff] [review]
proposed patch

alrighty.
Attachment #645442 - Flags: review?(rcampbell) → review+
I think bug 919978 fixed this. At least od -c file.css doesn't show anything weird:

0041760    t   r   e   e   -   s   t   a   t   u   s       .   a   p   p
0042000    r   o   v   a   l   R   e   q   u   i   r   e   d       {  \n
0042020            c   o   l   o   r   :       o   r   a   n   g   e   ;
0042040   \n   }  \n  \n   a   s   d  \n                                
0042050
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Assignee: mihai.sucan → nobody
You need to log in before you can comment on or make changes to this bug.