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

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

Issue 1824683002: Fixes 590477: Style pane numeric property change modifier shortcuts are undiscoverable. Shift mouse… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes 590477: Style pane numeric property change modifier shortcuts are undiscoverable. Shift mouse… Created 4 years, 9 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
OLDNEW
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
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))){
lushnikov 2016/03/22 17:21:42 style: space before "{"
nojvek 2016/03/24 16:28:38 Done.
2918 if(!this._element.title)
lushnikov 2016/03/22 17:21:42 why do we setup title so late? we should probably
nojvek 2016/03/24 16:28:38 Done.
2919 this._element.title = WebInspector.UIString("Mousewheel or up/do wn keys. %s: ±100, Shift: ±10, Alt: ±0.1", WebInspector.isMac() ? "Cmd" : "Ctrl" )
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698