| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 this._prompt.element.addEventListener('keydown', this._promptKeyDown.bind(th
is), true); | 143 this._prompt.element.addEventListener('keydown', this._promptKeyDown.bind(th
is), true); |
| 144 | 144 |
| 145 this._consoleHistoryAutocompleteSetting = Common.moduleSetting('consoleHisto
ryAutocomplete'); | 145 this._consoleHistoryAutocompleteSetting = Common.moduleSetting('consoleHisto
ryAutocomplete'); |
| 146 this._consoleHistoryAutocompleteSetting.addChangeListener(this._consoleHisto
ryAutocompleteChanged, this); | 146 this._consoleHistoryAutocompleteSetting.addChangeListener(this._consoleHisto
ryAutocompleteChanged, this); |
| 147 | 147 |
| 148 var historyData = this._consoleHistorySetting.get(); | 148 var historyData = this._consoleHistorySetting.get(); |
| 149 this._prompt.history().setHistoryData(historyData); | 149 this._prompt.history().setHistoryData(historyData); |
| 150 this._consoleHistoryAutocompleteChanged(); | 150 this._consoleHistoryAutocompleteChanged(); |
| 151 | 151 |
| 152 this._updateFilterStatus(); | 152 this._updateFilterStatus(); |
| 153 Common.moduleSetting('consoleTimestampFormat').addChangeListener(this._conso
leTimestampsSettingChanged, this); | 153 Common.moduleSetting('consoleTimestampsEnabled').addChangeListener(this._con
soleTimestampsSettingChanged, this); |
| 154 | 154 |
| 155 this._registerWithMessageSink(); | 155 this._registerWithMessageSink(); |
| 156 SDK.targetManager.observeTargets(this); | 156 SDK.targetManager.observeTargets(this); |
| 157 | 157 |
| 158 this._initConsoleMessages(); | 158 this._initConsoleMessages(); |
| 159 | 159 |
| 160 UI.context.addFlavorChangeListener(SDK.ExecutionContext, this._executionCont
extChanged, this); | 160 UI.context.addFlavorChangeListener(SDK.ExecutionContext, this._executionCont
extChanged, this); |
| 161 | 161 |
| 162 this._messagesElement.addEventListener('mousedown', this._updateStickToBotto
mOnMouseDown.bind(this), false); | 162 this._messagesElement.addEventListener('mousedown', this._updateStickToBotto
mOnMouseDown.bind(this), false); |
| 163 this._messagesElement.addEventListener('mouseup', this._updateStickToBottomO
nMouseUp.bind(this), false); | 163 this._messagesElement.addEventListener('mouseup', this._updateStickToBottomO
nMouseUp.bind(this), false); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 progressIndicator.setWorked(messageIndex); | 669 progressIndicator.setWorked(messageIndex); |
| 670 } | 670 } |
| 671 } | 671 } |
| 672 | 672 |
| 673 /** | 673 /** |
| 674 * @param {!Console.ConsoleViewMessage} lastMessage | 674 * @param {!Console.ConsoleViewMessage} lastMessage |
| 675 * @param {?Console.ConsoleViewMessage=} viewMessage | 675 * @param {?Console.ConsoleViewMessage=} viewMessage |
| 676 * @return {boolean} | 676 * @return {boolean} |
| 677 */ | 677 */ |
| 678 _tryToCollapseMessages(lastMessage, viewMessage) { | 678 _tryToCollapseMessages(lastMessage, viewMessage) { |
| 679 var timestampFormat = Common.moduleSetting('consoleTimestampFormat').get(); | 679 var timestampsShown = Common.moduleSetting('consoleTimestampsEnabled').get()
; |
| 680 var timestampsShown = timestampFormat !== Console.ConsoleViewMessage.Timesta
mpFormat.None; | |
| 681 if (!timestampsShown && viewMessage && !lastMessage.consoleMessage().isGroup
Message() && | 680 if (!timestampsShown && viewMessage && !lastMessage.consoleMessage().isGroup
Message() && |
| 682 lastMessage.consoleMessage().isEqual(viewMessage.consoleMessage())) { | 681 lastMessage.consoleMessage().isEqual(viewMessage.consoleMessage())) { |
| 683 viewMessage.incrementRepeatCount(); | 682 viewMessage.incrementRepeatCount(); |
| 684 return true; | 683 return true; |
| 685 } | 684 } |
| 686 | 685 |
| 687 return false; | 686 return false; |
| 688 } | 687 } |
| 689 | 688 |
| 690 _updateMessageList() { | 689 _updateMessageList() { |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 return true; | 1314 return true; |
| 1316 } | 1315 } |
| 1317 return false; | 1316 return false; |
| 1318 } | 1317 } |
| 1319 }; | 1318 }; |
| 1320 | 1319 |
| 1321 /** | 1320 /** |
| 1322 * @typedef {{messageIndex: number, matchIndex: number}} | 1321 * @typedef {{messageIndex: number, matchIndex: number}} |
| 1323 */ | 1322 */ |
| 1324 Console.ConsoleView.RegexMatchRange; | 1323 Console.ConsoleView.RegexMatchRange; |
| OLD | NEW |