[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
timothy at apple.com
timothy at apple.com
Thu Oct 29 20:51:37 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit b3985beb02adfb10ee49d8b3a3a0eec3202c8e1b
Author: timothy at apple.com <timothy at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Oct 25 04:56:40 2009 +0000
WebInspector: Fixed issue with IME inside console
https://bugs.webkit.org/show_bug.cgi?id=30660
Patch by Keishi Hattori <casey.hattori at gmail.com> on 2009-10-24
Reviewed by Timothy Hatcher.
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._promptKeyDown):
* inspector/front-end/DatabaseQueryView.js:
(WebInspector.DatabaseQueryView.prototype._promptKeyDown):
* inspector/front-end/inspector.js:
(WebInspector.loaded):
(WebInspector.searchKeyDown): Moved performSearch here from WebInspector.searchKeyUp.
(WebInspector.startEditing.element.handleKeyEvent):
(WebInspector.startEditing):
* inspector/front-end/utilities.js:
(isEnterKey): Added. Check if in IME.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1cbf1b6..62eb4fc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2009-10-24 Keishi Hattori <casey.hattori at gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Fixed issue with IME inside console
+ https://bugs.webkit.org/show_bug.cgi?id=30660
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._promptKeyDown):
+ * inspector/front-end/DatabaseQueryView.js:
+ (WebInspector.DatabaseQueryView.prototype._promptKeyDown):
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ (WebInspector.searchKeyDown): Moved performSearch here from WebInspector.searchKeyUp.
+ (WebInspector.startEditing.element.handleKeyEvent):
+ (WebInspector.startEditing):
+ * inspector/front-end/utilities.js:
+ (isEnterKey): Added. Check if in IME.
+
2009-10-24 Brian Weinstein <bweinstein at apple.com>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 1da2fc6..ac0c4ef 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -400,10 +400,9 @@ WebInspector.ConsoleView.prototype = {
_promptKeyDown: function(event)
{
- switch (event.keyIdentifier) {
- case "Enter":
- this._enterKeyPressed(event);
- return;
+ if (isEnterKey(event)) {
+ this._enterKeyPressed(event);
+ return;
}
this.prompt.handleKeyEvent(event);
diff --git a/WebCore/inspector/front-end/DatabaseQueryView.js b/WebCore/inspector/front-end/DatabaseQueryView.js
index 6c5fa02..e85af66 100644
--- a/WebCore/inspector/front-end/DatabaseQueryView.js
+++ b/WebCore/inspector/front-end/DatabaseQueryView.js
@@ -94,10 +94,9 @@ WebInspector.DatabaseQueryView.prototype = {
_promptKeyDown: function(event)
{
- switch (event.keyIdentifier) {
- case "Enter":
- this._enterKeyPressed(event);
- return;
+ if (isEnterKey(event)) {
+ this._enterKeyPressed(event);
+ return;
}
this.prompt.handleKeyEvent(event);
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index ab33a0b..91318f6 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -461,8 +461,6 @@ WebInspector.loaded = function()
// this._updateErrorAndWarningCounts();
var searchField = document.getElementById("search");
- searchField.addEventListener("keydown", this.searchKeyDown.bind(this), false);
- searchField.addEventListener("keyup", this.searchKeyUp.bind(this), false);
searchField.addEventListener("search", this.performSearch.bind(this), false); // when the search is emptied
toolbarElement.addEventListener("mousedown", this.toolbarDragStart, true);
@@ -1441,19 +1439,8 @@ WebInspector.addMainEventListeners = function(doc)
WebInspector.searchKeyDown = function(event)
{
- if (event.keyIdentifier !== "Enter")
- return;
-
- // Call preventDefault since this was the Enter key. This prevents a "search" event
- // from firing for key down. We handle the Enter key on key up in searchKeyUp. This
- // stops performSearch from being called twice in a row.
- event.preventDefault();
-}
-
-WebInspector.searchKeyUp = function(event)
-{
- if (event.keyIdentifier !== "Enter")
- return;
+ if (!isEnterKey(event))
+ return false;
// Select all of the text so the user can easily type an entirely new query.
event.target.select();
@@ -1462,6 +1449,10 @@ WebInspector.searchKeyUp = function(event)
// performance is poor because of searching on every key. The search field has
// the incremental attribute set, so we still get incremental searches.
this.performSearch(event);
+
+ // Call preventDefault since this was the Enter key. This prevents a "search" event
+ // from firing for key down. This stops performSearch from being called twice in a row.
+ event.preventDefault();
}
WebInspector.performSearch = function(event)
@@ -1640,7 +1631,7 @@ WebInspector.startEditing = function(element, committedCallback, cancelledCallba
if (event.handled)
return;
- if (event.keyIdentifier === "Enter") {
+ if (isEnterKey(event)) {
editingCommitted.call(element);
event.preventDefault();
} else if (event.keyCode === 27) { // Escape key
diff --git a/WebCore/inspector/front-end/utilities.js b/WebCore/inspector/front-end/utilities.js
index 6df23de..e9d185f 100644
--- a/WebCore/inspector/front-end/utilities.js
+++ b/WebCore/inspector/front-end/utilities.js
@@ -817,3 +817,8 @@ String.format = function(format, substitutions, formatters, initialValue, append
return { formattedResult: result, unusedSubstitutions: unusedSubstitutions };
}
+
+function isEnterKey(event) {
+ // Check if in IME.
+ return event.keyCode !== 229 && event.keyIdentifier === "Enter";
+}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list