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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
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 db2119f673b7d53ac5e821b24392531b41e2f557..545a0de5c0ddda1789725640bc266818c6cb6b6f 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -2850,8 +2850,19 @@ WebInspector.StylesSidebarPane.CSSPropertyPrompt = function(cssCompletions, tree
this._treeElement = treeElement;
this._isEditingName = isEditingName;
- if (!isEditingName)
+ if (!isEditingName) {
this.disableDefaultSuggestionForEmptyInput();
+
+ // If a CSS value is being edited that has a numeric or hex substring, hint that precision modifier shortcuts are available.
+ if (treeElement && treeElement.valueElement) {
+ var cssValueText = treeElement.valueElement.textContent;
+ if (cssValueText.match(/#[\da-f]{3,6}$/i))
+ this.setTitle(WebInspector.UIString("Increment/decrement with mousewheel or up/down keys. %s: R ±1, Shift: G ±1, Alt: B ±1", WebInspector.isMac() ? "Cmd" : "Ctrl"));
+ else if (cssValueText.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"));
+ }
+
+ }
}
WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype = {

Powered by Google App Engine
This is Rietveld 408576698