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

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

Issue 1894003002: Merge "DevTools: Do not scroll the console to show the prompt when we select the console tab." to M… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 { 339 {
340 this._viewport.refresh(); 340 this._viewport.refresh();
341 if (!this._prompt.isCaretInsidePrompt()) 341 if (!this._prompt.isCaretInsidePrompt())
342 this._prompt.moveCaretToEndOfPrompt(); 342 this._prompt.moveCaretToEndOfPrompt();
343 }, 343 },
344 344
345 focus: function() 345 focus: function()
346 { 346 {
347 if (this._promptElement === WebInspector.currentFocusElement()) 347 if (this._promptElement === WebInspector.currentFocusElement())
348 return; 348 return;
349 // Set caret position before setting focus in order to avoid scrolling
350 // by focus().
351 this._prompt.moveCaretToEndOfPrompt();
349 WebInspector.setCurrentFocusElement(this._promptElement); 352 WebInspector.setCurrentFocusElement(this._promptElement);
350 this._prompt.moveCaretToEndOfPrompt();
351 }, 353 },
352 354
353 restoreScrollPositions: function() 355 restoreScrollPositions: function()
354 { 356 {
355 if (this._viewport.scrolledToBottom()) 357 if (this._viewport.scrolledToBottom())
356 this._immediatelyScrollToBottom(); 358 this._immediatelyScrollToBottom();
357 else 359 else
358 WebInspector.Widget.prototype.restoreScrollPositions.call(this); 360 WebInspector.Widget.prototype.restoreScrollPositions.call(this);
359 }, 361 },
360 362
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 return true; 1322 return true;
1321 } 1323 }
1322 return false; 1324 return false;
1323 } 1325 }
1324 } 1326 }
1325 1327
1326 /** 1328 /**
1327 * @typedef {{messageIndex: number, matchIndex: number}} 1329 * @typedef {{messageIndex: number, matchIndex: number}}
1328 */ 1330 */
1329 WebInspector.ConsoleView.RegexMatchRange; 1331 WebInspector.ConsoleView.RegexMatchRange;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698