2010-05-02 Pavel Feldman <pfeldman@chromium.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 May 2010 15:27:53 +0000 (15:27 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 May 2010 15:27:53 +0000 (15:27 +0000)
        Reviewed by Timothy Hatcher.

        Web Inspector: debugger shortcuts are processed twice if source frame has focus.

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

        * inspector/front-end/SourceFrame.js:
        (WebInspector.SourceFrame):
        (WebInspector.SourceFrame.prototype._createViewerIfNeeded):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58655 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/inspector/front-end/SourceFrame.js

index 1a85cd7..598be97 100644 (file)
@@ -1,3 +1,15 @@
+2010-05-02  Pavel Feldman  <pfeldman@chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: debugger shortcuts are processed twice if source frame has focus.
+
+        https://bugs.webkit.org/show_bug.cgi?id=38431
+
+        * inspector/front-end/SourceFrame.js:
+        (WebInspector.SourceFrame):
+        (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
+
 2010-05-02  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
 
         Reviewed by Eric Seidel.
index 62f9222..c8f7b81 100644 (file)
@@ -39,7 +39,6 @@ WebInspector.SourceFrame = function(parentElement, addBreakpointDelegate, remove
     this._rowMessages = {};
     this._messageBubbles = {};
     this.breakpoints = [];
-    this._shortcuts = {};
 
     this._loaded = false;
 
@@ -172,7 +171,6 @@ WebInspector.SourceFrame.prototype = {
 
         this._textViewer = new WebInspector.TextViewer(this._textModel, WebInspector.platform, this._url);
         var element = this._textViewer.element;
-        element.addEventListener("keydown", this._keyDown.bind(this), true);
         element.addEventListener("contextmenu", this._contextMenu.bind(this), true);
         element.addEventListener("mousedown", this._mouseDown.bind(this), true);
         element.addEventListener("mousemove", this._mouseMove.bind(this), true);
@@ -677,17 +675,6 @@ WebInspector.SourceFrame.prototype = {
         return conditionElement;
     },
 
-    _keyDown: function(event)
-    {
-        var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
-        var handler = this._shortcuts[shortcut];
-        if (handler) {
-            handler(event);
-            event.preventDefault();
-        } else
-            WebInspector.documentKeyDown(event);
-    },
-
     _evalSelectionInCallFrame: function(event)
     {
         if (!WebInspector.panels.scripts || !WebInspector.panels.scripts.paused)