Changeset 125201 in webkit
- Timestamp:
- Aug 9, 2012 2:00:46 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r125196 r125201 1 2012-08-09 Jan Keromnes <janx@linux.com> 2 3 Web Inspector: replace the Web Inspector editor with CodeMirror 4 https://bugs.webkit.org/show_bug.cgi?id=92769 5 6 Reviewed by Pavel Feldman. 7 8 Integrating CodeMirror as a devtools experiment. Currently supporting 9 basic editing, search/replacing, and saving. Missing proper breakpoints 10 wiring, debugging, message bubbles, popovers and context menus. WIP. 11 12 * WebCore.gypi: 13 * WebCore.vcproj/WebCore.vcproj: 14 * inspector/compile-front-end.py: 15 * inspector/front-end/CodeMirrorTextEditor.js: Added. 16 (WebInspector.CodeMirrorTextEditor.this._codeMirror.CodeMirror): 17 (WebInspector.CodeMirrorTextEditor): 18 (WebInspector.CodeMirrorTextEditor.prototype.set mimeType): 19 (WebInspector.CodeMirrorTextEditor.prototype.setReadOnly): 20 (WebInspector.CodeMirrorTextEditor.prototype.readOnly): 21 (WebInspector.CodeMirrorTextEditor.prototype.defaultFocusedElement): 22 (WebInspector.CodeMirrorTextEditor.prototype.focus): 23 (WebInspector.CodeMirrorTextEditor.prototype.revealLine): 24 (WebInspector.CodeMirrorTextEditor.prototype.addDecoration): 25 (WebInspector.CodeMirrorTextEditor.prototype.removeDecoration): 26 (WebInspector.CodeMirrorTextEditor.prototype.markAndRevealRange): 27 (WebInspector.CodeMirrorTextEditor.prototype.highlightLine): 28 (WebInspector.CodeMirrorTextEditor.prototype.clearLineHighlight): 29 (WebInspector.CodeMirrorTextEditor.prototype.freeCachedElements): 30 (WebInspector.CodeMirrorTextEditor.prototype.elementsToRestoreScrollPositionsFor): 31 (WebInspector.CodeMirrorTextEditor.prototype.inheritScrollPositions): 32 (WebInspector.CodeMirrorTextEditor.prototype.beginUpdates): 33 (WebInspector.CodeMirrorTextEditor.prototype.endUpdates): 34 (WebInspector.CodeMirrorTextEditor.prototype.onResize): 35 (WebInspector.CodeMirrorTextEditor.prototype.editRange): 36 (WebInspector.CodeMirrorTextEditor.prototype._onChange): 37 (WebInspector.CodeMirrorTextEditor.prototype._commitEditing): 38 (WebInspector.CodeMirrorTextEditor.prototype.scrollToLine): 39 (WebInspector.CodeMirrorTextEditor.prototype.selection): 40 (WebInspector.CodeMirrorTextEditor.prototype.lastSelection): 41 (WebInspector.CodeMirrorTextEditor.prototype.setSelection): 42 (WebInspector.CodeMirrorTextEditor.prototype.setText): 43 (WebInspector.CodeMirrorTextEditor.prototype.text): 44 (WebInspector.CodeMirrorTextEditor.prototype.range): 45 (WebInspector.CodeMirrorTextEditor.prototype.line): 46 (WebInspector.CodeMirrorTextEditor.prototype.get linesCount): 47 (WebInspector.CodeMirrorTextEditor.prototype.setAttribute): 48 (WebInspector.CodeMirrorTextEditor.prototype.getAttribute): 49 (WebInspector.CodeMirrorTextEditor.prototype.removeAttribute): 50 (WebInspector.CodeMirrorTextEditor.prototype.wasShown): 51 (WebInspector.CodeMirrorTextEditor.prototype.willHide): 52 (WebInspector.CodeMirrorTextEditor.prototype._textChanged): 53 (WebInspector.CodeMirrorTextEditor.prototype._toPos): 54 (WebInspector.CodeMirrorTextEditor.prototype._toRange): 55 * inspector/front-end/Settings.js: 56 (WebInspector.ExperimentsSettings): 57 * inspector/front-end/SourceFrame.js: 58 (WebInspector.SourceFrame): 59 * inspector/front-end/WebKit.qrc: 60 * inspector/front-end/cmdevtools.css: Added. 61 * inspector/front-end/inspector.html: 62 1 63 2012-08-09 Dana Jansens <danakj@chromium.org> 2 64 -
trunk/Source/WebCore/WebCore.gypi
r125184 r125201 6254 6254 'inspector/front-end/CallStackSidebarPane.js', 6255 6255 'inspector/front-end/Checkbox.js', 6256 'inspector/front-end/CodeMirrorTextEditor.js', 6256 6257 'inspector/front-end/Color.js', 6257 6258 'inspector/front-end/CompilerScriptMapping.js', … … 6444 6445 'inspector/front-end/auditsPanel.css', 6445 6446 'inspector/front-end/cm/codemirror.css', 6447 'inspector/front-end/cmdevtools.css', 6446 6448 'inspector/front-end/dataGrid.css', 6447 6449 'inspector/front-end/elementsPanel.css', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r125184 r125201 75419 75419 </File> 75420 75420 <File 75421 RelativePath="..\inspector\front-end\CodeMirrorTextEditor.js" 75422 > 75423 </File> 75424 <File 75421 75425 RelativePath="..\inspector\front-end\Color.js" 75422 75426 > … … 75508 75512 <File 75509 75513 RelativePath="..\inspector\front-end\cm\xml.js" 75514 > 75515 </File> 75516 <File 75517 RelativePath="..\inspector\front-end\cmdevtools.css" 75510 75518 > 75511 75519 </File> -
trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js
r124638 r125201 183 183 }, 184 184 185 freeCachedElements: function()186 { 187 this._mainPanel. freeCachedElements();188 this._gutterPanel. freeCachedElements();185 _freeCachedElements: function() 186 { 187 this._mainPanel._freeCachedElements(); 188 this._gutterPanel._freeCachedElements(); 189 189 }, 190 190 … … 522 522 if (!this.readOnly()) 523 523 WebInspector.markBeingEdited(this.element, false); 524 this._freeCachedElements(); 524 525 } 525 526 } … … 878 879 this.element.addEventListener("scroll", this._scroll.bind(this), false); 879 880 880 this. freeCachedElements();881 this._freeCachedElements(); 881 882 this._buildChunks(); 882 883 this._decorations = {}; … … 884 885 885 886 WebInspector.TextEditorGutterPanel.prototype = { 886 freeCachedElements: function()887 _freeCachedElements: function() 887 888 { 888 889 this._cachedRows = []; … … 1202 1203 this._container.addEventListener("DOMSubtreeModified", this._handleDOMUpdatesCallback, false); 1203 1204 1204 this. freeCachedElements();1205 this._freeCachedElements(); 1205 1206 this._buildChunks(); 1206 1207 } … … 1377 1378 }, 1378 1379 1379 freeCachedElements: function()1380 _freeCachedElements: function() 1380 1381 { 1381 1382 this._cachedSpans = []; -
trunk/Source/WebCore/inspector/front-end/Settings.js
r124765 r125201 194 194 this.deviceOrientationOverride = this._createExperiment("deviceOrientationOverride", "Override Device Orientation"); 195 195 this.sass = this._createExperiment("sass", "Support for SASS"); 196 this.codemirror = this._createExperiment("codemirror", "Use CodeMirror editor"); 196 197 197 198 this._cleanUpSetting(); -
trunk/Source/WebCore/inspector/front-end/SourceFrame.js
r124638 r125201 43 43 44 44 var textEditorDelegate = new WebInspector.TextEditorDelegateForSourceFrame(this); 45 this._textEditor = new WebInspector.DefaultTextEditor(this._url, textEditorDelegate); 45 46 if (WebInspector.experimentsSettings.codemirror.isEnabled()) 47 this._textEditor = new WebInspector.CodeMirrorTextEditor(this._url, textEditorDelegate); 48 else 49 this._textEditor = new WebInspector.DefaultTextEditor(this._url, textEditorDelegate); 46 50 47 51 this._currentSearchResultIndex = -1; … … 95 99 { 96 100 WebInspector.View.prototype.willHide.call(this); 97 if (this.loaded)98 this._textEditor.freeCachedElements();99 101 100 102 this._clearLineHighlight(); -
trunk/Source/WebCore/inspector/front-end/TextEditor.js
r124638 r125201 86 86 clearLineHighlight: function() { }, 87 87 88 freeCachedElements: function() { },89 90 88 /** 91 89 * @return {Array.<Element>} -
trunk/Source/WebCore/inspector/front-end/WebKit.qrc
r125184 r125201 16 16 <file>CallStackSidebarPane.js</file> 17 17 <file>Checkbox.js</file> 18 <file>CodeMirrorTextEditor.js</file> 18 19 <file>Color.js</file> 19 20 <file>CompilerScriptMapping.js</file> … … 205 206 <file>auditsPanel.css</file> 206 207 <file>dataGrid.css</file> 208 <file>cmdevtools.css</file> 207 209 <file>dialog.css</file> 208 210 <file>elementsPanel.css</file> -
trunk/Source/WebCore/inspector/front-end/externs.js
r123223 r125201 237 237 difflib.SequenceMatcher = function(baseText, newText) { } 238 238 difflib.SequenceMatcher.prototype.get_opcodes = function() { return []; } 239 240 /** @constructor */ 241 WebInspector.CodeMirrorTextEditor = function(url, delegate) { } -
trunk/Source/WebCore/inspector/front-end/inspector.html
r124878 r125201 121 121 <script type="text/javascript" src="TextEditor.js"></script> 122 122 <script type="text/javascript" src="DefaultTextEditor.js"></script> 123 <script type="text/javascript" src="CodeMirrorTextEditor.js"></script> 123 124 <script type="text/javascript" src="SourceFrame.js"></script> 124 125 <script type="text/javascript" src="UISourceCodeFrame.js"></script>
Note: See TracChangeset
for help on using the changeset viewer.