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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 this._filter = new WebInspector.ConsoleViewFilter(this); | 62 this._filter = new WebInspector.ConsoleViewFilter(this); |
63 this._filter.addEventListener(WebInspector.ConsoleViewFilter.Events.FilterCh
anged, this._updateMessageList.bind(this)); | 63 this._filter.addEventListener(WebInspector.ConsoleViewFilter.Events.FilterCh
anged, this._updateMessageList.bind(this)); |
64 | 64 |
65 this._filterBar = new WebInspector.FilterBar(); | 65 this._filterBar = new WebInspector.FilterBar(); |
66 | 66 |
67 this._preserveLogCheckbox = new WebInspector.StatusBarCheckbox(WebInspector.
UIString("Preserve log")); | 67 this._preserveLogCheckbox = new WebInspector.StatusBarCheckbox(WebInspector.
UIString("Preserve log")); |
68 WebInspector.SettingsUI.bindCheckbox(this._preserveLogCheckbox.inputElement,
WebInspector.settings.preserveConsoleLog); | 68 WebInspector.SettingsUI.bindCheckbox(this._preserveLogCheckbox.inputElement,
WebInspector.settings.preserveConsoleLog); |
69 this._preserveLogCheckbox.element.title = WebInspector.UIString("Do not clea
r log on page reload / navigation."); | 69 this._preserveLogCheckbox.element.title = WebInspector.UIString("Do not clea
r log on page reload / navigation."); |
70 | 70 |
71 var statusBarElement = this._contentsElement.createChild("div", "console-sta
tus-bar"); | 71 var statusBar = new WebInspector.StatusBar(this._contentsElement); |
72 statusBarElement.appendChildren(this._clearConsoleButton.element, this._filt
erBar.filterButton().element, this._executionContextSelector.element, this._pres
erveLogCheckbox.element); | 72 statusBar.appendStatusBarItem(this._clearConsoleButton); |
| 73 statusBar.appendStatusBarItem(this._filterBar.filterButton()); |
| 74 statusBar.appendStatusBarItem(this._executionContextSelector); |
| 75 statusBar.appendStatusBarItem(this._preserveLogCheckbox); |
73 | 76 |
74 this._filtersContainer = this._contentsElement.createChild("div", "console-f
ilters-header hidden"); | 77 this._filtersContainer = this._contentsElement.createChild("div", "console-f
ilters-header hidden"); |
75 this._filtersContainer.appendChild(this._filterBar.filtersElement()); | 78 this._filtersContainer.appendChild(this._filterBar.filtersElement()); |
76 this._filterBar.addEventListener(WebInspector.FilterBar.Events.FiltersToggle
d, this._onFiltersToggled, this); | 79 this._filterBar.addEventListener(WebInspector.FilterBar.Events.FiltersToggle
d, this._onFiltersToggled, this); |
77 this._filterBar.setName("consoleView"); | 80 this._filterBar.setName("consoleView"); |
78 this._filter.addFilters(this._filterBar); | 81 this._filter.addFilters(this._filterBar); |
79 | 82 |
80 this._viewport = new WebInspector.ViewportControl(this); | 83 this._viewport = new WebInspector.ViewportControl(this); |
81 this._viewport.setStickToBottom(true); | 84 this._viewport.setStickToBottom(true); |
82 this._viewport.contentElement().classList.add("console-group", "console-grou
p-messages"); | 85 this._viewport.contentElement().classList.add("console-group", "console-grou
p-messages"); |
(...skipping 23 matching lines...) Expand all Loading... |
106 // FIXME: This is a workaround for the selection machinery bug. See crbug.co
m/410899 | 109 // FIXME: This is a workaround for the selection machinery bug. See crbug.co
m/410899 |
107 var selectAllFixer = this._messagesElement.createChild("div", "console-view-
fix-select-all"); | 110 var selectAllFixer = this._messagesElement.createChild("div", "console-view-
fix-select-all"); |
108 selectAllFixer.textContent = "."; | 111 selectAllFixer.textContent = "."; |
109 | 112 |
110 this._showAllMessagesCheckbox = new WebInspector.StatusBarCheckbox(WebInspec
tor.UIString("Show all messages")); | 113 this._showAllMessagesCheckbox = new WebInspector.StatusBarCheckbox(WebInspec
tor.UIString("Show all messages")); |
111 this._showAllMessagesCheckbox.inputElement.checked = true; | 114 this._showAllMessagesCheckbox.inputElement.checked = true; |
112 this._showAllMessagesCheckbox.inputElement.addEventListener("change", this._
updateMessageList.bind(this), false); | 115 this._showAllMessagesCheckbox.inputElement.addEventListener("change", this._
updateMessageList.bind(this), false); |
113 | 116 |
114 this._showAllMessagesCheckbox.element.classList.add("hidden"); | 117 this._showAllMessagesCheckbox.element.classList.add("hidden"); |
115 | 118 |
116 statusBarElement.appendChild(this._showAllMessagesCheckbox.element); | 119 statusBar.appendStatusBarItem(this._showAllMessagesCheckbox); |
117 | 120 |
118 this._registerShortcuts(); | 121 this._registerShortcuts(); |
119 | 122 |
120 this._messagesElement.addEventListener("contextmenu", this._handleContextMen
uEvent.bind(this), false); | 123 this._messagesElement.addEventListener("contextmenu", this._handleContextMen
uEvent.bind(this), false); |
121 WebInspector.settings.monitoringXHREnabled.addChangeListener(this._monitorin
gXHREnabledSettingChanged, this); | 124 WebInspector.settings.monitoringXHREnabled.addChangeListener(this._monitorin
gXHREnabledSettingChanged, this); |
122 | 125 |
123 this._linkifier = new WebInspector.Linkifier(); | 126 this._linkifier = new WebInspector.Linkifier(); |
124 | 127 |
125 /** @type {!Array.<!WebInspector.ConsoleViewMessage>} */ | 128 /** @type {!Array.<!WebInspector.ConsoleViewMessage>} */ |
126 this._consoleMessages = []; | 129 this._consoleMessages = []; |
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { | 1287 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { |
1285 /** | 1288 /** |
1286 * @return {boolean} | 1289 * @return {boolean} |
1287 */ | 1290 */ |
1288 handleAction: function() | 1291 handleAction: function() |
1289 { | 1292 { |
1290 WebInspector.console.show(); | 1293 WebInspector.console.show(); |
1291 return true; | 1294 return true; |
1292 } | 1295 } |
1293 } | 1296 } |
OLD | NEW |