Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2907 * @this {WebInspector.StylesSidebarPane.CSSPropertyPrompt} | 2907 * @this {WebInspector.StylesSidebarPane.CSSPropertyPrompt} |
| 2908 */ | 2908 */ |
| 2909 function customNumberHandler(prefix, number, suffix) | 2909 function customNumberHandler(prefix, number, suffix) |
| 2910 { | 2910 { |
| 2911 if (number !== 0 && !suffix.length && WebInspector.CSSMetadata.isLen gthProperty(this._treeElement.property.name)) | 2911 if (number !== 0 && !suffix.length && WebInspector.CSSMetadata.isLen gthProperty(this._treeElement.property.name)) |
| 2912 suffix = "px"; | 2912 suffix = "px"; |
| 2913 return prefix + number + suffix; | 2913 return prefix + number + suffix; |
| 2914 } | 2914 } |
| 2915 | 2915 |
| 2916 // Handle numeric value increment/decrement only at this point. | 2916 // Handle numeric value increment/decrement only at this point. |
| 2917 if (!this._isEditingName && WebInspector.handleElementValueModifications (event, this._treeElement.valueElement, finishHandler.bind(this), this._isValueS uggestion.bind(this), customNumberHandler.bind(this))) | 2917 if (!this._isEditingName && WebInspector.handleElementValueModifications (event, this._treeElement.valueElement, finishHandler.bind(this), this._isValueS uggestion.bind(this), customNumberHandler.bind(this))){ |
| 2918 if(!this._element.title) | |
| 2919 this._element.title = "Mousewheel or up/down keys. Ctrl: ±100, S hift: ±10, Alt: ±0.1"; | |
|
pfeldman
2016/03/21 18:18:30
this._element.title = WebInspector.UIString("Mouse
| |
| 2918 return true; | 2920 return true; |
| 2921 } | |
| 2919 | 2922 |
| 2920 return false; | 2923 return false; |
| 2921 }, | 2924 }, |
| 2922 | 2925 |
| 2923 /** | 2926 /** |
| 2924 * @param {string} word | 2927 * @param {string} word |
| 2925 * @return {boolean} | 2928 * @return {boolean} |
| 2926 */ | 2929 */ |
| 2927 _isValueSuggestion: function(word) | 2930 _isValueSuggestion: function(word) |
| 2928 { | 2931 { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3084 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha nged); | 3087 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha nged); |
| 3085 onNodeChanged(); | 3088 onNodeChanged(); |
| 3086 return button; | 3089 return button; |
| 3087 | 3090 |
| 3088 function onNodeChanged() | 3091 function onNodeChanged() |
| 3089 { | 3092 { |
| 3090 var node = WebInspector.context.flavor(WebInspector.DOMNode); | 3093 var node = WebInspector.context.flavor(WebInspector.DOMNode); |
| 3091 button.setEnabled(!!node); | 3094 button.setEnabled(!!node); |
| 3092 } | 3095 } |
| 3093 } | 3096 } |
| OLD | NEW |