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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 | 171 |
172 ConsoleModel.consoleModel.addEventListener( | 172 ConsoleModel.consoleModel.addEventListener( |
173 ConsoleModel.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, t his); | 173 ConsoleModel.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, t his); |
174 ConsoleModel.consoleModel.addEventListener( | 174 ConsoleModel.consoleModel.addEventListener( |
175 ConsoleModel.ConsoleModel.Events.MessageAdded, this._onConsoleMessageAdd ed, this); | 175 ConsoleModel.ConsoleModel.Events.MessageAdded, this._onConsoleMessageAdd ed, this); |
176 ConsoleModel.consoleModel.addEventListener( | 176 ConsoleModel.consoleModel.addEventListener( |
177 ConsoleModel.ConsoleModel.Events.MessageUpdated, this._onConsoleMessageU pdated, this); | 177 ConsoleModel.ConsoleModel.Events.MessageUpdated, this._onConsoleMessageU pdated, this); |
178 ConsoleModel.consoleModel.addEventListener( | 178 ConsoleModel.consoleModel.addEventListener( |
179 ConsoleModel.ConsoleModel.Events.CommandEvaluated, this._commandEvaluate d, this); | 179 ConsoleModel.ConsoleModel.Events.CommandEvaluated, this._commandEvaluate d, this); |
180 ConsoleModel.consoleModel.messages().forEach(this._addConsoleMessage, this); | 180 ConsoleModel.consoleModel.messages().forEach(this._addConsoleMessage, this); |
181 if (this._consoleMessages.length) | |
182 this._viewport.invalidate(); | |
luoe
2017/04/07 01:19:38
drive by: Orthogonal to the root problem, but we d
| |
183 } | 181 } |
184 | 182 |
185 /** | 183 /** |
186 * @return {!Console.ConsoleView} | 184 * @return {!Console.ConsoleView} |
187 */ | 185 */ |
188 static instance() { | 186 static instance() { |
189 if (!Console.ConsoleView._instance) | 187 if (!Console.ConsoleView._instance) |
190 Console.ConsoleView._instance = new Console.ConsoleView(); | 188 Console.ConsoleView._instance = new Console.ConsoleView(); |
191 return Console.ConsoleView._instance; | 189 return Console.ConsoleView._instance; |
192 } | 190 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 * @override | 294 * @override |
297 */ | 295 */ |
298 willHide() { | 296 willHide() { |
299 this._hidePromptSuggestBox(); | 297 this._hidePromptSuggestBox(); |
300 } | 298 } |
301 | 299 |
302 /** | 300 /** |
303 * @override | 301 * @override |
304 */ | 302 */ |
305 wasShown() { | 303 wasShown() { |
306 this._viewport.refresh(); | 304 this._viewport.invalidate(); |
dgozman
2017/04/07 20:31:44
Why this change?
luoe
2017/04/07 22:09:54
I actually think we don't need this at all! Maybe
| |
307 } | 305 } |
308 | 306 |
309 /** | 307 /** |
310 * @override | 308 * @override |
311 */ | 309 */ |
312 focus() { | 310 focus() { |
313 if (this._prompt.hasFocus()) | 311 if (this._prompt.hasFocus()) |
314 return; | 312 return; |
315 // Set caret position before setting focus in order to avoid scrolling | 313 // Set caret position before setting focus in order to avoid scrolling |
316 // by focus(). | 314 // by focus(). |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1285 return true; | 1283 return true; |
1286 } | 1284 } |
1287 return false; | 1285 return false; |
1288 } | 1286 } |
1289 }; | 1287 }; |
1290 | 1288 |
1291 /** | 1289 /** |
1292 * @typedef {{messageIndex: number, matchIndex: number}} | 1290 * @typedef {{messageIndex: number, matchIndex: number}} |
1293 */ | 1291 */ |
1294 Console.ConsoleView.RegexMatchRange; | 1292 Console.ConsoleView.RegexMatchRange; |
OLD | NEW |