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

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

Issue 1308663002: DevTools: simplify WI.CSSProperty and WI.CSSStyleDeclaration interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 userValuePx += borderBox.top + borderBox.bottom + paddingBox.top + paddingBox.bottom; 417 userValuePx += borderBox.top + borderBox.bottom + paddingBox.top + paddingBox.bottom;
418 418
419 userInput = userValuePx + "px"; 419 userInput = userValuePx + "px";
420 } 420 }
421 421
422 this.previousPropertyDataCandidate = null; 422 this.previousPropertyDataCandidate = null;
423 423
424 var allProperties = this.inlineStyle.allProperties; 424 var allProperties = this.inlineStyle.allProperties;
425 for (var i = 0; i < allProperties.length; ++i) { 425 for (var i = 0; i < allProperties.length; ++i) {
426 var property = allProperties[i]; 426 var property = allProperties[i];
427 if (property.name !== context.styleProperty || property.inactive) 427 if (property.name !== context.styleProperty || !property.activeInSty le())
428 continue; 428 continue;
429 429
430 this.previousPropertyDataCandidate = property; 430 this.previousPropertyDataCandidate = property;
431 property.setValue(userInput, commitEditor, true, callback.bind(this) ); 431 property.setValue(userInput, commitEditor, true, callback.bind(this) );
432 return; 432 return;
433 } 433 }
434 434
435 this.inlineStyle.appendProperty(context.styleProperty, userInput, callba ck.bind(this)); 435 this.inlineStyle.appendProperty(context.styleProperty, userInput, callba ck.bind(this));
436 436
437 /** 437 /**
(...skipping 17 matching lines...) Expand all
455 }, 455 },
456 456
457 editingCommitted: function(element, userInput, previousContent, context) 457 editingCommitted: function(element, userInput, previousContent, context)
458 { 458 {
459 this.editingEnded(element, context); 459 this.editingEnded(element, context);
460 this._applyUserInput(element, userInput, previousContent, context, true) ; 460 this._applyUserInput(element, userInput, previousContent, context, true) ;
461 }, 461 },
462 462
463 __proto__: WebInspector.ElementsSidebarPane.prototype 463 __proto__: WebInspector.ElementsSidebarPane.prototype
464 } 464 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698