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

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

Issue 2697603006: DevTools: Fix an exception on adding watch expression. (Closed)
Patch Set: Created 3 years, 10 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) IBM Corp. 2009 All rights reserved. 2 * Copyright (C) IBM Corp. 2009 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 startEditing() { 253 startEditing() {
254 this._editing = true; 254 this._editing = true;
255 this._element.removeChild(this._objectPresentationElement); 255 this._element.removeChild(this._objectPresentationElement);
256 var newDiv = this._element.createChild('div'); 256 var newDiv = this._element.createChild('div');
257 newDiv.textContent = this._nameElement.textContent; 257 newDiv.textContent = this._nameElement.textContent;
258 this._textPrompt = new Components.ObjectPropertyPrompt(); 258 this._textPrompt = new Components.ObjectPropertyPrompt();
259 this._textPrompt.renderAsBlock(); 259 this._textPrompt.renderAsBlock();
260 var proxyElement = this._textPrompt.attachAndStartEditing(newDiv, this._fini shEditing.bind(this)); 260 var proxyElement = this._textPrompt.attachAndStartEditing(newDiv, this._fini shEditing.bind(this));
261 proxyElement.classList.add('watch-expression-text-prompt-proxy'); 261 proxyElement.classList.add('watch-expression-text-prompt-proxy');
262 proxyElement.addEventListener('keydown', this._promptKeyDown.bind(this), fal se); 262 proxyElement.addEventListener('keydown', this._promptKeyDown.bind(this), fal se);
263 this._element.getComponentSelection().setBaseAndExtent(newDiv, 0, newDiv, 1) ; 263 this._element.getComponentSelection().selectAllChildren(newDiv);
264 } 264 }
265 265
266 /** 266 /**
267 * @return {boolean} 267 * @return {boolean}
268 */ 268 */
269 isEditing() { 269 isEditing() {
270 return !!this._editing; 270 return !!this._editing;
271 } 271 }
272 272
273 /** 273 /**
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 InspectorFrontendHost.copyText(this._valueElement.textContent); 417 InspectorFrontendHost.copyText(this._valueElement.textContent);
418 } 418 }
419 }; 419 };
420 420
421 Sources.WatchExpression._watchObjectGroupId = 'watch-group'; 421 Sources.WatchExpression._watchObjectGroupId = 'watch-group';
422 422
423 /** @enum {symbol} */ 423 /** @enum {symbol} */
424 Sources.WatchExpression.Events = { 424 Sources.WatchExpression.Events = {
425 ExpressionUpdated: Symbol('ExpressionUpdated') 425 ExpressionUpdated: Symbol('ExpressionUpdated')
426 }; 426 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698