Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js

Issue 2390933003: DevTools: Stop SuggestBox from flickering in TextPrompt (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 } 275 }
276 276
277 this._selectionTimeout = setTimeout(moveBackIfOutside.bind(this), 100); 277 this._selectionTimeout = setTimeout(moveBackIfOutside.bind(this), 100);
278 }, 278 },
279 279
280 /** 280 /**
281 * @param {boolean=} force 281 * @param {boolean=} force
282 */ 282 */
283 _updateAutoComplete: function(force) 283 _updateAutoComplete: function(force)
284 { 284 {
285 this.clearAutocomplete(); 285 this._clearAutocompleteElement();
286 this.autoCompleteSoon(force); 286 this.autoCompleteSoon(force);
287 }, 287 },
288 288
289 /** 289 /**
290 * @param {!Event} event 290 * @param {!Event} event
291 */ 291 */
292 onMouseWheel: function(event) 292 onMouseWheel: function(event)
293 { 293 {
294 // Subclasses can implement. 294 // Subclasses can implement.
295 }, 295 },
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 if (!result) 369 if (!result)
370 result = this._acceptSuggestionInternal(); 370 result = this._acceptSuggestionInternal();
371 371
372 return result; 372 return result;
373 }, 373 },
374 374
375 clearAutocomplete: function() 375 clearAutocomplete: function()
376 { 376 {
377 if (this.isSuggestBoxVisible()) 377 if (this.isSuggestBoxVisible())
378 this._suggestBox.hide(); 378 this._suggestBox.hide();
379 this._clearAutocompleteElement();
380 },
379 381
382 _clearAutocompleteElement: function()
383 {
380 if (this._completeTimeout) { 384 if (this._completeTimeout) {
381 clearTimeout(this._completeTimeout); 385 clearTimeout(this._completeTimeout);
382 delete this._completeTimeout; 386 delete this._completeTimeout;
383 } 387 }
384 388
385 if (!this.autoCompleteElement) 389 if (!this.autoCompleteElement)
386 return; 390 return;
387 391
388 this.autoCompleteElement.remove(); 392 this.autoCompleteElement.remove();
389 delete this.autoCompleteElement; 393 delete this.autoCompleteElement;
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 }, 1023 },
1020 1024
1021 /** 1025 /**
1022 * @return {string|undefined} 1026 * @return {string|undefined}
1023 */ 1027 */
1024 _currentHistoryItem: function() 1028 _currentHistoryItem: function()
1025 { 1029 {
1026 return this._data[this._data.length - this._historyOffset]; 1030 return this._data[this._data.length - this._historyOffset];
1027 } 1031 }
1028 }; 1032 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698