Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: Source/devtools/front_end/console/ConsoleView.js

Issue 462083002: DevTools: do not scroll console to bottom on resize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/ViewportControl.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 if (this._scrolledToBottom) 426 if (this._scrolledToBottom)
427 this._immediatelyScrollIntoView(); 427 this._immediatelyScrollIntoView();
428 else 428 else
429 WebInspector.View.prototype.restoreScrollPositions.call(this); 429 WebInspector.View.prototype.restoreScrollPositions.call(this);
430 }, 430 },
431 431
432 onResize: function() 432 onResize: function()
433 { 433 {
434 this._scheduleViewportRefresh(); 434 this._scheduleViewportRefresh();
435 this._prompt.hideSuggestBox(); 435 this._prompt.hideSuggestBox();
436 this.restoreScrollPositions(); 436 if (this._viewport.scrolledToBottom())
vsevik 2014/08/13 07:21:11 Is similar code still needed in restoreScrollPosit
437 this._immediatelyScrollIntoView();
437 }, 438 },
438 439
439 _scheduleViewportRefresh: function() 440 _scheduleViewportRefresh: function()
440 { 441 {
441 /** 442 /**
442 * @param {!WebInspector.Throttler.FinishCallback} finishCallback 443 * @param {!WebInspector.Throttler.FinishCallback} finishCallback
443 * @this {WebInspector.ConsoleView} 444 * @this {WebInspector.ConsoleView}
444 */ 445 */
445 function invalidateViewport(finishCallback) 446 function invalidateViewport(finishCallback)
446 { 447 {
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { 1222 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = {
1222 /** 1223 /**
1223 * @return {boolean} 1224 * @return {boolean}
1224 */ 1225 */
1225 handleAction: function() 1226 handleAction: function()
1226 { 1227 {
1227 WebInspector.console.show(); 1228 WebInspector.console.show();
1228 return true; 1229 return true;
1229 } 1230 }
1230 } 1231 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/ViewportControl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698