| OLD | NEW |
| 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 /** | 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 |
| 829 /** |
| 821 * @param {boolean} show | 830 * @param {boolean} show |
| 822 */ | 831 */ |
| 823 updateTimestamp(show) { | 832 updateTimestamp(show) { |
| 824 if (!this._contentElement) | 833 if (!this._contentElement) |
| 825 return; | 834 return; |
| 826 | 835 |
| 827 if (show && !this.timestampElement) { | 836 if (show && !this.timestampElement) { |
| 828 this.timestampElement = createElementWithClass('span', 'console-timestamp'
); | 837 this.timestampElement = createElementWithClass('span', 'console-timestamp'
); |
| 829 this.timestampElement.textContent = (new Date(this._message.timestamp)).to
ConsoleTime() + ' '; | 838 this.timestampElement.textContent = (new Date(this._message.timestamp)).to
ConsoleTime() + ' '; |
| 830 this._contentElement.insertBefore(this.timestampElement, this._contentElem
ent.firstChild); | 839 this._contentElement.insertBefore(this.timestampElement, this._contentElem
ent.firstChild); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 toMessageElement() { | 1221 toMessageElement() { |
| 1213 if (!this._element) { | 1222 if (!this._element) { |
| 1214 super.toMessageElement(); | 1223 super.toMessageElement(); |
| 1215 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); | 1224 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); |
| 1216 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); | 1225 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); |
| 1217 this.setCollapsed(this._collapsed); | 1226 this.setCollapsed(this._collapsed); |
| 1218 } | 1227 } |
| 1219 return this._element; | 1228 return this._element; |
| 1220 } | 1229 } |
| 1221 }; | 1230 }; |
| OLD | NEW |