OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 this._filterChanged = this.dispatchEventToListeners.bind(this, WebInspector.
ConsoleViewFilter.Events.FilterChanged); | 773 this._filterChanged = this.dispatchEventToListeners.bind(this, WebInspector.
ConsoleViewFilter.Events.FilterChanged); |
774 }; | 774 }; |
775 | 775 |
776 WebInspector.ConsoleViewFilter.Events = { | 776 WebInspector.ConsoleViewFilter.Events = { |
777 FilterChanged: "FilterChanged" | 777 FilterChanged: "FilterChanged" |
778 }; | 778 }; |
779 | 779 |
780 WebInspector.ConsoleViewFilter.prototype = { | 780 WebInspector.ConsoleViewFilter.prototype = { |
781 addFilters: function(filterBar) | 781 addFilters: function(filterBar) |
782 { | 782 { |
783 this._textFilterUI = new WebInspector.TextFilterUI(); | 783 this._textFilterUI = new WebInspector.TextFilterUI(true); |
784 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC
hanged, this._textFilterChanged, this); | 784 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC
hanged, this._textFilterChanged, this); |
785 filterBar.addFilter(this._textFilterUI); | 785 filterBar.addFilter(this._textFilterUI); |
786 | 786 |
787 this._levelFilterUI = new WebInspector.NamedBitSetFilterUI(); | 787 this._levelFilterUI = new WebInspector.NamedBitSetFilterUI(); |
788 this._levelFilterUI.addBit("error", WebInspector.UIString("Errors")); | 788 this._levelFilterUI.addBit("error", WebInspector.UIString("Errors")); |
789 this._levelFilterUI.addBit("warning", WebInspector.UIString("Warnings"))
; | 789 this._levelFilterUI.addBit("warning", WebInspector.UIString("Warnings"))
; |
790 this._levelFilterUI.addBit("info", WebInspector.UIString("Info")); | 790 this._levelFilterUI.addBit("info", WebInspector.UIString("Info")); |
791 this._levelFilterUI.addBit("log", WebInspector.UIString("Logs")); | 791 this._levelFilterUI.addBit("log", WebInspector.UIString("Logs")); |
792 this._levelFilterUI.addBit("debug", WebInspector.UIString("Debug")); | 792 this._levelFilterUI.addBit("debug", WebInspector.UIString("Debug")); |
793 this._levelFilterUI.bindSetting(WebInspector.settings.messageLevelFilter
s); | 793 this._levelFilterUI.bindSetting(WebInspector.settings.messageLevelFilter
s); |
794 this._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.Filter
Changed, this._filterChanged, this); | 794 this._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.Filter
Changed, this._filterChanged, this); |
795 filterBar.addFilter(this._levelFilterUI); | 795 filterBar.addFilter(this._levelFilterUI); |
796 }, | 796 }, |
797 | 797 |
798 _textFilterChanged: function(event) | 798 _textFilterChanged: function(event) |
799 { | 799 { |
800 var query = this._textFilterUI.value(); | 800 this._filterRegex = this._textFilterUI.regex(); |
801 if (!query) | |
802 delete this._filterRegex; | |
803 else | |
804 this._filterRegex = createPlainTextSearchRegex(query, "gi"); | |
805 | 801 |
806 this._filterChanged(); | 802 this._filterChanged(); |
807 }, | 803 }, |
808 | 804 |
809 /** | 805 /** |
810 * @param {string} url | 806 * @param {string} url |
811 */ | 807 */ |
812 addMessageURLFilter: function(url) | 808 addMessageURLFilter: function(url) |
813 { | 809 { |
814 this._messageURLFilters[url] = true; | 810 this._messageURLFilters[url] = true; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 | 1063 |
1068 /** | 1064 /** |
1069 * @type {?WebInspector.ConsoleView} | 1065 * @type {?WebInspector.ConsoleView} |
1070 */ | 1066 */ |
1071 WebInspector.consoleView = null; | 1067 WebInspector.consoleView = null; |
1072 | 1068 |
1073 WebInspector.ConsoleMessage.create = function(source, level, message, type, url,
line, column, repeatCount, parameters, stackTrace, requestId, isOutdated) | 1069 WebInspector.ConsoleMessage.create = function(source, level, message, type, url,
line, column, repeatCount, parameters, stackTrace, requestId, isOutdated) |
1074 { | 1070 { |
1075 return new WebInspector.ConsoleMessageImpl(source, level, message, WebInspec
tor.consoleView._linkifier, type, url, line, column, repeatCount, parameters, st
ackTrace, requestId, isOutdated); | 1071 return new WebInspector.ConsoleMessageImpl(source, level, message, WebInspec
tor.consoleView._linkifier, type, url, line, column, repeatCount, parameters, st
ackTrace, requestId, isOutdated); |
1076 } | 1072 } |
OLD | NEW |