⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181819 in webkit


Ignore:
Timestamp:
Mar 20, 2015, 4:38:03 PM (11 years ago)
Author:
Nikita Vasilyev
Message:

Web Inspector: Fast typing lags in the Styles sidebar or Console
https://bugs.webkit.org/show_bug.cgi?id=142919

Asynchronous autocomplete causes a race condition in CodeMirror,
which results in skipped characters in while typing. Completing immediately
fixes the issues.

Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/CodeMirrorCompletionController.js:

(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
(WebInspector.CodeMirrorCompletionController.prototype.):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r181769 r181819  
     12015-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: Fast typing lags in the Styles sidebar or Console
     4        https://bugs.webkit.org/show_bug.cgi?id=142919
     5
     6        Asynchronous autocomplete causes a race condition in CodeMirror,
     7        which results in skipped characters in while typing. Completing immediately
     8        fixes the issues.
     9
     10        Reviewed by Timothy Hatcher.
     11
     12        * UserInterface/Controllers/CodeMirrorCompletionController.js:
     13        (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
     14        (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
     15        (WebInspector.CodeMirrorCompletionController.prototype.):
     16
    1172015-03-19  Joseph Pecoraro  <pecoraro@apple.com>
    218
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js

    r181769 r181819  
    170170        this._forced = false;
    171171
    172         if (this._completionDelayTimeout) {
    173             clearTimeout(this._completionDelayTimeout);
    174             delete this._completionDelayTimeout;
    175         }
    176 
    177172        delete this._currentCompletion;
    178173        delete this._ignoreNextCursorActivity;
     
    442437            this.hideCompletions();
    443438            return;
    444         }
    445 
    446         if (this._completionDelayTimeout) {
    447             clearTimeout(this._completionDelayTimeout);
    448             delete this._completionDelayTimeout;
    449439        }
    450440
     
    788778            return;
    789779
    790         if (this._completionDelayTimeout) {
    791             clearTimeout(this._completionDelayTimeout);
    792             delete this._completionDelayTimeout;
    793         }
    794 
    795         if (this._hasPendingCompletion())
    796             this._completeAtCurrentPosition(false);
    797         else
    798             this._completionDelayTimeout = setTimeout(this._completeAtCurrentPosition.bind(this, false), WebInspector.CodeMirrorCompletionController.CompletionTypingDelay);
     780        this._completeAtCurrentPosition(false);
    799781    },
    800782
Note: See TracChangeset for help on using the changeset viewer.