Title: [114382] trunk/Source/WebCore
- Revision
- 114382
- Author
- [email protected]
- Date
- 2012-04-17 08:38:40 -0700 (Tue, 17 Apr 2012)
Log Message
Web Inspector: Suggest box appears after the command was executed in console sometimes.
https://bugs.webkit.org/show_bug.cgi?id=84148
Reviewed by Pavel Feldman.
TextPrompt.complete() requests completions asynchronously, this change adds a flag
that informs TextPrompt._completionsReady() whether completions should still be shown.
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.clearAutoComplete):
(WebInspector.TextPrompt.prototype.complete):
(WebInspector.TextPrompt.prototype._completionsReady):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114381 => 114382)
--- trunk/Source/WebCore/ChangeLog 2012-04-17 15:37:03 UTC (rev 114381)
+++ trunk/Source/WebCore/ChangeLog 2012-04-17 15:38:40 UTC (rev 114382)
@@ -1,3 +1,18 @@
+2012-04-17 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: Suggest box appears after the command was executed in console sometimes.
+ https://bugs.webkit.org/show_bug.cgi?id=84148
+
+ Reviewed by Pavel Feldman.
+
+ TextPrompt.complete() requests completions asynchronously, this change adds a flag
+ that informs TextPrompt._completionsReady() whether completions should still be shown.
+
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.prototype.clearAutoComplete):
+ (WebInspector.TextPrompt.prototype.complete):
+ (WebInspector.TextPrompt.prototype._completionsReady):
+
2012-04-17 Yong Li <[email protected]>
REGRESSION (r105453): Crash when handling touch events
Modified: trunk/Source/WebCore/inspector/front-end/TextPrompt.js (114381 => 114382)
--- trunk/Source/WebCore/inspector/front-end/TextPrompt.js 2012-04-17 15:37:03 UTC (rev 114381)
+++ trunk/Source/WebCore/inspector/front-end/TextPrompt.js 2012-04-17 15:38:40 UTC (rev 114382)
@@ -303,6 +303,7 @@
clearTimeout(this._completeTimeout);
delete this._completeTimeout;
}
+ delete this._waitingForCompletions;
if (!this.autoCompleteElement)
return;
@@ -378,6 +379,7 @@
}
var wordPrefixRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, this._completionStopCharacters, this._element, "backward");
+ this._waitingForCompletions = true;
this._loadCompletions(this, wordPrefixRange, force, this._completionsReady.bind(this, selection, auto, wordPrefixRange, !!reverse));
},
@@ -423,10 +425,11 @@
*/
_completionsReady: function(selection, auto, originalWordPrefixRange, reverse, completions)
{
- if (!completions || !completions.length) {
+ if (!this._waitingForCompletions || !completions || !completions.length) {
this.hideSuggestBox();
return;
}
+ delete this._waitingForCompletions;
var selectionRange = selection.getRangeAt(0);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes