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

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

Issue 2252963005: DevTools: do not perform postponed search if the search was canceled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * Copyright (C) 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2011 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 _onInput: function(event) 551 _onInput: function(event)
552 { 552 {
553 if (this._valueChangedTimeoutId) 553 if (this._valueChangedTimeoutId)
554 clearTimeout(this._valueChangedTimeoutId); 554 clearTimeout(this._valueChangedTimeoutId);
555 var timeout = this._searchInputElement.value.length < 3 ? 200 : 0; 555 var timeout = this._searchInputElement.value.length < 3 ? 200 : 0;
556 this._valueChangedTimeoutId = setTimeout(this._onValueChanged.bind(this) , timeout); 556 this._valueChangedTimeoutId = setTimeout(this._onValueChanged.bind(this) , timeout);
557 }, 557 },
558 558
559 _onValueChanged: function() 559 _onValueChanged: function()
560 { 560 {
561 if (!this._searchIsVisible)
562 return;
561 delete this._valueChangedTimeoutId; 563 delete this._valueChangedTimeoutId;
562 this._performSearch(false, true); 564 this._performSearch(false, true);
563 }, 565 },
564 566
565 __proto__: WebInspector.VBox.prototype 567 __proto__: WebInspector.VBox.prototype
566 } 568 }
567 569
568 /** 570 /**
569 * @interface 571 * @interface
570 */ 572 */
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 // Silent catch. 657 // Silent catch.
656 } 658 }
657 659
658 // Otherwise just do a plain text search. 660 // Otherwise just do a plain text search.
659 if (!regex) 661 if (!regex)
660 regex = createPlainTextSearchRegex(query, modifiers); 662 regex = createPlainTextSearchRegex(query, modifiers);
661 663
662 return regex; 664 return regex;
663 } 665 }
664 } 666 }
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