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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 2666013002: DevTools: render console filter in the main console toolbar. (Closed)
Patch Set: Introduce progress monitor Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 810
811 /** 811 /**
812 * @return {boolean} 812 * @return {boolean}
813 */ 813 */
814 matchesFilterRegex(regexObject) { 814 matchesFilterRegex(regexObject) {
815 regexObject.lastIndex = 0; 815 regexObject.lastIndex = 0;
816 var text = this.contentElement().deepTextContent(); 816 var text = this.contentElement().deepTextContent();
817 return regexObject.test(text); 817 return regexObject.test(text);
818 } 818 }
819 819
820 /**
821 * @param {string} filter
822 * @return {boolean}
823 */
824 matchesFilterText(filter) {
825 var text = this.contentElement().deepTextContent();
826 return text.toLowerCase().includes(filter.toLowerCase());
827 }
828
820 updateTimestamp() { 829 updateTimestamp() {
821 if (!this._contentElement) 830 if (!this._contentElement)
822 return; 831 return;
823 832
824 var format = Common.moduleSetting('consoleTimestampFormat').get(); 833 var format = Common.moduleSetting('consoleTimestampFormat').get();
825 if (format !== Console.ConsoleViewMessage.TimestampFormat.None) { 834 if (format !== Console.ConsoleViewMessage.TimestampFormat.None) {
826 var timestampText = formatTimestamp(this._message.timestamp, format); 835 var timestampText = formatTimestamp(this._message.timestamp, format);
827 if (!this._timestampElement) 836 if (!this._timestampElement)
828 this._timestampElement = createElementWithClass('span', 'console-timesta mp'); 837 this._timestampElement = createElementWithClass('span', 'console-timesta mp');
829 this._timestampElement.textContent = timestampText + ' '; 838 this._timestampElement.textContent = timestampText + ' ';
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 toMessageElement() { 1256 toMessageElement() {
1248 if (!this._element) { 1257 if (!this._element) {
1249 super.toMessageElement(); 1258 super.toMessageElement();
1250 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); 1259 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon');
1251 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem ent.firstChild); 1260 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem ent.firstChild);
1252 this.setCollapsed(this._collapsed); 1261 this.setCollapsed(this._collapsed);
1253 } 1262 }
1254 return this._element; 1263 return this._element;
1255 } 1264 }
1256 }; 1265 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698