OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 29 matching lines...) Expand all Loading... |
40 /** | 40 /** |
41 * @param {!WebInspector.TextRange} range | 41 * @param {!WebInspector.TextRange} range |
42 * @return {!{start: !CodeMirror.Pos, end: !CodeMirror.Pos}} | 42 * @return {!{start: !CodeMirror.Pos, end: !CodeMirror.Pos}} |
43 */ | 43 */ |
44 WebInspector.CodeMirrorUtils.toPos = function(range) | 44 WebInspector.CodeMirrorUtils.toPos = function(range) |
45 { | 45 { |
46 return { | 46 return { |
47 start: new CodeMirror.Pos(range.startLine, range.startColumn), | 47 start: new CodeMirror.Pos(range.startLine, range.startColumn), |
48 end: new CodeMirror.Pos(range.endLine, range.endColumn) | 48 end: new CodeMirror.Pos(range.endLine, range.endColumn) |
49 } | 49 } |
50 }, | 50 } |
51 | 51 |
52 /** | 52 /** |
53 * @param {!CodeMirror.Pos} start | 53 * @param {!CodeMirror.Pos} start |
54 * @param {!CodeMirror.Pos} end | 54 * @param {!CodeMirror.Pos} end |
55 * @return {!WebInspector.TextRange} | 55 * @return {!WebInspector.TextRange} |
56 */ | 56 */ |
57 WebInspector.CodeMirrorUtils.toRange = function(start, end) | 57 WebInspector.CodeMirrorUtils.toRange = function(start, end) |
58 { | 58 { |
59 return new WebInspector.TextRange(start.line, start.ch, end.line, end.ch); | 59 return new WebInspector.TextRange(start.line, start.ch, end.line, end.ch); |
60 }, | 60 } |
61 | |
62 | 61 |
63 WebInspector.CodeMirrorUtils.prototype = { | 62 WebInspector.CodeMirrorUtils.prototype = { |
64 /** | 63 /** |
65 * @return {string} | 64 * @return {string} |
66 */ | 65 */ |
67 editorContent: function(editingContext) { | 66 editorContent: function(editingContext) { |
68 return editingContext.codeMirror.getValue(); | 67 return editingContext.codeMirror.getValue(); |
69 }, | 68 }, |
70 | 69 |
71 /** | 70 /** |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 { | 165 { |
167 WebInspector.VBox.call(this); | 166 WebInspector.VBox.call(this); |
168 this.element.classList.add("hidden"); | 167 this.element.classList.add("hidden"); |
169 this.registerRequiredCSS("cm/codemirror.css"); | 168 this.registerRequiredCSS("cm/codemirror.css"); |
170 this.registerRequiredCSS("cm/cmdevtools.css"); | 169 this.registerRequiredCSS("cm/cmdevtools.css"); |
171 } | 170 } |
172 | 171 |
173 WebInspector.CodeMirrorCSSLoadView.prototype = { | 172 WebInspector.CodeMirrorCSSLoadView.prototype = { |
174 __proto__: WebInspector.VBox.prototype | 173 __proto__: WebInspector.VBox.prototype |
175 } | 174 } |
OLD | NEW |