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

Side by Side Diff: Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 1356363002: [DevTools] Remove relativeToElement from Dialog. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (textSelection && !textSelection.isEmpty()) { 287 if (textSelection && !textSelection.isEmpty()) {
288 var selection = this.textEditor.copyRange(textSelection); 288 var selection = this.textEditor.copyRange(textSelection);
289 var addToWatchLabel = WebInspector.UIString.capitalize("Add to ^watc h"); 289 var addToWatchLabel = WebInspector.UIString.capitalize("Add to ^watc h");
290 contextMenu.appendItem(addToWatchLabel, this._innerAddToWatch.bind(t his, selection)); 290 contextMenu.appendItem(addToWatchLabel, this._innerAddToWatch.bind(t his, selection));
291 var evaluateLabel = WebInspector.UIString.capitalize("Evaluate in ^c onsole"); 291 var evaluateLabel = WebInspector.UIString.capitalize("Evaluate in ^c onsole");
292 contextMenu.appendItem(evaluateLabel, this._evaluateInConsole.bind(t his, selection)); 292 contextMenu.appendItem(evaluateLabel, this._evaluateInConsole.bind(t his, selection));
293 contextMenu.appendSeparator(); 293 contextMenu.appendSeparator();
294 } 294 }
295 295
296 /** 296 /**
297 * @this {WebInspector.JavaScriptSourceFrame}
298 * @param {!WebInspector.ResourceScriptFile} scriptFile 297 * @param {!WebInspector.ResourceScriptFile} scriptFile
299 */ 298 */
300 function addSourceMapURL(scriptFile) 299 function addSourceMapURL(scriptFile)
301 { 300 {
302 WebInspector.AddSourceMapURLDialog.show(this.element, addSourceMapUR LDialogCallback.bind(null, scriptFile)); 301 WebInspector.AddSourceMapURLDialog.show(addSourceMapURLDialogCallbac k.bind(null, scriptFile));
303 } 302 }
304 303
305 /** 304 /**
306 * @param {!WebInspector.ResourceScriptFile} scriptFile 305 * @param {!WebInspector.ResourceScriptFile} scriptFile
307 * @param {string} url 306 * @param {string} url
308 */ 307 */
309 function addSourceMapURLDialogCallback(scriptFile, url) 308 function addSourceMapURLDialogCallback(scriptFile, url)
310 { 309 {
311 if (!url) 310 if (!url)
312 return; 311 return;
313 scriptFile.addSourceMapURL(url); 312 scriptFile.addSourceMapURL(url);
314 } 313 }
315 314
316 WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu.cal l(this, contextMenu, lineNumber, columnNumber); 315 WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu.cal l(this, contextMenu, lineNumber, columnNumber);
317 316
318 if (this._uiSourceCode.project().type() === WebInspector.projectTypes.Ne twork && WebInspector.moduleSetting("jsSourceMapsEnabled").get()) { 317 if (this._uiSourceCode.project().type() === WebInspector.projectTypes.Ne twork && WebInspector.moduleSetting("jsSourceMapsEnabled").get()) {
319 if (this._scriptFileForTarget.size) { 318 if (this._scriptFileForTarget.size) {
320 var scriptFile = this._scriptFileForTarget.valuesArray()[0]; 319 var scriptFile = this._scriptFileForTarget.valuesArray()[0];
321 var addSourceMapURLLabel = WebInspector.UIString.capitalize("Add ^source ^map\u2026"); 320 var addSourceMapURLLabel = WebInspector.UIString.capitalize("Add ^source ^map\u2026");
322 contextMenu.appendItem(addSourceMapURLLabel, addSourceMapURL.bin d(this, scriptFile)); 321 contextMenu.appendItem(addSourceMapURLLabel, addSourceMapURL.bin d(null, scriptFile));
323 contextMenu.appendSeparator(); 322 contextMenu.appendSeparator();
324 } 323 }
325 } 324 }
326 }, 325 },
327 326
328 _workingCopyChanged: function(event) 327 _workingCopyChanged: function(event)
329 { 328 {
330 if (this._supportsEnabledBreakpointsWhileEditing() || this._scriptFileFo rTarget.size) 329 if (this._supportsEnabledBreakpointsWhileEditing() || this._scriptFileFo rTarget.size)
331 return; 330 return;
332 331
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyChanged, this._workingCopyChanged, this); 1125 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyChanged, this._workingCopyChanged, this);
1127 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyCommitted, this._workingCopyCommitted, this); 1126 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyCommitted, this._workingCopyCommitted, this);
1128 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. TitleChanged, this._showBlackboxInfobarIfNeeded, this); 1127 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. TitleChanged, this._showBlackboxInfobarIfNeeded, this);
1129 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this); 1128 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this);
1130 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this); 1129 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this);
1131 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); 1130 WebInspector.UISourceCodeFrame.prototype.dispose.call(this);
1132 }, 1131 },
1133 1132
1134 __proto__: WebInspector.UISourceCodeFrame.prototype 1133 __proto__: WebInspector.UISourceCodeFrame.prototype
1135 } 1134 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sources/FilteredItemSelectionDialog.js ('k') | Source/devtools/front_end/sources/SourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698