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

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

Issue 131743005: DevTools: fix execution line update on pretty-print (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | « Source/devtools/front_end/JavaScriptSourceFrame.js ('k') | no next file » | 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 }, 113 },
114 114
115 _didEditContent: function(error) 115 _didEditContent: function(error)
116 { 116 {
117 if (error) { 117 if (error) {
118 WebInspector.log(error, WebInspector.ConsoleMessage.MessageLevel.Err or, true); 118 WebInspector.log(error, WebInspector.ConsoleMessage.MessageLevel.Err or, true);
119 return; 119 return;
120 } 120 }
121 }, 121 },
122 122
123 beforeFormattedChange: function() { },
124
123 /** 125 /**
124 * @param {!WebInspector.Event} event 126 * @param {!WebInspector.Event} event
125 */ 127 */
126 _onFormattedChanged: function(event) 128 _onFormattedChanged: function(event)
127 { 129 {
130 this.beforeFormattedChange();
128 var content = /** @type {string} */ (event.data.content); 131 var content = /** @type {string} */ (event.data.content);
129 this._textEditor.setReadOnly(this._uiSourceCode.formatted()); 132 this._textEditor.setReadOnly(this._uiSourceCode.formatted());
130 var selection = this._textEditor.selection(); 133 var selection = this._textEditor.selection();
131 this._innerSetContent(content); 134 this._innerSetContent(content);
132 var start = null; 135 var start = null;
133 var end = null; 136 var end = null;
134 if (this._uiSourceCode.formatted()) { 137 if (this._uiSourceCode.formatted()) {
135 start = event.data.newFormatter.originalToFormatted(selection.startL ine, selection.startColumn); 138 start = event.data.newFormatter.originalToFormatted(selection.startL ine, selection.startColumn);
136 end = event.data.newFormatter.originalToFormatted(selection.endLine, selection.endColumn); 139 end = event.data.newFormatter.originalToFormatted(selection.endLine, selection.endColumn);
137 } else { 140 } else {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 contextMenu.appendSeparator(); 196 contextMenu.appendSeparator();
194 }, 197 },
195 198
196 dispose: function() 199 dispose: function()
197 { 200 {
198 this.detach(); 201 this.detach();
199 }, 202 },
200 203
201 __proto__: WebInspector.SourceFrame.prototype 204 __proto__: WebInspector.SourceFrame.prototype
202 } 205 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/JavaScriptSourceFrame.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698