| Index: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
|
| index 9b462083694f1c3a7b0797f5c505f7162305af29..e3a9db1f8dc92713d9631571c6e372f88ab4e240 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
|
| @@ -301,9 +301,10 @@ WebInspector._valueModificationDirection = function(event)
|
| {
|
| var direction = null;
|
| if (event.type === "mousewheel") {
|
| - if (event.wheelDeltaY > 0)
|
| + // When shift is pressed while spinning mousewheel, delta comes as wheelDeltaX.
|
| + if (event.wheelDeltaY > 0 || event.wheelDeltaX > 0)
|
| direction = "Up";
|
| - else if (event.wheelDeltaY < 0)
|
| + else if (event.wheelDeltaY < 0 || event.wheelDeltaX < 0)
|
| direction = "Down";
|
| } else {
|
| if (event.keyIdentifier === "Up" || event.keyIdentifier === "PageUp")
|
| @@ -363,14 +364,15 @@ WebInspector._modifiedFloatNumber = function(number, event)
|
| if (!direction)
|
| return number;
|
|
|
| - var arrowKeyOrMouseWheelEvent = (event.keyIdentifier === "Up" || event.keyIdentifier === "Down" || event.type === "mousewheel");
|
| -
|
| - // Jump by 10 when shift is down or jump by 0.1 when Alt/Option is down.
|
| - // Also jump by 10 for page up and down, or by 100 if shift is held with a page key.
|
| + // Precision modifier keys work with both mousewheel and up/down keys.
|
| + // When ctrl is pressed, increase by 100
|
| + // When shift is pressed, increase by 10
|
| + // When alt is pressed, increase by 0.1
|
| + // Otherwise increase by 1
|
| var changeAmount = 1;
|
| - if (event.shiftKey && !arrowKeyOrMouseWheelEvent)
|
| + if (WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event))
|
| changeAmount = 100;
|
| - else if (event.shiftKey || !arrowKeyOrMouseWheelEvent)
|
| + else if (event.shiftKey)
|
| changeAmount = 10;
|
| else if (event.altKey)
|
| changeAmount = 0.1;
|
|
|