OLD | NEW |
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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 userValuePx += borderBox.top + borderBox.bottom + paddingBox.top
+ paddingBox.bottom; | 440 userValuePx += borderBox.top + borderBox.bottom + paddingBox.top
+ paddingBox.bottom; |
441 | 441 |
442 userInput = userValuePx + "px"; | 442 userInput = userValuePx + "px"; |
443 } | 443 } |
444 | 444 |
445 this.previousPropertyDataCandidate = null; | 445 this.previousPropertyDataCandidate = null; |
446 | 446 |
447 var allProperties = this.inlineStyle.allProperties; | 447 var allProperties = this.inlineStyle.allProperties; |
448 for (var i = 0; i < allProperties.length; ++i) { | 448 for (var i = 0; i < allProperties.length; ++i) { |
449 var property = allProperties[i]; | 449 var property = allProperties[i]; |
450 if (property.name !== context.styleProperty || property.inactive) | 450 if (property.name !== context.styleProperty || !property.activeInSty
le()) |
451 continue; | 451 continue; |
452 | 452 |
453 this.previousPropertyDataCandidate = property; | 453 this.previousPropertyDataCandidate = property; |
454 property.setValue(userInput, commitEditor, true, callback.bind(this)
); | 454 property.setValue(userInput, commitEditor, true, callback.bind(this)
); |
455 return; | 455 return; |
456 } | 456 } |
457 | 457 |
458 this.inlineStyle.appendProperty(context.styleProperty, userInput, callba
ck.bind(this)); | 458 this.inlineStyle.appendProperty(context.styleProperty, userInput, callba
ck.bind(this)); |
459 | 459 |
460 /** | 460 /** |
(...skipping 17 matching lines...) Expand all Loading... |
478 }, | 478 }, |
479 | 479 |
480 editingCommitted: function(element, userInput, previousContent, context) | 480 editingCommitted: function(element, userInput, previousContent, context) |
481 { | 481 { |
482 this.editingEnded(element, context); | 482 this.editingEnded(element, context); |
483 this._applyUserInput(element, userInput, previousContent, context, true)
; | 483 this._applyUserInput(element, userInput, previousContent, context, true)
; |
484 }, | 484 }, |
485 | 485 |
486 __proto__: WebInspector.ElementsSidebarPane.prototype | 486 __proto__: WebInspector.ElementsSidebarPane.prototype |
487 } | 487 } |
OLD | NEW |