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

Unified Diff: Source/devtools/front_end/ConsoleViewMessage.js

Issue 211023002: DevTools: Remove event Console.messageRepeatCountUpdated (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix inspector-protocol/console/console-timestamp.html Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/ConsoleView.js ('k') | Source/devtools/front_end/Main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ConsoleViewMessage.js
diff --git a/Source/devtools/front_end/ConsoleViewMessage.js b/Source/devtools/front_end/ConsoleViewMessage.js
index 7618270136fb491b3ef1c5b64588549f6cb68750..18f54e27ffa3d8275ec9a5b94247573f2ec6f2e8 100644
--- a/Source/devtools/front_end/ConsoleViewMessage.js
+++ b/Source/devtools/front_end/ConsoleViewMessage.js
@@ -39,6 +39,7 @@ WebInspector.ConsoleViewMessage = function(target, consoleMessage, linkifier)
this._message = consoleMessage;
this._linkifier = linkifier;
this._target = target;
+ this._repeatCount = 1;
/** @type {!Array.<!WebInspector.DataGrid>} */
this._dataGrids = [];
@@ -881,8 +882,8 @@ WebInspector.ConsoleViewMessage.prototype = {
element.appendChild(this.formattedMessage());
- if (this._message.repeatCount > 1)
- this.updateRepeatCount();
+ if (this._repeatCount > 1)
+ this._showRepeatCountElement();
return element;
},
@@ -912,7 +913,14 @@ WebInspector.ConsoleViewMessage.prototype = {
}
},
- updateRepeatCount: function() {
+ incrementRepeatCount: function()
+ {
+ this._repeatCount++;
+ this._showRepeatCountElement();
+ },
+
+ _showRepeatCountElement: function()
+ {
if (!this._element)
return;
@@ -923,7 +931,7 @@ WebInspector.ConsoleViewMessage.prototype = {
this._element.insertBefore(this.repeatCountElement, this._element.firstChild);
this._element.classList.add("repeated-message");
}
- this.repeatCountElement.textContent = this._message.repeatCount;
+ this.repeatCountElement.textContent = this._repeatCount;
},
/**
« no previous file with comments | « Source/devtools/front_end/ConsoleView.js ('k') | Source/devtools/front_end/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698