Bug 82708

Summary: Web Inspector: editing resets line-ending of the whole file
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch yurys: review+

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.