Chromium Code Reviews| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 if (this._viewport.stickToBottom()) | 337 if (this._viewport.stickToBottom()) |
| 338 this._immediatelyScrollToBottom(); | 338 this._immediatelyScrollToBottom(); |
| 339 for (var i = 0; i < this._visibleViewMessages.length; ++i) | 339 for (var i = 0; i < this._visibleViewMessages.length; ++i) |
| 340 this._visibleViewMessages[i].onResize(); | 340 this._visibleViewMessages[i].onResize(); |
| 341 } | 341 } |
| 342 | 342 |
| 343 _hidePromptSuggestBox() { | 343 _hidePromptSuggestBox() { |
| 344 this._prompt.clearAutocomplete(); | 344 this._prompt.clearAutocomplete(); |
| 345 } | 345 } |
| 346 | 346 |
| 347 _scheduleViewportRefresh() { | 347 /** |
| 348 /** | 348 * @return {!Promise.<undefined>} |
| 349 * @this {Console.ConsoleView} | 349 */ |
| 350 * @return {!Promise.<undefined>} | 350 _invalidateViewport() { |
|
lushnikov
2017/03/22 00:54:37
this change is pulling function invalidateViewport
| |
| 351 */ | 351 if (this._muteViewportUpdates) { |
| 352 function invalidateViewport() { | 352 this._maybeDirtyWhileMuted = true; |
| 353 if (this._muteViewportUpdates) { | |
| 354 this._maybeDirtyWhileMuted = true; | |
| 355 return Promise.resolve(); | |
| 356 } | |
| 357 if (this._needsFullUpdate) { | |
| 358 this._updateMessageList(); | |
| 359 delete this._needsFullUpdate; | |
| 360 } else { | |
| 361 this._viewport.invalidate(); | |
| 362 } | |
| 363 return Promise.resolve(); | 353 return Promise.resolve(); |
| 364 } | 354 } |
| 355 if (this._needsFullUpdate) { | |
| 356 this._updateMessageList(); | |
| 357 delete this._needsFullUpdate; | |
| 358 } else { | |
| 359 this._viewport.invalidate(); | |
| 360 } | |
| 361 return Promise.resolve(); | |
| 362 } | |
| 363 | |
| 364 _scheduleViewportRefresh() { | |
| 365 if (this._muteViewportUpdates) { | 365 if (this._muteViewportUpdates) { |
| 366 this._maybeDirtyWhileMuted = true; | 366 this._maybeDirtyWhileMuted = true; |
| 367 this._scheduleViewportRefreshForTest(true); | 367 this._scheduleViewportRefreshForTest(true); |
| 368 return; | 368 return; |
| 369 } else { | 369 } else { |
| 370 this._scheduleViewportRefreshForTest(false); | 370 this._scheduleViewportRefreshForTest(false); |
| 371 } | 371 } |
| 372 this._viewportThrottler.schedule(invalidateViewport.bind(this)); | 372 this._viewportThrottler.schedule(this._invalidateViewport.bind(this)); |
| 373 } | 373 } |
| 374 | 374 |
| 375 /** | 375 /** |
| 376 * @param {boolean} muted | 376 * @param {boolean} muted |
| 377 */ | 377 */ |
| 378 _scheduleViewportRefreshForTest(muted) { | 378 _scheduleViewportRefreshForTest(muted) { |
| 379 // This functions is sniffed in tests. | 379 // This functions is sniffed in tests. |
| 380 } | 380 } |
| 381 | 381 |
| 382 _immediatelyScrollToBottom() { | 382 _immediatelyScrollToBottom() { |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1279 return true; | 1279 return true; |
| 1280 } | 1280 } |
| 1281 return false; | 1281 return false; |
| 1282 } | 1282 } |
| 1283 }; | 1283 }; |
| 1284 | 1284 |
| 1285 /** | 1285 /** |
| 1286 * @typedef {{messageIndex: number, matchIndex: number}} | 1286 * @typedef {{messageIndex: number, matchIndex: number}} |
| 1287 */ | 1287 */ |
| 1288 Console.ConsoleView.RegexMatchRange; | 1288 Console.ConsoleView.RegexMatchRange; |
| OLD | NEW |