RESOLVED FIXED Bug 82708
Web Inspector: editing resets line-ending of the whole file
https://bugs.webkit.org/show_bug.cgi?id=82708
Summary Web Inspector: editing resets line-ending of the whole file
Pavel Feldman
Reported 2012-03-30 02:44:27 PDT
This change splits setText into setText (for initialization) and editRange (for editing). Distinguishing between the two allowed properly detecting the preferred line endings. Drive-by: annotated the TextEditorModel classes.
Attachments
Patch (27.54 KB, patch)
2012-03-30 03:04 PDT, Pavel Feldman
yurys: review+
Pavel Feldman
Comment 1 2012-03-30 03:04:16 PDT
Pavel Feldman
Comment 2 2012-03-30 04:36:32 PDT
Alexander Pavlov (apavlov)
Comment 3 2012-03-30 04:37:18 PDT
View in context: https://bugs.webkit.org/attachment.cgi?id=134761&action=review > Source/WebCore/inspector/front-end/TextEditorModel.js:93 > +WebInspector.TextEditorCommand = function(newRange, originalText) I would call it "TextEditCommand" as the editor may have a few different commands. > Source/WebCore/inspector/front-end/TextEditorModel.js:180 > + this.dispatchEventToListeners(WebInspector.TextEditorModel.Events.TextChanged, { oldRange: range, newRange: newRange}); a space between "newRange" and "}" > LayoutTests/ChangeLog:3 > + Web Inspector: editing resets line-ending of the whole file A test for a bare "\r" would work fine.
Note You need to log in before you can comment on or make changes to this bug.