Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
| index bd44f0f35ad954a24f9e45391e6e9d5e309c9e3a..d8f512cc168f9fed064b1e331522462814d54ef5 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
| @@ -2914,12 +2914,23 @@ WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype = { |
| } |
| // Handle numeric value increment/decrement only at this point. |
| - if (!this._isEditingName && WebInspector.handleElementValueModifications(event, this._treeElement.valueElement, finishHandler.bind(this), this._isValueSuggestion.bind(this), customNumberHandler.bind(this))) |
| + if (!this._isEditingName && WebInspector.handleElementValueModifications(event, this._treeElement.valueElement, finishHandler.bind(this), this._isValueSuggestion.bind(this), customNumberHandler.bind(this))) { |
|
lushnikov
2016/03/25 18:48:32
style: omit braces
|
| return true; |
| + } |
| return false; |
| }, |
| + /** |
| + * @override |
| + */ |
| + onEditStart: function() |
|
lushnikov
2016/03/25 18:48:32
I think we can simplify this even further.
Let's
|
| + { |
| + // if a css value is being edited that has a numeric substring, hint that precision modifier shortcuts are available |
|
lushnikov
2016/03/25 18:48:32
style: comments should start with capital letter a
|
| + if (!this._isEditingName && !this.title() && this.text().match(/\d+/)) |
| + this.setTitle(WebInspector.UIString("Increment/decrement with mousewheel or up/down keys. %s: ±100, Shift: ±10, Alt: ±0.1", WebInspector.isMac() ? "Cmd" : "Ctrl")); |
| + }, |
| + |
| /** |
| * @param {string} word |
| * @return {boolean} |