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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Issue 2269183003: DevTools: Merge CodeMirrorTextEditor's copyRange into text (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 return true; 1287 return true;
1288 case "debugger.run-snippet": 1288 case "debugger.run-snippet":
1289 panel._runSnippet(); 1289 panel._runSnippet();
1290 return true; 1290 return true;
1291 case "debugger.toggle-breakpoints-active": 1291 case "debugger.toggle-breakpoints-active":
1292 panel._toggleBreakpointsActive(); 1292 panel._toggleBreakpointsActive();
1293 return true; 1293 return true;
1294 case "debugger.evaluate-selection": 1294 case "debugger.evaluate-selection":
1295 var frame = WebInspector.context.flavor(WebInspector.UISourceCodeFra me); 1295 var frame = WebInspector.context.flavor(WebInspector.UISourceCodeFra me);
1296 if (frame) { 1296 if (frame) {
1297 var text = frame.textEditor.copyRange(frame.textEditor.selection ()); 1297 var text = frame.textEditor.text(frame.textEditor.selection());
1298 var executionContext = WebInspector.context.flavor(WebInspector. ExecutionContext); 1298 var executionContext = WebInspector.context.flavor(WebInspector. ExecutionContext);
1299 if (executionContext) 1299 if (executionContext)
1300 WebInspector.ConsoleModel.evaluateCommandInConsole(execution Context, text); 1300 WebInspector.ConsoleModel.evaluateCommandInConsole(execution Context, text);
1301 } 1301 }
1302 return true; 1302 return true;
1303 } 1303 }
1304 return false; 1304 return false;
1305 } 1305 }
1306 } 1306 }
1307 1307
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 __proto__: WebInspector.VBox.prototype 1367 __proto__: WebInspector.VBox.prototype
1368 } 1368 }
1369 1369
1370 /** 1370 /**
1371 * @return {boolean} 1371 * @return {boolean}
1372 */ 1372 */
1373 WebInspector.SourcesPanel.WrapperView.isShowing = function() 1373 WebInspector.SourcesPanel.WrapperView.isShowing = function()
1374 { 1374 {
1375 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing(); 1375 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing();
1376 } 1376 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698