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

Side by Side Diff: Source/devtools/front_end/InspectorView.js

Issue 216693002: DevTools: do not invalidate total layout each time console message is added. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 counterElement.id = id; 405 counterElement.id = id;
406 counterElement.textContent = count; 406 counterElement.textContent = count;
407 }, 407 },
408 408
409 /** 409 /**
410 * @param {number} errors 410 * @param {number} errors
411 * @param {number} warnings 411 * @param {number} warnings
412 */ 412 */
413 setErrorAndWarningCounts: function(errors, warnings) 413 setErrorAndWarningCounts: function(errors, warnings)
414 { 414 {
415 if (this._errors === errors && this._warnings === warnings)
416 return;
417 this._errors = errors;
418 this._warnings = warnings;
415 this._errorWarningCountElement.classList.toggle("hidden", !errors && !wa rnings); 419 this._errorWarningCountElement.classList.toggle("hidden", !errors && !wa rnings);
416 this._errorWarningCountElement.removeChildren(); 420 this._errorWarningCountElement.removeChildren();
417 421
418 this._createImagedCounterElementIfNeeded(errors, "error-count", "error-i con-small"); 422 this._createImagedCounterElementIfNeeded(errors, "error-count", "error-i con-small");
419 this._createImagedCounterElementIfNeeded(warnings, "warning-count", "war ning-icon-small"); 423 this._createImagedCounterElementIfNeeded(warnings, "warning-count", "war ning-icon-small");
420 424
421 var errorString = errors ? WebInspector.UIString("%d error%s", errors, errors > 1 ? "s" : "") : ""; 425 var errorString = errors ? WebInspector.UIString("%d error%s", errors, errors > 1 ? "s" : "") : "";
422 var warningString = warnings ? WebInspector.UIString("%d warning%s", wa rnings, warnings > 1 ? "s" : "") : ""; 426 var warningString = warnings ? WebInspector.UIString("%d warning%s", wa rnings, warnings > 1 ? "s" : "") : "";
423 var commaString = errors && warnings ? ", " : ""; 427 var commaString = errors && warnings ? ", " : "";
424 this._errorWarningCountElement.title = errorString + commaString + warni ngString; 428 this._errorWarningCountElement.title = errorString + commaString + warni ngString;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 window.addEventListener("scroll", this._onScrollBound, false); 505 window.addEventListener("scroll", this._onScrollBound, false);
502 else 506 else
503 window.removeEventListener("scroll", this._onScrollBound, false); 507 window.removeEventListener("scroll", this._onScrollBound, false);
504 508
505 WebInspector.VBox.prototype.doResize.call(this); 509 WebInspector.VBox.prototype.doResize.call(this);
506 this._onScroll(); 510 this._onScroll();
507 }, 511 },
508 512
509 __proto__: WebInspector.VBox.prototype 513 __proto__: WebInspector.VBox.prototype
510 }; 514 };
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