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

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

Issue 2238003002: DevTools: migrate sources panel sidebar to views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: followed up on the watch test. Created 4 years, 4 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) 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 */ 235 */
236 populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber) 236 populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber)
237 { 237 {
238 /** 238 /**
239 * @this {WebInspector.UISourceCodeFrame} 239 * @this {WebInspector.UISourceCodeFrame}
240 */ 240 */
241 function appendItems() 241 function appendItems()
242 { 242 {
243 contextMenu.appendApplicableItems(this._uiSourceCode); 243 contextMenu.appendApplicableItems(this._uiSourceCode);
244 contextMenu.appendApplicableItems(new WebInspector.UILocation(this._ uiSourceCode, lineNumber, columnNumber)); 244 contextMenu.appendApplicableItems(new WebInspector.UILocation(this._ uiSourceCode, lineNumber, columnNumber));
245 contextMenu.appendSeparator(); 245 var textSelection = this._textEditor.selection();
246 if (textSelection && !textSelection.isEmpty()) {
247 var rangeWithContent = new WebInspector.TextRangeWithContent(tex tSelection, this._textEditor.copyRange(textSelection));
dgozman 2016/08/15 21:31:03 Let's extract content via callback.
248 contextMenu.appendApplicableItems(rangeWithContent);
dgozman 2016/08/15 21:31:03 So, shortcuts don't work anymore?
249 }
246 } 250 }
247 251
248 return WebInspector.SourceFrame.prototype.populateTextAreaContextMenu.ca ll(this, contextMenu, lineNumber, columnNumber) 252 return WebInspector.SourceFrame.prototype.populateTextAreaContextMenu.ca ll(this, contextMenu, lineNumber, columnNumber)
249 .then(appendItems.bind(this)); 253 .then(appendItems.bind(this));
250 }, 254 },
251 255
252 /** 256 /**
253 * @param {!Array.<!WebInspector.Infobar|undefined>} infobars 257 * @param {!Array.<!WebInspector.Infobar|undefined>} infobars
254 */ 258 */
255 attachInfobars: function(infobars) 259 attachInfobars: function(infobars)
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 650
647 /** 651 /**
648 * @param {!WebInspector.UISourceCode.Message} a 652 * @param {!WebInspector.UISourceCode.Message} a
649 * @param {!WebInspector.UISourceCode.Message} b 653 * @param {!WebInspector.UISourceCode.Message} b
650 * @return {number} 654 * @return {number}
651 */ 655 */
652 WebInspector.UISourceCode.Message.messageLevelComparator = function(a, b) 656 WebInspector.UISourceCode.Message.messageLevelComparator = function(a, b)
653 { 657 {
654 return WebInspector.UISourceCode.Message._messageLevelPriority[a.level()] - WebInspector.UISourceCode.Message._messageLevelPriority[b.level()]; 658 return WebInspector.UISourceCode.Message._messageLevelPriority[a.level()] - WebInspector.UISourceCode.Message._messageLevelPriority[b.level()];
655 } 659 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698