Patch to follow.
Created attachment 151066 [details] Patch
Comment on attachment 151066 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151066&action=review > Source/WebCore/inspector/front-end/TextEditorModel.js:120 > + if (this.startLine > other.startLine) A common approach to such comparators is along the lines of: if (this.startLine === other.startLine) return this.startColumn - other.startColumn; return this.startLine - other.startLine; (oftentimes it is not normalized to sgn(result), since only the relation to 0 is important) I understand that you are fighting for the verbosity in this case, though.
Comment on attachment 151066 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151066&action=review > Source/WebCore/inspector/front-end/TextEditor.js:398 > + lastSelection: function(textRange) Please remove parameter and jsdoc. > Source/WebCore/inspector/front-end/TextEditor.js:427 > + return; We might want to set (non empty) selection for other external actions (e.g. for Search across all files). Consider moving the code responsible for turning selection into a cursor position to the blur event handler instead.
> Please remove parameter and jsdoc. Removed from the code, jsdoc has it for a reason. > > > Source/WebCore/inspector/front-end/TextEditor.js:427 > > + return; > > We might want to set (non empty) selection for other external actions (e.g. for Search across all files). > Consider moving the code responsible for turning selection into a cursor position to the blur event handler instead. I am not sure I follow.
Committed r121957: <http://trac.webkit.org/changeset/121957>