DevTools: Add setting to toggle default mouse wheel scroll/zoom flamechart behavior. [chromium/src : master]

44 views
Skip to first unread message

Alexei Filippov (Gerrit)

unread,
Jun 8, 2017, 2:36:23 PM6/8/17
to Pavel Feldman, apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org

Alexei Filippov would like Pavel Feldman to review this change.

View 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.

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
Gerrit-Change-Number: 527410
Gerrit-PatchSet: 1
Gerrit-Owner: Alexei Filippov <al...@chromium.org>
Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
Gerrit-Reviewer: Pavel Feldman <pfel...@chromium.org>

Pavel Feldman (Gerrit)

unread,
Jun 8, 2017, 7:29:31 PM6/8/17
to Alexei Filippov, apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, chromium...@chromium.org, devtools...@chromium.org

Pavel Feldman posted comments on this change.

View Change

Patch set 1:Code-Review +1

    To view, visit change 527410. To unsubscribe, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
    Gerrit-Change-Number: 527410
    Gerrit-PatchSet: 1
    Gerrit-Owner: Alexei Filippov <al...@chromium.org>
    Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
    Gerrit-Reviewer: Pavel Feldman <pfel...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Jun 2017 23:29:29 +0000
    Gerrit-HasComments: No
    Gerrit-HasLabels: Yes

    Alexei Filippov (Gerrit)

    unread,
    Jun 8, 2017, 7:31:13 PM6/8/17
    to apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, Pavel Feldman, chromium...@chromium.org, devtools...@chromium.org

    Alexei Filippov posted comments on this change.

    View Change

    Patch set 1:Commit-Queue +2

      To view, visit change 527410. To unsubscribe, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-MessageType: comment
      Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
      Gerrit-Change-Number: 527410
      Gerrit-PatchSet: 1
      Gerrit-Owner: Alexei Filippov <al...@chromium.org>
      Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
      Gerrit-Reviewer: Pavel Feldman <pfel...@chromium.org>
      Gerrit-Comment-Date: Thu, 08 Jun 2017 23:31:11 +0000
      Gerrit-HasComments: No
      Gerrit-HasLabels: Yes

      Commit Bot (Gerrit)

      unread,
      Jun 8, 2017, 8:48:58 PM6/8/17
      to Alexei Filippov, apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, Pavel Feldman, chromium...@chromium.org, devtools...@chromium.org

      Commit Bot posted comments on this change.

      View 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"}

        To view, visit change 527410. To unsubscribe, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
        Gerrit-Change-Number: 527410
        Gerrit-PatchSet: 1
        Gerrit-Owner: Alexei Filippov <al...@chromium.org>
        Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
        Gerrit-Reviewer: Pavel Feldman <pfel...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-Comment-Date: Fri, 09 Jun 2017 00:48:55 +0000
        Gerrit-HasComments: No
        Gerrit-HasLabels: No

        Alexei Filippov (Gerrit)

        unread,
        Jun 8, 2017, 9:09:07 PM6/8/17
        to apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, Commit Bot, Pavel Feldman, chromium...@chromium.org, devtools...@chromium.org

        Alexei Filippov posted comments on this change.

        View Change

        Patch set 1:Commit-Queue +2

          To view, visit change 527410. To unsubscribe, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
          Gerrit-Change-Number: 527410
          Gerrit-PatchSet: 1
          Gerrit-Owner: Alexei Filippov <al...@chromium.org>
          Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
          Gerrit-Reviewer: Pavel Feldman <pfel...@chromium.org>
          Gerrit-CC: Commit Bot <commi...@chromium.org>
          Gerrit-Comment-Date: Fri, 09 Jun 2017 01:09:02 +0000
          Gerrit-HasComments: No
          Gerrit-HasLabels: Yes

          Commit Bot (Gerrit)

          unread,
          Jun 8, 2017, 10:51:27 PM6/8/17
          to Alexei Filippov, apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, Pavel Feldman, chromium...@chromium.org, devtools...@chromium.org

          Commit Bot posted comments on this change.

          View 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"}

            To view, visit change 527410. To unsubscribe, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: comment
            Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
            Gerrit-Change-Number: 527410
            Gerrit-PatchSet: 1
            Gerrit-Owner: Alexei Filippov <al...@chromium.org>
            Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
            Gerrit-Reviewer: Pavel Feldman <pfel...@chromium.org>
            Gerrit-CC: Commit Bot <commi...@chromium.org>
            Gerrit-Comment-Date: Fri, 09 Jun 2017 02:51:25 +0000
            Gerrit-HasComments: No
            Gerrit-HasLabels: No

            Alexei Filippov (Gerrit)

            unread,
            Jun 9, 2017, 8:27:33 PM6/9/17
            to apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, Commit Bot, Pavel Feldman, chromium...@chromium.org, devtools...@chromium.org

            Alexei Filippov posted comments on this change.

            View Change

            Patch set 2:Commit-Queue +2

              To view, visit change 527410. To unsubscribe, visit settings.

              Gerrit-Project: chromium/src
              Gerrit-Branch: master
              Gerrit-MessageType: comment
              Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
              Gerrit-Change-Number: 527410
              Gerrit-PatchSet: 2
              Gerrit-Owner: Alexei Filippov <al...@chromium.org>
              Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
              Gerrit-Reviewer: Pavel Feldman <pfel...@chromium.org>
              Gerrit-CC: Commit Bot <commi...@chromium.org>
              Gerrit-Comment-Date: Sat, 10 Jun 2017 00:27:28 +0000
              Gerrit-HasComments: No
              Gerrit-HasLabels: Yes

              Commit Bot (Gerrit)

              unread,
              Jun 9, 2017, 8:27:44 PM6/9/17
              to Alexei Filippov, apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, Pavel Feldman, chromium...@chromium.org, devtools...@chromium.org

              Commit Bot posted comments on this change.

              View 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"}

                To view, visit change 527410. To unsubscribe, visit settings.

                Gerrit-Project: chromium/src
                Gerrit-Branch: master
                Gerrit-MessageType: comment
                Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
                Gerrit-Change-Number: 527410
                Gerrit-PatchSet: 2
                Gerrit-Owner: Alexei Filippov <al...@chromium.org>
                Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
                Gerrit-Reviewer: Pavel Feldman <pfel...@chromium.org>
                Gerrit-CC: Commit Bot <commi...@chromium.org>
                Gerrit-Comment-Date: Sat, 10 Jun 2017 00:27:42 +0000
                Gerrit-HasComments: No
                Gerrit-HasLabels: No

                Commit Bot (Gerrit)

                unread,
                Jun 9, 2017, 10:09:58 PM6/9/17
                to Alexei Filippov, apavlo...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, kozyatins...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, Pavel Feldman, chromium...@chromium.org, devtools...@chromium.org

                Commit Bot merged this change.

                View Change

                Approvals: Pavel Feldman: Looks good to me Alexei Filippov: Commit
                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
                Gerrit-MessageType: merged
                Gerrit-Change-Id: I5139e875d3fce13b1402311c46768035d4798b49
                Gerrit-Change-Number: 527410
                Gerrit-PatchSet: 3
                Gerrit-Owner: Alexei Filippov <al...@chromium.org>
                Gerrit-Reviewer: Alexei Filippov <al...@chromium.org>
                Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
                Reply all
                Reply to author
                Forward
                0 new messages