Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Web Inspector: prevent Canvas tab from listening for "space" when not…
… visibile

https://bugs.webkit.org/show_bug.cgi?id=190988

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype.shown):
(WI.CanvasTabContentView.prototype.hidden): Added.


Canonical link: https://commits.webkit.org/205852@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dcrousso committed Oct 29, 2018
1 parent e535e67 commit 922aeac
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/WebInspectorUI/ChangeLog
@@ -1,3 +1,15 @@
2018-10-29 Devin Rousso <drousso@apple.com>

Web Inspector: prevent Canvas tab from listening for "space" when not visibile
https://bugs.webkit.org/show_bug.cgi?id=190988

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype.shown):
(WI.CanvasTabContentView.prototype.hidden): Added.

2018-10-27 Matt Baker <mattbaker@apple.com>

Web Inspector: Table should support deleting rows
Expand Down
13 changes: 13 additions & 0 deletions Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js
Expand Up @@ -50,9 +50,11 @@ WI.CanvasTabContentView = class CanvasTabContentView extends WI.ContentBrowserTa

this._recordShortcut = new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
this._recordShortcut.implicitlyPreventsDefault = false;
this._recordShortcut.disabled = true;

this._recordSingleFrameShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
this._recordSingleFrameShortcut.implicitlyPreventsDefault = false;
this._recordSingleFrameShortcut.disabled = true;
}

static tabInfo()
Expand Down Expand Up @@ -102,10 +104,21 @@ WI.CanvasTabContentView = class CanvasTabContentView extends WI.ContentBrowserTa
{
super.shown();

this._recordShortcut.disabled = false;
this._recordSingleFrameShortcut.disabled = false;

if (!this.contentBrowser.currentContentView)
this.showRepresentedObject(this._canvasCollection);
}

hidden()
{
this._recordShortcut.disabled = true;
this._recordSingleFrameShortcut.disabled = true;

super.hidden();
}

restoreStateFromCookie(cookie)
{
// FIXME: implement once <https://webkit.org/b/177606> is complete.
Expand Down

0 comments on commit 922aeac

Please sign in to comment.