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

Side by Side Diff: Source/devtools/front_end/console/ConsoleView.js

Issue 1164763004: DevTools: render category filters in a way that they don't clash. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: for landing Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 FilterChanged: "FilterChanged" 1039 FilterChanged: "FilterChanged"
1040 }; 1040 };
1041 1041
1042 WebInspector.ConsoleViewFilter.prototype = { 1042 WebInspector.ConsoleViewFilter.prototype = {
1043 addFilters: function(filterBar) 1043 addFilters: function(filterBar)
1044 { 1044 {
1045 this._textFilterUI = new WebInspector.TextFilterUI(true); 1045 this._textFilterUI = new WebInspector.TextFilterUI(true);
1046 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC hanged, this._textFilterChanged, this); 1046 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC hanged, this._textFilterChanged, this);
1047 filterBar.addFilter(this._textFilterUI); 1047 filterBar.addFilter(this._textFilterUI);
1048 1048
1049 this._hideNetworkMessagesCheckbox = new WebInspector.CheckboxFilterUI("h ide-network-messages", WebInspector.UIString("Hide network messages"), true, Web Inspector.moduleSetting("hideNetworkMessages"));
1050 this._hideNetworkMessagesCheckbox.addEventListener(WebInspector.FilterUI .Events.FilterChanged, this._filterChanged.bind(this), this);
1051 filterBar.addFilter(this._hideNetworkMessagesCheckbox);
1052
1049 var levels = [ 1053 var levels = [
1050 {name: WebInspector.ConsoleMessage.MessageLevel.Error, label: WebIns pector.UIString("Errors")}, 1054 {name: WebInspector.ConsoleMessage.MessageLevel.Error, label: WebIns pector.UIString("Errors")},
1051 {name: WebInspector.ConsoleMessage.MessageLevel.Warning, label: WebI nspector.UIString("Warnings")}, 1055 {name: WebInspector.ConsoleMessage.MessageLevel.Warning, label: WebI nspector.UIString("Warnings")},
1052 {name: WebInspector.ConsoleMessage.MessageLevel.Info, label: WebInsp ector.UIString("Info")}, 1056 {name: WebInspector.ConsoleMessage.MessageLevel.Info, label: WebInsp ector.UIString("Info")},
1053 {name: WebInspector.ConsoleMessage.MessageLevel.Log, label: WebInspe ctor.UIString("Logs")}, 1057 {name: WebInspector.ConsoleMessage.MessageLevel.Log, label: WebInspe ctor.UIString("Logs")},
1054 {name: WebInspector.ConsoleMessage.MessageLevel.Debug, label: WebIns pector.UIString("Debug")}, 1058 {name: WebInspector.ConsoleMessage.MessageLevel.Debug, label: WebIns pector.UIString("Debug")},
1055 {name: WebInspector.ConsoleMessage.MessageLevel.RevokedError, label: WebInspector.UIString("Handled")} 1059 {name: WebInspector.ConsoleMessage.MessageLevel.RevokedError, label: WebInspector.UIString("Handled")}
1056 ]; 1060 ];
1057 this._levelFilterUI = new WebInspector.NamedBitSetFilterUI(levels, this. _messageLevelFiltersSetting); 1061 this._levelFilterUI = new WebInspector.NamedBitSetFilterUI(levels, this. _messageLevelFiltersSetting);
1058 this._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.Filter Changed, this._filterChanged, this); 1062 this._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.Filter Changed, this._filterChanged, this);
1059 filterBar.addFilter(this._levelFilterUI); 1063 filterBar.addFilter(this._levelFilterUI);
1060 this._hideNetworkMessagesCheckbox = new WebInspector.CheckboxFilterUI("h ide-network-messages", WebInspector.UIString("Hide network messages"), true, Web Inspector.moduleSetting("hideNetworkMessages"));
1061 this._hideNetworkMessagesCheckbox.addEventListener(WebInspector.FilterUI .Events.FilterChanged, this._filterChanged.bind(this), this);
1062 filterBar.addFilter(this._hideNetworkMessagesCheckbox);
1063 }, 1064 },
1064 1065
1065 _textFilterChanged: function(event) 1066 _textFilterChanged: function(event)
1066 { 1067 {
1067 this._filterRegex = this._textFilterUI.regex(); 1068 this._filterRegex = this._textFilterUI.regex();
1068 1069
1069 this._filterChanged(); 1070 this._filterChanged();
1070 }, 1071 },
1071 1072
1072 /** 1073 /**
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 1144
1144 return true; 1145 return true;
1145 }, 1146 },
1146 1147
1147 reset: function() 1148 reset: function()
1148 { 1149 {
1149 this._messageURLFilters = {}; 1150 this._messageURLFilters = {};
1150 this._messageURLFiltersSetting.set(this._messageURLFilters); 1151 this._messageURLFiltersSetting.set(this._messageURLFilters);
1151 this._messageLevelFiltersSetting.set({}); 1152 this._messageLevelFiltersSetting.set({});
1152 this._view._showAllMessagesCheckbox.inputElement.checked = true; 1153 this._view._showAllMessagesCheckbox.inputElement.checked = true;
1153 this._hideNetworkMessagesCheckbox.setState(false); 1154 WebInspector.moduleSetting("hideNetworkMessages").set(false);
1154 this._textFilterUI.setValue(""); 1155 this._textFilterUI.setValue("");
1155 this._filterChanged(); 1156 this._filterChanged();
1156 }, 1157 },
1157 1158
1158 __proto__: WebInspector.Object.prototype 1159 __proto__: WebInspector.Object.prototype
1159 }; 1160 };
1160 1161
1161 1162
1162 /** 1163 /**
1163 * @constructor 1164 * @constructor
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 handleAction: function(context, actionId) 1311 handleAction: function(context, actionId)
1311 { 1312 {
1312 WebInspector.console.show(); 1313 WebInspector.console.show();
1313 } 1314 }
1314 } 1315 }
1315 1316
1316 /** 1317 /**
1317 * @typedef {{messageIndex: number, matchIndex: number}} 1318 * @typedef {{messageIndex: number, matchIndex: number}}
1318 */ 1319 */
1319 WebInspector.ConsoleView.RegexMatchRange; 1320 WebInspector.ConsoleView.RegexMatchRange;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/components/inspectorViewTabbedPane.css ('k') | Source/devtools/front_end/console/consoleView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698