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 | 61 |
aandrey
2014/06/17 20:58:37
extra line
apavlov
2014/06/18 07:55:13
Done.
| |
62 | 62 |
63 WebInspector.CodeMirrorUtils.prototype = { | 63 WebInspector.CodeMirrorUtils.prototype = { |
64 /** | 64 /** |
65 * @return {string} | 65 * @return {string} |
66 */ | 66 */ |
67 editorContent: function(editingContext) { | 67 editorContent: function(editingContext) { |
68 return editingContext.codeMirror.getValue(); | 68 return editingContext.codeMirror.getValue(); |
69 }, | 69 }, |
70 | 70 |
71 /** | 71 /** |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 { | 166 { |
167 WebInspector.VBox.call(this); | 167 WebInspector.VBox.call(this); |
168 this.element.classList.add("hidden"); | 168 this.element.classList.add("hidden"); |
169 this.registerRequiredCSS("cm/codemirror.css"); | 169 this.registerRequiredCSS("cm/codemirror.css"); |
170 this.registerRequiredCSS("cm/cmdevtools.css"); | 170 this.registerRequiredCSS("cm/cmdevtools.css"); |
171 } | 171 } |
172 | 172 |
173 WebInspector.CodeMirrorCSSLoadView.prototype = { | 173 WebInspector.CodeMirrorCSSLoadView.prototype = { |
174 __proto__: WebInspector.VBox.prototype | 174 __proto__: WebInspector.VBox.prototype |
175 } | 175 } |
OLD | NEW |