Alexei Filippov would like Pavel Feldman to review this change.
DevTools: Add setting to toggle default mouse wheel scroll/zoom flamechart behavior.
Bug: 725156
Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
---
M third_party/WebKit/Source/devtools/front_end/perf_ui/ChartViewport.js
M third_party/WebKit/Source/devtools/front_end/perf_ui/module.json
M third_party/WebKit/Source/devtools/front_end/profiler/module.json
M third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js
M third_party/WebKit/Source/devtools/front_end/timeline/module.json
5 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/third_party/WebKit/Source/devtools/front_end/perf_ui/ChartViewport.js b/third_party/WebKit/Source/devtools/front_end/perf_ui/ChartViewport.js
index 6b674bd..22f3335 100644
--- a/third_party/WebKit/Source/devtools/front_end/perf_ui/ChartViewport.js
+++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/ChartViewport.js
@@ -142,9 +142,9 @@
_onMouseWheel(e) {
if (!this._enabled())
return;
- // Pan vertically when shift down only.
- var panVertically = e.shiftKey && (e.wheelDeltaY || Math.abs(e.wheelDeltaX) === 120);
- var panHorizontally = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) && !e.shiftKey;
+ var doZoomInstead = e.shiftKey ^ (Common.moduleSetting('flamechartMouseWheelAction').get() === 'zoom');
+ var panVertically = !doZoomInstead && (e.wheelDeltaY || Math.abs(e.wheelDeltaX) === 120);
+ var panHorizontally = doZoomInstead && Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY);
if (panVertically) {
this._vScrollElement.scrollTop -= (e.wheelDeltaY || e.wheelDeltaX) / 120 * this._offsetHeight / 8;
} else if (panHorizontally) {
diff --git a/third_party/WebKit/Source/devtools/front_end/perf_ui/module.json b/third_party/WebKit/Source/devtools/front_end/perf_ui/module.json
index ce804b9..5d966ec 100644
--- a/third_party/WebKit/Source/devtools/front_end/perf_ui/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/module.json
@@ -4,6 +4,26 @@
"type": "@SourceFrame.UISourceCodeFrame.LineDecorator",
"className": "PerfUI.LineLevelProfile.LineDecorator",
"decoratorType": "performance"
+ },
+ {
+ "type": "setting",
+ "category": "Performance",
+ "title": "Flamechart mouse wheel action:",
+ "settingName": "flamechartMouseWheelAction",
+ "settingType": "enum",
+ "defaultValue": "zoom",
+ "options": [
+ {
+ "title": "Scroll",
+ "text": "Scroll",
+ "value": "scroll"
+ },
+ {
+ "title": "Zoom",
+ "text": "Zoom",
+ "value": "zoom"
+ }
+ ]
}
],
"dependencies": [
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/module.json b/third_party/WebKit/Source/devtools/front_end/profiler/module.json
index fae0144..f60a474 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/module.json
@@ -36,7 +36,7 @@
},
{
"type": "setting",
- "category": "Profiler",
+ "category": "Performance",
"title": "Record heap allocation stack traces",
"settingName": "recordAllocationStacks",
"settingType": "boolean",
@@ -44,7 +44,7 @@
},
{
"type": "setting",
- "category": "Profiler",
+ "category": "Performance",
"title": "High resolution CPU profiling",
"settingName": "highResolutionCpuProfiling",
"settingType": "boolean",
@@ -52,7 +52,7 @@
},
{
"type": "setting",
- "category": "Profiler",
+ "category": "Performance",
"title": "Show native functions in JS Profile",
"settingName": "showNativeFunctionsInJSProfile",
"settingType": "boolean",
diff --git a/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js b/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js
index 75c9e9a..c4d166c 100644
--- a/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js
+++ b/third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js
@@ -143,7 +143,7 @@
/** @const */
var explicitSectionOrder =
- ['', 'Appearance', 'Elements', 'Sources', 'Network', 'Profiler', 'Console', 'Extensions'];
+ ['', 'Appearance', 'Sources', 'Elements', 'Network', 'Performance', 'Console', 'Extensions'];
/** @type {!Map<string, !Element>} */
this._nameToSection = new Map();
for (var sectionName of explicitSectionOrder)
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/module.json b/third_party/WebKit/Source/devtools/front_end/timeline/module.json
index 854d48c..70b6676 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/module.json
@@ -10,7 +10,7 @@
},
{
"type": "setting",
- "category": "Profiler",
+ "category": "Performance",
"title": "Hide chrome frame in Layers view",
"settingName": "frameViewerHideChromeWindow",
"settingType": "boolean",
To view, visit change 527410. To unsubscribe, visit settings.
Pavel Feldman posted comments on this change.
Patch set 1:Code-Review +1
Alexei Filippov posted comments on this change.
Patch set 1:Commit-Queue +2
Commit Bot posted comments on this change.
Patch set 1:
Try jobs failed on following builders:
linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/313950)
Bot data: {"action": "cancel", "triggered_at": "2017-06-08T23:31:11.0Z", "cq_cfg_revision": "dd8cdf65cb2104e8650cb0cee45a728e77d54e8f", "revision": "c57157e833669b63bd27ebeb50bf8e7ec1078acd"}
Alexei Filippov posted comments on this change.
Patch set 1:Commit-Queue +2
Commit Bot posted comments on this change.
Patch set 1:
Try jobs failed on following builders:
linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/475059)
Bot data: {"action": "cancel", "triggered_at": "2017-06-09T01:09:02.0Z", "cq_cfg_revision": "dd8cdf65cb2104e8650cb0cee45a728e77d54e8f", "revision": "c57157e833669b63bd27ebeb50bf8e7ec1078acd"}
Alexei Filippov posted comments on this change.
Patch set 2:Commit-Queue +2
Commit Bot posted comments on this change.
Patch set 2:
CQ is trying da patch.
Note: The patchset sent to CQ was uploaded after this CL was approved.
"update test" https://chromium-review.googlesource.com/c/527410/2
Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/527410/2
Bot data: {"action": "start", "triggered_at": "2017-06-10T00:27:28.0Z", "cq_cfg_revision": "ff9b586e00e808b9c06338e22d6655e95057c6c4", "revision": "fb494202d3d212f704743ac50c5a167e0b8ca399"}
Commit Bot merged this change.
DevTools: Add setting to toggle default mouse wheel scroll/zoom flamechart behavior.
Bug: 725156
Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
Reviewed-on: https://chromium-review.googlesource.com/527410
Commit-Queue: Alexei Filippov <al...@chromium.org>
Reviewed-by: Pavel Feldman <pfel...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478500}
---
M third_party/WebKit/LayoutTests/inspector/quick-open/command-menu-expected.txt
M third_party/WebKit/Source/devtools/front_end/perf_ui/ChartViewport.js
M third_party/WebKit/Source/devtools/front_end/perf_ui/module.json
M third_party/WebKit/Source/devtools/front_end/profiler/module.json
M third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js
M third_party/WebKit/Source/devtools/front_end/timeline/module.json
6 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/third_party/WebKit/LayoutTests/inspector/quick-open/command-menu-expected.txt b/third_party/WebKit/LayoutTests/inspector/quick-open/command-menu-expected.txt
index 234966b..3b00e56 100644
--- a/third_party/WebKit/LayoutTests/inspector/quick-open/command-menu-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector/quick-open/command-menu-expected.txt
@@ -10,6 +10,7 @@
Has category: Mobile
Has category: Network
Has category: Panel
+Has category: Performance
Has category: Rendering
Has category: Settings
Has category: Sources