Title: [99459] trunk/Source/WebCore
Revision
99459
Author
vse...@chromium.org
Date
2011-11-07 12:37:06 -0800 (Mon, 07 Nov 2011)

Log Message

Web Inspector: Suggest box should be open immediately if forced by Ctrl+Space.
https://bugs.webkit.org/show_bug.cgi?id=71710

Reviewed by Pavel Feldman.

* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.clearAutoComplete):
(WebInspector.TextPrompt.prototype.autoCompleteSoon):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (99458 => 99459)


--- trunk/Source/WebCore/ChangeLog	2011-11-07 20:35:16 UTC (rev 99458)
+++ trunk/Source/WebCore/ChangeLog	2011-11-07 20:37:06 UTC (rev 99459)
@@ -1,3 +1,14 @@
+2011-11-07  Vsevolod Vlasov  <vse...@chromium.org>
+
+        Web Inspector: Suggest box should be open immediately if forced by Ctrl+Space.
+        https://bugs.webkit.org/show_bug.cgi?id=71710
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/TextPrompt.js:
+        (WebInspector.TextPrompt.prototype.clearAutoComplete):
+        (WebInspector.TextPrompt.prototype.autoCompleteSoon):
+
 2011-11-07  vse...@chromium.org  <vse...@chromium.org>
 
         Web Inspector: Suggest box should consume enter key pressed event.

Modified: trunk/Source/WebCore/inspector/front-end/TextPrompt.js (99458 => 99459)


--- trunk/Source/WebCore/inspector/front-end/TextPrompt.js	2011-11-07 20:35:16 UTC (rev 99458)
+++ trunk/Source/WebCore/inspector/front-end/TextPrompt.js	2011-11-07 20:37:06 UTC (rev 99459)
@@ -296,7 +296,7 @@
      */
     clearAutoComplete: function(includeTimeout)
     {
-        if (includeTimeout && "_completeTimeout" in this) {
+        if (includeTimeout && this._completeTimeout) {
             clearTimeout(this._completeTimeout);
             delete this._completeTimeout;
         }
@@ -334,8 +334,9 @@
      */
     autoCompleteSoon: function(force)
     {
-        if (!("_completeTimeout" in this))
-            this._completeTimeout = setTimeout(this.complete.bind(this, true, force), this.isSuggestBoxVisible() ? 0 : 250);
+        var immediately = this.isSuggestBoxVisible() || force;
+        if (!this._completeTimeout)
+            this._completeTimeout = setTimeout(this.complete.bind(this, true, force), immediately ? 0 : 250);
     },
 
     /**
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to