Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/watcher.js

Issue 29333128: Issue 3463 - Filtering broken in Diagnostics (Closed)
Patch Set: Created Jan. 4, 2016, 2:22 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
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 * This Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 const Cc = Components.classes; 7 const Cc = Components.classes;
8 const Ci = Components.interfaces; 8 const Ci = Components.interfaces;
9 const Cr = Components.results; 9 const Cr = Components.results;
10 const Cu = Components.utils; 10 const Cu = Components.utils;
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 { 403 {
404 this._filterString = value.toLowerCase(); 404 this._filterString = value.toLowerCase();
405 this.refilter(); 405 this.refilter();
406 }, 406 },
407 407
408 filter: function(entry) 408 filter: function(entry)
409 { 409 {
410 if (this._filterString) 410 if (this._filterString)
411 { 411 {
412 let foundMatch = false; 412 let foundMatch = false;
413 for (let label of entry.cols) 413 for (let [col, label] of new Iterator(entry.cols))
414 if (label.toLowerCase().indexOf(this._filterString) >= 0) 414 if (label.toLowerCase().indexOf(this._filterString) >= 0)
415 foundMatch = true; 415 foundMatch = true;
416 416
417 if (!foundMatch) 417 if (!foundMatch)
418 return false; 418 return false;
419 } 419 }
420 return true; 420 return true;
421 }, 421 },
422 422
423 compare: function(entry1, entry2) 423 compare: function(entry1, entry2)
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 for (let i = 0; i < this.observers.length; i++) 529 for (let i = 0; i < this.observers.length; i++)
530 if (this.observers[i] == observer) 530 if (this.observers[i] == observer)
531 this.observers.splice(i--, 1); 531 this.observers.splice(i--, 1);
532 }, 532 },
533 notifyObservers: function(operation, entry) 533 notifyObservers: function(operation, entry)
534 { 534 {
535 for (let observer of this.observers) 535 for (let observer of this.observers)
536 observer(this, operation, entry); 536 observer(this, operation, entry);
537 } 537 }
538 }; 538 };
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