Title: [227299] branches/safari-605-branch/Source/WebInspectorUI
Revision
227299
Author
[email protected]
Date
2018-01-22 09:56:52 -0800 (Mon, 22 Jan 2018)

Log Message

Cherry-pick r227008. rdar://problem/36722458

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WebInspectorUI/ChangeLog (227298 => 227299)


--- branches/safari-605-branch/Source/WebInspectorUI/ChangeLog	2018-01-22 17:51:27 UTC (rev 227298)
+++ branches/safari-605-branch/Source/WebInspectorUI/ChangeLog	2018-01-22 17:56:52 UTC (rev 227299)
@@ -1,3 +1,19 @@
+2018-01-22  Jason Marcell  <[email protected]>
+
+        Cherry-pick r227008. rdar://problem/36722458
+
+    2018-01-16  Matt Baker  <[email protected]>
+
+            Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
+            https://bugs.webkit.org/show_bug.cgi?id=181706
+            <rdar://problem/36558221>
+
+            Reviewed by Joseph Pecoraro.
+
+            * UserInterface/Views/CanvasOverviewContentView.js:
+            (WI.CanvasOverviewContentView):
+            (WI.CanvasOverviewContentView.prototype._handleSpace):
+
 2018-01-17  Jason Marcell  <[email protected]>
 
         Cherry-pick r227078. rdar://problem/36597996

Modified: branches/safari-605-branch/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js (227298 => 227299)


--- branches/safari-605-branch/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js	2018-01-22 17:51:27 UTC (rev 227298)
+++ branches/safari-605-branch/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js	2018-01-22 17:56:52 UTC (rev 227299)
@@ -61,10 +61,16 @@
             new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Right, this._handleRight.bind(this)),
             new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Down, this._handleDown.bind(this)),
             new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Left, this._handleLeft.bind(this)),
-            new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this)),
-            new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this)),
         ];
 
+        let recordShortcut = new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
+        recordShortcut.implicitlyPreventsDefault = false;
+        this._keyboardShortcuts.push(recordShortcut);
+
+        let recordSingleFrameShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
+        recordSingleFrameShortcut.implicitlyPreventsDefault = false;
+        this._keyboardShortcuts.push(recordSingleFrameShortcut);
+
         for (let shortcut of this._keyboardShortcuts)
             shortcut.disabled = true;
     }
@@ -241,6 +247,9 @@
 
     _handleSpace(event)
     {
+        if (WI.isEventTargetAnEditableField(event))
+            return;
+
         if (!this._selectedItem)
             return;
 
@@ -250,6 +259,8 @@
             let singleFrame = !!event.shiftKey;
             WI.canvasManager.startRecording(this._selectedItem, singleFrame);
         }
+
+        event.preventDefault();
     }
 
     _updateShowImageGrid()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to