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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ClassesPaneWidget.js

Issue 2450663004: DevTools: do not allow using 'this' before call into super. (Closed)
Patch Set: rebaselined Created 4 years, 1 month 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 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.Widget} 7 * @extends {WebInspector.Widget}
8 */ 8 */
9 WebInspector.ClassesPaneWidget = function() 9 WebInspector.ClassesPaneWidget = function()
10 { 10 {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 return this._button; 217 return this._button;
218 } 218 }
219 }; 219 };
220 220
221 /** 221 /**
222 * @constructor 222 * @constructor
223 * @extends {WebInspector.TextPrompt} 223 * @extends {WebInspector.TextPrompt}
224 */ 224 */
225 WebInspector.ClassesPaneWidget.ClassNamePrompt = function() 225 WebInspector.ClassesPaneWidget.ClassNamePrompt = function()
226 { 226 {
227 WebInspector.TextPrompt.call(this, this._buildClassNameCompletions.bind(this ), " "); 227 WebInspector.TextPrompt.call(this);
228 this.initialize(this._buildClassNameCompletions.bind(this), " ");
228 this.setSuggestBoxEnabled(true); 229 this.setSuggestBoxEnabled(true);
229 this.disableDefaultSuggestionForEmptyInput(); 230 this.disableDefaultSuggestionForEmptyInput();
230 this._selectedFrameId = ""; 231 this._selectedFrameId = "";
231 this._classNamesPromise = null; 232 this._classNamesPromise = null;
232 }; 233 };
233 234
234 WebInspector.ClassesPaneWidget.ClassNamePrompt.prototype = { 235 WebInspector.ClassesPaneWidget.ClassNamePrompt.prototype = {
235 /** 236 /**
236 * @param {!WebInspector.DOMNode} selectedNode 237 * @param {!WebInspector.DOMNode} selectedNode
237 * @return {!Promise.<!Array.<string>>} 238 * @return {!Promise.<!Array.<string>>}
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 this._classNamesPromise.then(completions => { 281 this._classNamesPromise.then(completions => {
281 if (prefix[0] === ".") 282 if (prefix[0] === ".")
282 completions = completions.map(value => "." + value); 283 completions = completions.map(value => "." + value);
283 var results = completions.filter(value => value.startsWith(prefix)); 284 var results = completions.filter(value => value.startsWith(prefix));
284 completionsReadyCallback(results, 0); 285 completionsReadyCallback(results, 0);
285 }); 286 });
286 }, 287 },
287 288
288 __proto__: WebInspector.TextPrompt.prototype 289 __proto__: WebInspector.TextPrompt.prototype
289 }; 290 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698