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

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

Issue 2385933002: DevTools: Make editingCommitted private (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 if (WebInspector.isBeingEdited(targetElement)) 318 if (WebInspector.isBeingEdited(targetElement))
319 return; 319 return;
320 320
321 var context = { box: box, styleProperty: styleProperty, computedStyle: c omputedStyle }; 321 var context = { box: box, styleProperty: styleProperty, computedStyle: c omputedStyle };
322 var boundKeyDown = this._handleKeyDown.bind(this, context, styleProperty ); 322 var boundKeyDown = this._handleKeyDown.bind(this, context, styleProperty );
323 context.keyDownHandler = boundKeyDown; 323 context.keyDownHandler = boundKeyDown;
324 targetElement.addEventListener("keydown", boundKeyDown, false); 324 targetElement.addEventListener("keydown", boundKeyDown, false);
325 325
326 this._isEditingMetrics = true; 326 this._isEditingMetrics = true;
327 327
328 var config = new WebInspector.InplaceEditor.Config(this.editingCommitted .bind(this), this.editingCancelled.bind(this), context); 328 var config = new WebInspector.InplaceEditor.Config(this._editingCommitte d.bind(this), this.editingCancelled.bind(this), context);
329 WebInspector.InplaceEditor.startEditing(targetElement, config); 329 WebInspector.InplaceEditor.startEditing(targetElement, config);
330 330
331 targetElement.getComponentSelection().setBaseAndExtent(targetElement, 0, targetElement, 1); 331 targetElement.getComponentSelection().setBaseAndExtent(targetElement, 0, targetElement, 1);
332 }, 332 },
333 333
334 _handleKeyDown: function(context, styleProperty, event) 334 _handleKeyDown: function(context, styleProperty, event)
335 { 335 {
336 var element = event.currentTarget; 336 var element = event.currentTarget;
337 337
338 /** 338 /**
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 this.originalPropertyData = this.previousPropertyDataCandidate; 453 this.originalPropertyData = this.previousPropertyDataCandidate;
454 454
455 if (typeof this._highlightMode !== "undefined") 455 if (typeof this._highlightMode !== "undefined")
456 this.node().highlight(this._highlightMode); 456 this.node().highlight(this._highlightMode);
457 457
458 if (commitEditor) 458 if (commitEditor)
459 this.update(); 459 this.update();
460 } 460 }
461 }, 461 },
462 462
463 editingCommitted: function(element, userInput, previousContent, context) 463 _editingCommitted: function(element, userInput, previousContent, context)
464 { 464 {
465 this.editingEnded(element, context); 465 this.editingEnded(element, context);
466 this._applyUserInput(element, userInput, previousContent, context, true) ; 466 this._applyUserInput(element, userInput, previousContent, context, true) ;
467 }, 467 },
468 468
469 __proto__: WebInspector.ElementsSidebarPane.prototype 469 __proto__: WebInspector.ElementsSidebarPane.prototype
470 } 470 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698