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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 FilterChanged: "FilterChanged" | 881 FilterChanged: "FilterChanged" |
882 }; | 882 }; |
883 | 883 |
884 WebInspector.ConsoleViewFilter.prototype = { | 884 WebInspector.ConsoleViewFilter.prototype = { |
885 addFilters: function(filterBar) | 885 addFilters: function(filterBar) |
886 { | 886 { |
887 this._textFilterUI = new WebInspector.TextFilterUI(true); | 887 this._textFilterUI = new WebInspector.TextFilterUI(true); |
888 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC
hanged, this._textFilterChanged, this); | 888 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC
hanged, this._textFilterChanged, this); |
889 filterBar.addFilter(this._textFilterUI); | 889 filterBar.addFilter(this._textFilterUI); |
890 | 890 |
891 this._levelFilterUI = new WebInspector.NamedBitSetFilterUI(); | 891 var levels = [ |
892 this._levelFilterUI.addBit("error", WebInspector.UIString("Errors")); | 892 {name: "error", label: WebInspector.UIString("Errors")}, |
893 this._levelFilterUI.addBit("warning", WebInspector.UIString("Warnings"))
; | 893 {name: "warning", label: WebInspector.UIString("Warnings")}, |
894 this._levelFilterUI.addBit("info", WebInspector.UIString("Info")); | 894 {name: "info", label: WebInspector.UIString("Info")}, |
895 this._levelFilterUI.addBit("log", WebInspector.UIString("Logs")); | 895 {name: "log", label: WebInspector.UIString("Logs")}, |
896 this._levelFilterUI.addBit("debug", WebInspector.UIString("Debug")); | 896 {name: "debug", label: WebInspector.UIString("Debug")} |
897 this._levelFilterUI.bindSetting(WebInspector.settings.messageLevelFilter
s); | 897 ]; |
| 898 this._levelFilterUI = new WebInspector.NamedBitSetFilterUI(levels, WebIn
spector.settings.messageLevelFilters); |
898 this._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.Filter
Changed, this._filterChanged, this); | 899 this._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.Filter
Changed, this._filterChanged, this); |
899 filterBar.addFilter(this._levelFilterUI); | 900 filterBar.addFilter(this._levelFilterUI); |
900 }, | 901 }, |
901 | 902 |
902 _textFilterChanged: function(event) | 903 _textFilterChanged: function(event) |
903 { | 904 { |
904 this._filterRegex = this._textFilterUI.regex(); | 905 this._filterRegex = this._textFilterUI.regex(); |
905 | 906 |
906 this._filterChanged(); | 907 this._filterChanged(); |
907 }, | 908 }, |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 var node = this.messagesElement.firstChild; | 1175 var node = this.messagesElement.firstChild; |
1175 while (node) { | 1176 while (node) { |
1176 if (node.classList.contains("console-message") && node.message) | 1177 if (node.classList.contains("console-message") && node.message) |
1177 node.message.wasShown(); | 1178 node.message.wasShown(); |
1178 if (node.classList.contains("console-group") && node.group) | 1179 if (node.classList.contains("console-group") && node.group) |
1179 node.group.wasShown(); | 1180 node.group.wasShown(); |
1180 node = node.nextSibling; | 1181 node = node.nextSibling; |
1181 } | 1182 } |
1182 } | 1183 } |
1183 } | 1184 } |
OLD | NEW |