Commit 085697fe authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: allow zoom in Sources when not paused

When debugger is paused, holding Ctrl/Cmd highlights
Continue-to-location markers, and DevTools prevents scrolling from
adjusting zoom.

This CL checks whether we are paused somewhere, and allows zooming
via Ctrl-Wheel when not paused.

Bug: 878400
Change-Id: Ibe664f5241914b89fff9c5d7ae90658f2d803918
Reviewed-on: https://chromium-review.googlesource.com/1205537Reviewed-by: default avatarJoel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589041}
parent c9c3bf84
......@@ -75,7 +75,7 @@ Sources.DebuggerPlugin = class extends Sources.UISourceCodeFrame.Plugin {
this._boundBlur = this._onBlur.bind(this);
this._textEditor.element.addEventListener('focusout', this._boundBlur, false);
this._boundWheel = event => {
if (UI.KeyboardShortcut.eventHasCtrlOrMeta(event))
if (this._executionLocation && UI.KeyboardShortcut.eventHasCtrlOrMeta(event))
event.preventDefault();
};
this._textEditor.element.addEventListener('wheel', this._boundWheel, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment