[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
pfeldman at chromium.org
pfeldman at chromium.org
Tue Jan 5 23:46:50 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 9627d2f1cbcef9e212a595e1912d0dfaa514566c
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 10 21:54:34 2009 +0000
2009-12-10 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: debugger shortcuts don't work when
Search field or Console drawer has focus.
https://bugs.webkit.org/show_bug.cgi?id=32392
* inspector/front-end/inspector.js:
(WebInspector.loaded):
(WebInspector.documentKeyDown):
(WebInspector.documentKeyUp):
(WebInspector.searchKeyDown):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ee28086..659015d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-10 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: debugger shortcuts don't work when
+ Search field or Console drawer has focus.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32392
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.documentKeyDown):
+ (WebInspector.documentKeyUp):
+ (WebInspector.searchKeyDown):
+
2009-12-10 Dimitri Glazkov <dglazkov at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index 68a516f..a035e7d 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -197,8 +197,8 @@ WebInspector.ElementsTreeOutline.prototype = {
if (!selectedElement)
return;
- // Delete or backspace pressed, delete the node.
- if (event.keyCode === 8 || event.keyCode === 46) {
+ if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Backspace ||
+ event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Delete) {
selectedElement.remove();
event.preventDefault();
return;
diff --git a/WebCore/inspector/front-end/KeyboardShortcut.js b/WebCore/inspector/front-end/KeyboardShortcut.js
index a1b574b..0a068d5 100644
--- a/WebCore/inspector/front-end/KeyboardShortcut.js
+++ b/WebCore/inspector/front-end/KeyboardShortcut.js
@@ -44,6 +44,7 @@ WebInspector.KeyboardShortcut.Modifiers = {
};
WebInspector.KeyboardShortcut.KeyCodes = {
+ Backspace: 8,
Esc: 27,
Space: 32,
PageUp: 33, // also NUM_NORTH_EAST
@@ -54,6 +55,7 @@ WebInspector.KeyboardShortcut.KeyCodes = {
Up: 38, // also NUM_NORTH
Right: 39, // also NUM_EAST
Down: 40, // also NUM_SOUTH
+ Delete: 46,
F1: 112,
F2: 113,
F3: 114,
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 73dc74c..3f21f4f 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -482,8 +482,6 @@ WebInspector.loaded = function()
document.addEventListener("contextmenu", this.contextMenuEventFired.bind(this), true);
var mainPanelsElement = document.getElementById("main-panels");
- mainPanelsElement.handleKeyEvent = this.mainKeyDown.bind(this);
- mainPanelsElement.handleKeyUpEvent = this.mainKeyUp.bind(this);
mainPanelsElement.handleCopyEvent = this.mainCopy.bind(this);
// Focus the mainPanelsElement in a timeout so it happens after the initial focus,
@@ -640,12 +638,17 @@ WebInspector.documentClick = function(event)
WebInspector.documentKeyDown = function(event)
{
- if (!this.currentFocusElement)
- return;
- if (this.currentFocusElement.handleKeyEvent)
- this.currentFocusElement.handleKeyEvent(event);
- else if (this.currentFocusElement.id && this.currentFocusElement.id.length && WebInspector[this.currentFocusElement.id + "KeyDown"])
- WebInspector[this.currentFocusElement.id + "KeyDown"](event);
+ if (this.currentFocusElement) {
+ if (this.currentFocusElement.handleKeyEvent)
+ this.currentFocusElement.handleKeyEvent(event);
+ else if (this.currentFocusElement.id && this.currentFocusElement.id.length && WebInspector[this.currentFocusElement.id + "KeyDown"])
+ WebInspector[this.currentFocusElement.id + "KeyDown"](event);
+ if (event.handled)
+ return;
+ }
+
+ if (this.currentPanel && this.currentPanel.handleKeyEvent)
+ this.currentPanel.handleKeyEvent(event);
if (!event.handled) {
var isMac = WebInspector.isMac();
@@ -730,9 +733,15 @@ WebInspector.documentKeyDown = function(event)
WebInspector.documentKeyUp = function(event)
{
- if (!this.currentFocusElement || !this.currentFocusElement.handleKeyUpEvent)
- return;
- this.currentFocusElement.handleKeyUpEvent(event);
+ if (this.currentFocusElement) {
+ if (this.currentFocusElement.handleKeyUpEvent)
+ this.currentFocusElement.handleKeyUpEvent(event);
+ if (event.handled)
+ return;
+ }
+
+ if (this.currentPanel && this.currentPanel.handleKeyUpEvent)
+ this.currentPanel.handleKeyUpEvent(event);
}
WebInspector.documentCanCopy = function(event)
@@ -762,18 +771,6 @@ WebInspector.contextMenuEventFired = function(event)
event.preventDefault();
}
-WebInspector.mainKeyDown = function(event)
-{
- if (this.currentPanel && this.currentPanel.handleKeyEvent)
- this.currentPanel.handleKeyEvent(event);
-}
-
-WebInspector.mainKeyUp = function(event)
-{
- if (this.currentPanel && this.currentPanel.handleKeyUpEvent)
- this.currentPanel.handleKeyUpEvent(event);
-}
-
WebInspector.mainCopy = function(event)
{
if (this.currentPanel && this.currentPanel.handleCopyEvent)
@@ -1550,14 +1547,19 @@ WebInspector.searchKeyDown = function(event)
// Escape Key will clear the field and clear the search results
if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Esc) {
event.preventDefault();
- event.handled = true;
+ // When search was selected manually and is currently blank, we'd like Esc stay unhandled
+ // and hit console drawer handler.
+ event.handled = !(this.previousFocusElement === event.target && event.target.value === "");
event.target.value = "";
this.performSearch(event);
this.currentFocusElement = this.previousFocusElement;
if (this.currentFocusElement === event.target)
this.currentFocusElement.select();
-
+ return false;
+ } else if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Backspace ||
+ event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Delete) {
+ event.handled = true;
return false;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list