Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Side by Side Diff: Source/devtools/front_end/CodeMirrorTextEditor.js

Issue 23496039: DevTools: [CodeMirror] roll CodeMirror to @e0b0e32ed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/cm/codemirror.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 }; 128 };
129 129
130 WebInspector.settings.textEditorIndent.addChangeListener(this._updateEditorI ndentation, this); 130 WebInspector.settings.textEditorIndent.addChangeListener(this._updateEditorI ndentation, this);
131 this._updateEditorIndentation(); 131 this._updateEditorIndentation();
132 WebInspector.settings.showWhitespacesInEditor.addChangeListener(this._update CodeMirrorMode, this); 132 WebInspector.settings.showWhitespacesInEditor.addChangeListener(this._update CodeMirrorMode, this);
133 133
134 this._codeMirror.setOption("keyMap", WebInspector.isMac() ? "devtools-mac" : "devtools-pc"); 134 this._codeMirror.setOption("keyMap", WebInspector.isMac() ? "devtools-mac" : "devtools-pc");
135 this._codeMirror.setOption("flattenSpans", false); 135 this._codeMirror.setOption("flattenSpans", false);
136 this._codeMirror.setOption("maxHighlightLength", 1000); 136 this._codeMirror.setOption("maxHighlightLength", 1000);
137 this._codeMirror.setOption("mode", null); 137 this._codeMirror.setOption("mode", null);
138 this._codeMirror.setOption("crudeMeasuringFrom", 1000);
138 139
139 this._shouldClearHistory = true; 140 this._shouldClearHistory = true;
140 this._lineSeparator = "\n"; 141 this._lineSeparator = "\n";
141 142
142 this._tokenHighlighter = new WebInspector.CodeMirrorTextEditor.TokenHighligh ter(this._codeMirror); 143 this._tokenHighlighter = new WebInspector.CodeMirrorTextEditor.TokenHighligh ter(this._codeMirror);
143 this._blockIndentController = new WebInspector.CodeMirrorTextEditor.BlockInd entController(this._codeMirror); 144 this._blockIndentController = new WebInspector.CodeMirrorTextEditor.BlockInd entController(this._codeMirror);
144 this._fixWordMovement = new WebInspector.CodeMirrorTextEditor.FixWordMovemen t(this._codeMirror); 145 this._fixWordMovement = new WebInspector.CodeMirrorTextEditor.FixWordMovemen t(this._codeMirror);
145 this._autocompleteController = new WebInspector.CodeMirrorTextEditor.Autocom pleteController(this, this._codeMirror); 146 this._autocompleteController = new WebInspector.CodeMirrorTextEditor.Autocom pleteController(this, this._codeMirror);
146 147
147 this._codeMirror.on("change", this._change.bind(this)); 148 this._codeMirror.on("change", this._change.bind(this));
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 * @param {number} line 1552 * @param {number} line
1552 * @param {number} column 1553 * @param {number} column
1553 * @return {AnchorBox} 1554 * @return {AnchorBox}
1554 */ 1555 */
1555 _anchorBoxForPosition: function(line, column) 1556 _anchorBoxForPosition: function(line, column)
1556 { 1557 {
1557 var metrics = this._textEditor.cursorPositionToCoordinates(line, column) ; 1558 var metrics = this._textEditor.cursorPositionToCoordinates(line, column) ;
1558 return metrics ? new AnchorBox(metrics.x, metrics.y, 0, metrics.height) : null; 1559 return metrics ? new AnchorBox(metrics.x, metrics.y, 0, metrics.height) : null;
1559 }, 1560 },
1560 } 1561 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/cm/codemirror.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698